Replies: 4 comments 3 replies
-
No objections. Not all modules have the meta_gc defined, so expect to have to do so in at least some cases. Will this make a difference with modules that are loaded by the initial |
Beta Was this translation helpful? Give feedback.
-
Huh, that's a good point, we may actually be using a refTable that doesn't match the lua_State currently considered prime. Any ideas for dealing with this more intelligently? |
Beta Was this translation helpful? Give feedback.
-
This all suggests that having the bare @asmagill how about this:
The patch for implementing that would be pretty substantial, which makes this hypothesis quite expensive to test, but in theory we'd still be making ourselves more robust even if this doesn't shake out some of the mysterious Lua crashes. Thoughts? |
Beta Was this translation helpful? Give feedback.
-
The problem I can for-see with this is that independent blocks refer to We'd need to test it, but I fear we'd need to change every callback block so that it made a local copy of What if we kept it an integer, but made it a random number over the entire Unless all variables within blocks are accessed by reference... is there any definitive documentation on this or do we need to craft some tests? |
Beta Was this translation helpful? Give feedback.
-
I've been looking through crashes in Sentry and it seems like a lot of them crash deep inside Lua after entering via a C callback.
I'm wondering if this is LuaSkin lifecycle related - eg we're reloading and C callbacks get triggered while we're in a weird state.
I have an idea for how to confirm this hypothesis - @asmagill do you see any issues with setting each module's refTable to REFNIL in the module-level __gc function? If I'm right, that would turn all of the crash reports into pushRef exceptions, and we can guard them all.
Beta Was this translation helpful? Give feedback.
All reactions