Closed pavpanchekha closed 6 months ago
I imagine this is Skia's fault, not skia-python
's; I'll try to narrow down the issue and if I can confirm that the issue is in Skia, I'll file a bug there.
This has already been reported I think: https://github.com/kyamagu/skia-python/issues/214 - likely an upstream error - or lack of update of mac os x GL stack.
It is probably not even skia's fault, but Apple's.
Mac os x's GL stack is significantly behind others.
I can't reproduce your shader problem on Linux. Not quite the same as #214 , as I see these errors instead:
$ python3 lab13.py http://browser.engineering/
OpenGL initialized: vendor=b'AMD',renderer=b'AMD Radeon R5 Graphics (radeonsi, stoney, LLVM 17.0.6, DRM 3.57, 6.8.4-200.fc39.x86_64)'
Script http://browser.engineering/feedback.js crashed SyntaxError: parse error (line 39)
at [anon] (eval:39) internal
at [anon] (duk_js_compiler.c:3797) internal
Script http://browser.engineering/book.js crashed SyntaxError: parse error (line 4)
at [anon] (eval:4) internal
at [anon] (duk_js_compiler.c:511) internal
BTW, your script relies on a specific way of installing dukpy - getting it from the Linux distribution (Redhat Fedora in my case), it is installed without any of the *.py scripts . Just dukpy.cpython-312-x86_64-linux-gnu.so
. It looks like you need __init__.py
, which loads from .evaljs import evaljs, JSInterpreter
. I was seeing AttributeError: module 'dukpy' has no attribute 'JSInterpreter'
error when I had it installed via the first method; and had to do pip install --user dukpy
to get around it.
This may be a packaging bug on Redhat's part, in which case you (or I) should file at https://bugzilla.redhat.com/
Let me know to retry if you can fix the crashed SyntaxError: parse error
.
Ah, heh, the syntax error is unfortunately expected behavior! This is the browser running a website that uses JS syntax not supported by DukPy. Will look into RedHat
I just get a window of your web site, and those messages. So i assume that's correct behavior? In that case this is mac os x specific and same as #214 .
As for the packaging issue, the file listing of the package is https://koji.fedoraproject.org/koji/rpminfo?rpmID=35288394 - missing all the *.py files. I am not familiar with it, and how it should be.
Btw, the lab13 script also seems to be doing a busy wait and tie up one of my cpu's while it runs. (Just looking at my system load monitor).
I’ll look, may be an issue
Argh, the busy wait loop is the while True:
on line 1491 in mainloop. Polling for events isn't ideal - there has got to be a way of registering event handler, for better efficiency.
Closed as duplicate
I get the following error when running a complex Skia application:
Shader Compilation Error
Steps to reproduce
Unfortunately, I haven't been able to narrow down the crash yet, though I'll try to find time tomorrow to do so. But you can reproduce it on your own by cloning https://github.com/browserengineering/book and running:
You'll need a working Internet connection.