Page 1 of 1

Detected modification of the global 'log' function."

Posted: Tue Sep 20, 2016 8:28 pm
by Ratzap
I upgraded my server to 0.14.8 and it no longer starts up. The message below gets put into the log. I deleted the first mod it spat that out for and tried again but it just does it on the next one instead.

Code: Select all

Detected modification of the global 'log' function."
  27.561 Info ServerMultiplayerManager.cpp:637: mapTick(-1) changing state from(CreatingGame) to(InitializationFailed)
  27.561 Error Main.cpp:457: Couldn't load the game for MP: Error while processing 'mod-CORE-DyTech-Core' control.lua.

Detected modification of the global 'log' function.

Re: Detected modification of the global 'log' function."

Posted: Tue Sep 20, 2016 8:38 pm
by Ratzap
I rolled it back to 0.14.7 and the same mods all load fine - game starts and I get in.

Re: Detected modification of the global 'log' function."

Posted: Tue Sep 20, 2016 8:42 pm
by Nexela
Ohh fancy new protection

you have a mod which overwrites the log function :)

Re: Detected modification of the global 'log' function."

Posted: Tue Sep 20, 2016 8:43 pm
by Rseding91
Remove the mod "dytech core" until he fixes his broken mod.

Re: Detected modification of the global 'log' function."

Posted: Tue Sep 20, 2016 8:48 pm
by Ratzap
Rseding91 wrote:Remove the mod "dytech core" until he fixes his broken mod.
Unfortunately not an option with 60 hours on this map. I'll bring it up in his thread though for sure.

It wasn't just Dytech either so I imagine a few authors will have to change their stuff.

Re: Detected modification of the global 'log' function."

Posted: Wed Sep 21, 2016 1:42 am
by devilwarriors
Just search "log" in their code and delete whatever function you find.. it's probably just a shortcut to log stuff to the console like I did.

Re: Detected modification of the global 'log' function."

Posted: Wed Sep 21, 2016 1:45 am
by devilwarriors
and what is this function for? there is not a single mention of a global function named log in the documentation..
Ah found what it does.
Would be nice if that was documented, it could be usefull to people..
Like I could draw dicks in the logs file and nobody would ever know it was me since the mod name is not indicated mouhahahaha

Re: Detected modification of the global 'log' function."

Posted: Wed Sep 21, 2016 1:54 am
by Rseding91
devilwarriors wrote:and what is this function for? there is not a single mention of a global function named log in the documentation..
Ah found what it does.
Would be nice if that was documented, it could be usefull to people..
Like I could draw dicks in the logs file and nobody would ever know it was me since the mod name is not indicated mouhahahaha
It does what the name suggests: it writes to the log file.

Re: Detected modification of the global 'log' function."

Posted: Sun Sep 25, 2016 2:31 am
by British_Petroleum
I deleted control.lua from all the dytech mods and it works now. No issues yet. I looked through the code briefly and it appears to be all debugging stuff.

Re: Detected modification of the global 'log' function."

Posted: Sun Sep 25, 2016 3:57 pm
by kasandraen
Rseding91 wrote:
devilwarriors wrote:and what is this function for? there is not a single mention of a global function named log in the documentation..
Ah found what it does.
Would be nice if that was documented, it could be usefull to people..
Like I could draw dicks in the logs file and nobody would ever know it was me since the mod name is not indicated mouhahahaha
It does what the name suggests: it writes to the log file.
May I ask why you removed the possibility to write to the log file?
I'll have to remove it from my releases of dytech no (not really an issues since I dont use the log eitherway) I'd just like to know?
Did you revceve a bunch of error reports with log full of shit since you decided to remove it?

Re: Detected modification of the global 'log' function."

Posted: Sun Sep 25, 2016 4:01 pm
by Klonan
kasandraen wrote:
Rseding91 wrote:
devilwarriors wrote:and what is this function for? there is not a single mention of a global function named log in the documentation..
Ah found what it does.
Would be nice if that was documented, it could be usefull to people..
Like I could draw dicks in the logs file and nobody would ever know it was me since the mod name is not indicated mouhahahaha
It does what the name suggests: it writes to the log file.
May I ask why you removed the possibility to write to the log file?
I'll have to remove it from my releases of dytech no (not really an issues since I dont use the log eitherway) I'd just like to know?
Did you revceve a bunch of error reports with log full of shit since you decided to remove it?
The ability to write to the log is still there,

The issue is overwriting the log function, like:

Code: Select all

function log()
   game.print("this is my own silly log function which overwrites the base game log function which isn't allowed anymore")
end

Re: Detected modification of the global 'log' function."

Posted: Sun Sep 25, 2016 4:09 pm
by Nexela
Dytech (and some other mods) were overwriting the built in log() function. Since all mods are in the same environment in the data stage this caused issues for other mods that used log()

The only change made here was that now it is no longer possible to overwrite the function. It is still available for use.

Re: Detected modification of the global 'log' function."

Posted: Sun Sep 25, 2016 4:40 pm
by kasandraen
Klonan wrote:
kasandraen wrote:
Rseding91 wrote:
devilwarriors wrote:and what is this function for? there is not a single mention of a global function named log in the documentation..
Ah found what it does.
Would be nice if that was documented, it could be usefull to people..
Like I could draw dicks in the logs file and nobody would ever know it was me since the mod name is not indicated mouhahahaha
It does what the name suggests: it writes to the log file.
May I ask why you removed the possibility to write to the log file?
I'll have to remove it from my releases of dytech no (not really an issues since I dont use the log eitherway) I'd just like to know?
Did you revceve a bunch of error reports with log full of shit since you decided to remove it?
The ability to write to the log is still there,

The issue is overwriting the log function, like:

Code: Select all

function log()
   game.print("this is my own silly log function which overwrites the base game log function which isn't allowed anymore")
end
Okay, I just removed it entirely. I'm not good enough with lua to bother with fixing it, as I dont use the logs eitherway(or rather know how).