Skip to content

Conversation

@mostlynick3
Copy link

Eluna reloads close the Lua engine, then opens it again. Callbacks from queries run before it is closed have no reference after this, and lead to a crash once received. This schedules reloads until after all pending callbacks have been processed.

@mostlynick3 mostlynick3 changed the title fix(LuaEngine/Reload) - Await callbacks before reloading, to not crash on callback fix(LuaEngine/Reload): Await callbacks before reloading, to not crash on callback Mar 23, 2025
@Foereaper
Copy link

Instead of keeping track of expected callbacks you could just check whether or not the async callback processor is empty or not, pretty much exactly like we do here

https://github.com/ElunaLuaEngine/Eluna/blob/a1d26bdd09f9a02c4fdc00977dd69be095160068/LuaEngine.cpp#L991

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants