Hi ! Looking at this stack trace :
worker.js onmessage() captured an uncaught exception: TypeError: GLctx is undefined test.worker.js:204:13 <http://localhost:6931/test.worker.js> onmessage http://localhost:6931/test.worker.js:204 _glGetString@http://localhost:6931/test.js:12881:22 glGetString@http://localhost:6931/test.wasm:wasm-function[39]:0x0 vout_display_opengl_New@http: //localhost:6931/test.wasm:wasm-function[2745]:0xfb135 Open.42@http://localhost:6931/test.wasm:wasm-function[2757]:0xfde90 vout_display_start@http: //localhost:6931/test.wasm:wasm-function[5234]:0x234192 vlc_module_load@http://localhost:6931/test.wasm:wasm-function[4495]:0x1ed60b vout_display_New@http: //localhost:6931/test.wasm:wasm-function[5233]:0x23408f vout_OpenWrapper@http: //localhost:6931/test.wasm:wasm-function[5414]:0x24047b vout_Request@http://localhost:6931/test.wasm:wasm-function[5314]:0x238275 input_resource_GetVout@http: //localhost:6931/test.wasm:wasm-function[5065]:0x22b3e2 vout_update_format@http: //localhost:6931/test.wasm:wasm-function[4781]:0x20f622 decoder_UpdateVideoFormat@http: //localhost:6931/test.wasm:wasm-function[4801]:0x2109b7 lavc_UpdateVideoFormat@http: //localhost:6931/test.wasm:wasm-function[2077]:0x9c3ef lavc_GetFrame@http://localhost:6931/test.wasm:wasm-function[2070]:0x9b000 ff_get_buffer@http://localhost:6931/test.wasm:wasm-function[5952]:0x25bdf3 ff_thread_get_buffer@http: //localhost:6931/test.wasm:wasm-function[7741]:0x3ed9b4 h264_frame_start@http: //localhost:6931/test.wasm:wasm-function[6058]:0x2b144b ff_h264_queue_decode_slice@http: //localhost:6931/test.wasm:wasm-function[6054]:0x2aed5a h264_decode_frame@http: //localhost:6931/test.wasm:wasm-function[6074]:0x2b5919 decode_receive_frame_internal@http: //localhost:6931/test.wasm:wasm-function[5943]:0x2596e4 avcodec_send_packet@http: //localhost:6931/test.wasm:wasm-function[5942]:0x2595a8 DecodeBlock.1@http://localhost:6931/test.wasm:wasm-function[2079]:0x9c843 DecodeVideo@http://localhost:6931/test.wasm:wasm-function[2075]:0x9bee1 DecoderProcess@http://localhost:6931/test.wasm:wasm-function[4780]:0x20eef6 DecoderThread@http://localhost:6931/test.wasm:wasm-function[4756]:0x20dd3e dynCall_ii@http://localhost:6931/test.wasm:wasm-function[10304]:0x44f797 Module.dynCall_ii@http://localhost:6931/test.js:15580:38 this.onmessage@http://localhost:6931/test.worker.js:165:29 test.worker.js:205:13 <http://localhost:6931/test.worker.js> Pthread 26767184 uncaught exception in http: //localhost:6931/test.js:12881:0: TypeError: GLctx is undefined. Error object: test.worker.js:49:11 <http://localhost:6931/test.worker.js> TypeError: GLctx is undefined test.worker.js:50:11 <http://localhost:6931/test.worker.js> pthread sent an error! http://localhost:6931/test.js:12881: TypeError: GLctx is undefined test.html:1246:19 <http://localhost:6931/test.html> TypeError: GLctx is undefined test.js:12881:22 <http://localhost:6931/test.js> _glGetString http://localhost:6931/test.js:12881 glGetString http://localhost:6931/test.wasm:0 vout_display_opengl_New http://localhost:6931/test.wasm:1028405 42 http://localhost:6931/test.wasm:1040016 vout_display_start http://localhost:6931/test.wasm:2310546 vlc_module_load http://localhost:6931/test.wasm:2020875 vout_display_New http://localhost:6931/test.wasm:2310287 vout_OpenWrapper http://localhost:6931/test.wasm:2360443 vout_Request http://localhost:6931/test.wasm:2327157 input_resource_GetVout http://localhost:6931/test.wasm:2274274 vout_update_format http://localhost:6931/test.wasm:2160162 decoder_UpdateVideoFormat http://localhost:6931/test.wasm:2165175 lavc_UpdateVideoFormat http://localhost:6931/test.wasm:639983 lavc_GetFrame http://localhost:6931/test.wasm:634880 ff_get_buffer http://localhost:6931/test.wasm:2473459 ff_thread_get_buffer http://localhost:6931/test.wasm:4118964 h264_frame_start http://localhost:6931/test.wasm:2823243 ff_h264_queue_decode_slice http://localhost:6931/test.wasm:2813274 h264_decode_frame http://localhost:6931/test.wasm:2840857 decode_receive_frame_internal http://localhost:6931/test.wasm:2463460 avcodec_send_packet http://localhost:6931/test.wasm:2463144 1 http://localhost:6931/test.wasm:641091 DecodeVideo http://localhost:6931/test.wasm:638689 DecoderProcess http://localhost:6931/test.wasm:2158326 DecoderThread http://localhost:6931/test.wasm:2153790 dynCall_ii http://localhost:6931/test.wasm:4519831 dynCall_ii http://localhost:6931/test.js:15580 onmessage I was wondering if it was normal that a function would get address 0. Could this be a bug in code generation? glGetString@http://localhost:6931/test.wasm:wasm-function[39]:0x0 I know I am not giving much information on the context (sorry about that), but I haven't been able to isolate so far. I found an issue <https://github.com/WebAssembly/binaryen/issues/2112> that has the same symptoms and the recommendation was to look into js glue code, do you think it's a the right thing to do in my case? GLctx is defined in test.js, but it seems it is not in the scope the function is called? Thanks in advance for your help, Regards, Mehdi -- You received this message because you are subscribed to the Google Groups "emscripten-discuss" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To view this discussion on the web visit https://groups.google.com/d/msgid/emscripten-discuss/5080247a-5feb-4719-8ede-55e516745641%40googlegroups.com.
