Segmentation fault.

Posted by Scalar on Fri 13 Nov 2015 12:43 AM — 3 posts, 18,913 views.

#0
Okay, so I tried adding in a snippet for extra2 flags and the rom failed to start with a segmentation fault. I removed all newly added code and it says "ready to rock of port 4000", then segmentation fault right under that. I read the gdb on this forum but I can't even make it to the second part because this is all it reads:

Core was generated by `../src/rom 4000'.
Program terminated with signal SIGSEGV, Segmentation fault.
#0 0x080904fd in ?? ()

That, to me, doesn't seem like a whole lot of info to go on. Any suggestions?
USA Global Moderator #1
dFirst, compile in debug mode.

Then, the only useful way to debug a crash with gdb is to try to get a backtrace from the point of the crash. So either get a core dump file if your system generates them or run the server from inside gdb and then wait for it to crash and then "bt".
Amended on Fri 13 Nov 2015 04:35 PM by Fiendish
Australia Forum Administrator #2
If you follow my post about gdb you should in fact be able to narrow it down quite a lot.

http://www.gammon.com.au/gdb