Open ghost opened 5 years ago
The original file was from a lua module to be compiled into Godot.
This matters as I plan on sandboxing the Lua programs and letting players write lua for automation in their game. Also, the code would run server-side, so it is not good if the server freezes due to invalid lua.
With a valid lua script, if changes are made rapidly for testing, it can freeze the main thread of the game.
I managed to pull an error with Error: script not loaded (test_sandbox)
where I am testing cSum(1, 3)
with a sandboxed lua function I am working on. I am going to try to put this on a separate thread and lower its priority so it doesn't make my game run at 90% cpu when the script freezes up. I'll report if this workaround works.
I don't know what I did to get the module to work (probably the part where I renamed the gdns file to LuaScript.gdns instead of just Lua.gdns). This is aside from my merging the latest commit of Godot 3.2-dev with my copy of Godot (which fixed a freeze on all GDNativeLibraries).
However, I noticed loading an invalid Lua file freezes the game as a whole.
Trying to load this file causes the freeze.
This file works fine.