Closed waleed177 closed 1 year ago
Thanks for the report! Just ran a quick test, this does not cause a crash on windows with the nightly build. Which is likely built with an older version of godot. Can you test if the Linux nightly build has this bug as well? So we can see if this is a upstream change causing the issue or platform specific issue.
Scratch that, I was mistaken. I misread the part where you said it does not crash until the end of the loop. Can confirm its reproducible.
Okay so the issue causing this is the attempted integration ive done with the lua garbage collector. https://github.com/WeaselGames/godot_luaAPI/blob/eda1c454411bf8fbb9c5e85f291e4868344ea3a3/src/metatables.cpp#L450-L457 Lua's GC tries to clean it up at an none optimal time. It may be best to let objects owned by lua live the length of the lua object instead. At least until a better option is found. I dont want to resort to manual memory management really. Ill have a PR shortly.
Confirmed working on my end! Thank you very much! :D
Describe the bug Godot 4.0 v4.0.beta.custom_build [0b1d516f6] with the master branch of luaapi commit (https://github.com/WeaselGames/godot_luaAPI/commit/eda1c454411bf8fbb9c5e85f291e4868344ea3a3), crashed when getting a node in a loop then yielding in a loop.
To Reproduce Make a scene with one node inside it called Node, attach to the scene this script:
I do note that it doesnt crash when getting the node, it crashes when reaching the end of the loop as this is the output ( i truncated the start, since its all the same):
this is the crash report:
Expected behavior It shouldnt crash.
Screenshots N/A
Environment