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

How to use GDB?

fyalhed

Member
Joined
Nov 18, 2017
Messages
156
Reaction score
20
Something is wrong in my source code, when i open my server show me Segmentation fault and after close.
If i use my clean code without modifications it still online without problems

I need to open with GDB to know where is the problem

I've apt-get install gbd, so created this script (like i saw in a tutorial)
autorestart.sh
Code:
#!/bin/bash
ulimit -c unlimited
while true;
do
echo "Restart : `date +%d-%m-%Y--%H:%M`" >> ./restart.log
./tfs --log-file "output.txt" "error.txt"
sleep 10
done

So when crash, show me this:
Code:
[18:0:19.379] >> WarriorsOtserver server Online!
./autorestart.sh: line 8: 7696 Segmentation fault (core dumped) ./tfs --log-file "output.txt" "error.txt"
[18:0:42.512] The Forgotten Server 0.4
[18:0:42.512] >> Loading config (config.lua)

But it's not creating output.txt and error.txt on server file
And if i create that, it still empty

It's just creating i file called core at server file
 
Back
Top