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
Chatted with @ryantrem offline. Seems like the following is going on:
"this seems related to the conversation we just had.... NativeEngine is owned by the JS side but tries to do work on a thread other than the JS thread, and so NativeEngine can be destructed while those async operations are executing. m_allocator, m_cancellationToken, and m_runtimeScheduler are all not safe to use in this way. Either lifetimes need to be extended or some of this stuff needs to move out of NativeEngine to something longer lived."
This can happen, for example, when an async LoadTexture is in progress and the NativeEngine is disposed (or maybe when bgfx is shutdown via Graphics::DisableRendering).
We have logic in NativeEngine that hands around an allocator that is not valid when NativeEngine is disposed:
BabylonNative/Plugins/NativeEngine/Source/NativeEngine.cpp
Line 981 in 720b2dc
This logic does not observe cancellation requests and can generate crashes during fast refresh/NativeEngine teardown
The text was updated successfully, but these errors were encountered: