You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This has been fixed previously for setting the cursor via the proxy to worker feature. I'm using two features not mentioned in the above PRs: PROXY_TO_PTHREAD and OFFSCREENCANVAS_SUPPORT. I suspect one or both of these aren't setup to proxy setting the styles from a worker thread to the main thread.
( aside; I am aware that SDL does not yet support proxy_to_pthread emscripten-ports/SDL2#127 . I suppose when it does I can forgo OFFSCREENCANVAS_SUPPORT? I hope so, because even after commenting out this cursor code I get an error about the main thread trying to get the context of a canvas that has been transfered to a worker Failed to execute 'getContext' on 'HTMLCanvasElement': Cannot get context from a canvas that has transferred its control to offscreen ... the only reason I'm using OFFSCREENCANVAS_SUPPORT in the first place is because I was getting webgl errors in a worker )
Hi @connorjclark,
I'm having the exact same issue, except I'm using https://github.com/Kitware/VTK which uses its own "vtkSDL2".
It's the first time I'm using emscripten so I'm a bit lost. How did you circumvent this issue ? USE_PTHREADS=1 + --proxy-to-worker (but then you can't use MODULARIZE=1) ?
Because of this and other issues, emscripten w/ SDL doesn't work with proxying the rendering stuff (so can't use the proxy to worker to proxy main thread flags), so I've just avoided those flags for now. It also means that if your main application thread uses blocking constructs you must use ASYNCIFY, so give that a shot.
It's the first time I'm using emscripten so I'm a bit lost.
Hey I'm with you. Good luck, it gets easier. Make sure you use -g when debugging and enable the DWARF debugging in Chrome/Edge devtools (it is behind an experimental flag AND a devtools extension)
Version of emscripten/emsdk:
I hope a picture is sufficient:
here's my flags:
Related issues/PRs:
#3568
#3623
#3623
This has been fixed previously for setting the cursor via the proxy to worker feature. I'm using two features not mentioned in the above PRs: PROXY_TO_PTHREAD and OFFSCREENCANVAS_SUPPORT. I suspect one or both of these aren't setup to proxy setting the styles from a worker thread to the main thread.
( aside; I am aware that SDL does not yet support proxy_to_pthread emscripten-ports/SDL2#127 . I suppose when it does I can forgo OFFSCREENCANVAS_SUPPORT? I hope so, because even after commenting out this cursor code I get an error about the main thread trying to get the context of a canvas that has been transfered to a worker
Failed to execute 'getContext' on 'HTMLCanvasElement': Cannot get context from a canvas that has transferred its control to offscreen
... the only reason I'm usingOFFSCREENCANVAS_SUPPORT
in the first place is because I was getting webgl errors in a worker )EDIT: I just noticed https://github.com/libsdl-org/SDL/pull/5365/files#diff-41bdc236909c8708ff058aa571192a0db6e42e4373f12011b7dd3171bc2e586aR234 addresses this issue.
The text was updated successfully, but these errors were encountered: