Page 1 of 1

[1.1.36] Crash

Posted: Thu Jul 29, 2021 1:22 pm
by eradicator
This thing is a bit weird *cough* it prints a line to the console that's not part of the actual log:

Code: Select all

PANIC: unprotected error in call to Lua API
Reproduction:
Load the attached savegame after synching mods and grabbing bio industries from github. Click the "Bio Industries" button in the already open gvv gui.

Probably cause:
To test if I can get an easy copy of the environment I added a "simple" function to gvv's remote interface. (I can feel a hearty "just don't do this" incoming :lol:.)

Code: Select all

 _G = function() return _ENV end,

Re: [1.1.36] Crash

Posted: Thu Jul 29, 2021 2:17 pm
by posila
I guess that's what Lua interpreter does when you corrupt its global state like that ... so don't do that 8-)

EDIT: Although, in the code it is actually more like this

Code: Select all

{ _G = function() return _ENV end, }
so I don't know why the global _G is being corrupted ... but I am not interested enough in this to try to decode what is actually happening in that mod :)

Re: [1.1.36] Crash

Posted: Thu Jul 29, 2021 6:04 pm
by eradicator
posila wrote:
Thu Jul 29, 2021 2:17 pm
so don't do that 8-)
Sir, yes Sir! :mrgreen:
posila wrote:
Thu Jul 29, 2021 2:17 pm
EDIT: Although, in the code it is actually more like this
Yea, sorry if that was unclear. It's a function named "_G" in the remote interface. Not something that replaces _ENV._G. Just reported it because of the weird way it crashed with memory related warnings etc. Hope you at least got a good laugh :geek: .