• 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!

Linux Segmentation fault

Ysupport

New Member
Joined
Mar 12, 2017
Messages
3
Reaction score
0
Hello my TFS 0.3.6 with clien 8.60 got crashed last night, and the only error i saw in my console was

"segmentation fault"

How can i find out why it crashes and i would be happy if someone helps me out to fix this crashes ;/


Kind regards,
 
But its also not easy to update the tfs version to new one with all scripts still work, or u goes it will be the easier way to fix this ?
And how do i do the debuggin with gdb..?
 
Last edited:
But its also not easy to update the tfs version to new one with all scripts still work, or u goes it will be the easier way to fix this ?
And how do i do the debuggin with gdb..?

You will have to put in some work sure, but start fresh with a clean 1.2/1.3 datapack.
Add your map, add your custom scripts and then check everything, you might have to tweak formulas of spells, add functions from your lib folder etc etc
But compat.lua (forgottenserver/compat.lua at master · otland/forgottenserver · GitHub) does most of the work for you.

You should how ever aim to remove compat.lua by converting all the scripts.

And BTW if you were to do this or start on another server etc ALWAYS create a new directory ex data/actions/scripts/custom and add your files in there, don't use the default paths, leave them alone.
This will make it a billion times easier when converting your server to another server.
 
I'll just add that segmentation fault means you're trying to access some part of memory you do not have access to.

So, for example, if you declared an array:
C++:
int32_t stats[STAT_LAST] = { 0 };
which would create stats[0], stats[1], (...), stats[STAT_LAST-1] and then tried to access stats[STAT_LAST], which hasn't been declared, you would get a segmentation fault.
 
Back
Top