emscripten stack overflow requestAnimationFrame
hsdk123 opened this issue · 2 comments
Hi, during random points of my game, the browser quits with the following error.
I'm given the impression it occurs when a tickEvent takes a long time due to resource loading.
I'm using Sdl2Application
Uncaught RuntimeError: Aborted(Stack overflow! Stack cookie has been overwritten at 0x000d10d0, expected hex dwords 0x89BACDFE and 0x2135467, but received 0x00000000 0x00000000)
abort http://localhost:8000/LightApp.js:1
checkStackCookie http://localhost:8000/LightApp.js:1
runIter http://localhost:8000/LightApp.js:1
MainLoop_runner http://localhost:8000/LightApp.js:1
requestAnimationFrame http://localhost:8000/LightApp.js:1
MainLoop_scheduler_rAF http://localhost:8000/LightApp.js:1
MainLoop_runner http://localhost:8000/LightApp.js:1
requestAnimationFrame http://localhost:8000/LightApp.js:1
MainLoop_scheduler_rAF http://localhost:8000/LightApp.js:1
MainLoop_runner http://localhost:8000/LightApp.js:1
requestAnimationFrame http://localhost:8000/LightApp.js:1
MainLoop_scheduler_rAF http://localhost:8000/LightApp.js:1
MainLoop_runner http://localhost:8000/LightApp.js:1
requestAnimationFrame http://localhost:8000/LightApp.js:1
MainLoop_scheduler_rAF http://localhost:8000/LightApp.js:1
MainLoop_runner http://localhost:8000/LightApp.js:1
requestAnimationFrame http://localhost:8000/LightApp.js:1
MainLoop_scheduler_rAF http://localhost:8000/LightApp.js:1
MainLoop_runner http://localhost:8000/LightApp.js:1
requestAnimationFrame http://localhost:8000/LightApp.js:1
MainLoop_scheduler_rAF http://localhost:8000/LightApp.js:1
MainLoop_runner http://localhost:8000/LightApp.js:1
requestAnimationFrame http://localhost:8000/LightApp.js:1
MainLoop_scheduler_rAF http://localhost:8000/LightApp.js:1
MainLoop_runner http://localhost:8000/LightApp.js:1
requestAnimationFrame http://localhost:8000/LightApp.js:1
MainLoop_scheduler_rAF http://localhost:8000/LightApp.js:1
MainLoop_runner http://localhost:8000/LightApp.js:1
requestAnimationFrame http://localhost:8000/LightApp.js:1
MainLoop_scheduler_rAF http://localhost:8000/LightApp.js:1
MainLoop_runner http://localhost:8000/LightApp.js:1
requestAnimationFrame http://localhost:8000/LightApp.js:1
MainLoop_scheduler_rAF http://localhost:8000/LightApp.js:1
MainLoop_runner http://localhost:8000/LightApp.js:1
requestAnimationFrame http://localhost:8000/LightApp.js:1
MainLoop_scheduler_rAF http://localhost:8000/LightApp.js:1
MainLoop_runner http://localhost:8000/LightApp.js:1
requestAnimationFrame http://localhost:8000/LightApp.js:1
MainLoop_scheduler_rAF http://localhost:8000/LightApp.js:1
MainLoop_runner http://localhost:8000/LightApp.js:1
LightApp.js:1:10144
abort http://localhost:8000/LightApp.js:1
checkStackCookie http://localhost:8000/LightApp.js:1
runIter http://localhost:8000/LightApp.js:1
MainLoop_runner http://localhost:8000/LightApp.js:1
(Async: FrameRequestCallback)
requestAnimationFrame http://localhost:8000/LightApp.js:1
MainLoop_scheduler_rAF http://localhost:8000/LightApp.js:1
MainLoop_runner http://localhost:8000/LightApp.js:1
(Async: FrameRequestCallback)
requestAnimationFrame http://localhost:8000/LightApp.js:1
MainLoop_scheduler_rAF http://localhost:8000/LightApp.js:1
MainLoop_runner http://localhost:8000/LightApp.js:1
(Async: FrameRequestCallback)
requestAnimationFrame http://localhost:8000/LightApp.js:1
MainLoop_scheduler_rAF http://localhost:8000/LightApp.js:1
MainLoop_runner http://localhost:8000/LightApp.js:1
(Async: FrameRequestCallback)
requestAnimationFrame http://localhost:8000/LightApp.js:1
MainLoop_scheduler_rAF http://localhost:8000/LightApp.js:1
MainLoop_runner http://localhost:8000/LightApp.js:1
(Async: FrameRequestCallback)
requestAnimationFrame http://localhost:8000/LightApp.js:1
MainLoop_scheduler_rAF http://localhost:8000/LightApp.js:1
MainLoop_runner http://localhost:8000/LightApp.js:1
(Async: FrameRequestCallback)
requestAnimationFrame http://localhost:8000/LightApp.js:1
MainLoop_scheduler_rAF http://localhost:8000/LightApp.js:1
MainLoop_runner http://localhost:8000/LightApp.js:1
(Async: FrameRequestCallback)
requestAnimationFrame http://localhost:8000/LightApp.js:1
MainLoop_scheduler_rAF http://localhost:8000/LightApp.js:1
MainLoop_runner http://localhost:8000/LightApp.js:1
(Async: FrameRequestCallback)
requestAnimationFrame http://localhost:8000/LightApp.js:1
MainLoop_scheduler_rAF http://localhost:8000/LightApp.js:1
MainLoop_runner http://localhost:8000/LightApp.js:1
(Async: FrameRequestCallback)
requestAnimationFrame http://localhost:8000/LightApp.js:1
MainLoop_scheduler_rAF http://localhost:8000/LightApp.js:1
MainLoop_runner http://localhost:8000/LightApp.js:1
(Async: FrameRequestCallback)
requestAnimationFrame http://localhost:8000/LightApp.js:1
MainLoop_scheduler_rAF http://localhost:8000/LightApp.js:1
MainLoop_runner http://localhost:8000/LightApp.js:1
(Async: FrameRequestCallback)
requestAnimationFrame http://localhost:8000/LightApp.js:1
MainLoop_scheduler_rAF http://localhost:8000/LightApp.js:1
MainLoop_runner http://localhost:8000/LightApp.js:1
(Async: FrameRequestCallback)
requestAnimationFrame http://localhost:8000/LightApp.js:1
MainLoop_scheduler_rAF http://localhost:8000/LightApp.js:1
MainLoop_runner http://localhost:8000/LightApp.js:1
Would you be able to try with EmscriptenApplication instead? I don't have much control over how the main loop is implemented in the Emscripten SDL stub, and it's lacking in several other areas as well.
Another thing you could do, assuming it's not an infinite recursion but has some upper bound, is increasing the stack size by passing -sSTACK_SIZE=<size> to the linker. The default is 64*1024, 64 kB, not sure if you're increasing it already, try maybe twice the current value?
The error seems to go away by increasing the stack size to 1mb. Closing for the moment. Thank you as always!