• There is NO official Otland's Discord server and NO official Otland's server list. The Otland's Staff does not manage any Discord server or server list. Moderators or administrator of any Discord server or server lists have NO connection to the Otland's Staff. Do not get scammed!

TFS 1.X+ Crash Server SIGSEGV, Segmentation fault

QuebradaZN

Member
Joined
May 5, 2019
Messages
43
Solutions
3
Reaction score
6
In some function called from addEvent there is creature:getName() or player:getName() and it's called on creature that does not exist.
You cannot read anything more from that log. You got to search in all files in data folder for addEvent and check every function called by it.

Why calling function on removed creature crash server:
 
I reviewed all the scripts, my eyes and head hurt, I will review again!
Do you have any scripting tips that call the addevent function and have getName in it? :(
thx
 
Do you have any scripting tips that call the addevent function and have getName in it?
I would not search for function that execute getName inside addEvent call.
I would search for addEvent that pass creature or player as parameter to function (which it should never do). It's most common mistake.

As I showed in [TFS 1.x+] How to NOT write LUA scripts or how to crash server by LUA script (https://otland.net/threads/tfs-1-x-how-to-not-write-lua-scripts-or-how-to-crash-server-by-lua-script.271018/)
TFS has code that protect from simple bugged scripts:
Code:
data/talkactions/scripts/crashAddEvent.lua:onSay
luaAddEvent(). Argument #3 is unsafe
Check, if you got in config.lua configuration:
Code:
-- Scripts
warnUnsafeScripts = true
convertUnsafeScripts = true
As I described in my tutorial, it cannot protect from every bug.
Scripter can pass player as element of table and TFS won't detect it.
There may be also some global variable used to share data with addEvent function.
 
I would not search for function that execute getName inside addEvent call.
I would search for addEvent that pass creature or player as parameter to function (which it should never do). It's most common mistake.

As I showed in [TFS 1.x+] How to NOT write LUA scripts or how to crash server by LUA script (https://otland.net/threads/tfs-1-x-how-to-not-write-lua-scripts-or-how-to-crash-server-by-lua-script.271018/)
TFS has code that protect from simple bugged scripts:
Code:
data/talkactions/scripts/crashAddEvent.lua:onSay
luaAddEvent(). Argument #3 is unsafe
Check, if you got in config.lua configuration:
Code:
-- Scripts
warnUnsafeScripts = true
convertUnsafeScripts = true
As I described in my tutorial, it cannot protect from every bug.
Scripter can pass player as element of table and TFS won't detect it.
There may be also some global variable used to share data with addEvent function.
In config.lua warnUnsafeScripts and convertUnsafeScripts are enabled, I'll do the research more carefully
thx
Post automatically merged:

I have a question, where do I see this scriptid?
the logs tell me this timerEventDesc = {scriptId = 1016, function = 219, parameters
 
Last edited:
Back
Top