Segmentation Fault
I am new to Linux, and my server has a segmentation fault when I try to start it, which I've been researching so I sorta understand what it is and what's happened. But I am at a loss at things to try in order to get it fixed.
Here's the output if it helps: Code:
eqemu@xxxxxxxx:~/server$ ./start |
post the contents of your world log.
|
logs/world:
Code:
[Debug] Starting Log: logs/eqemu_debug_world.log |
If you have a core.xxxxx (xxxxx is numbers) file in the directory where world is then you can open it with gdb and get a trace of where the crash happened.
In that directory type gdb world core.xxxx, then type bt after it loads and post that stack trace. If there is no core file then you can run world in gdb by navigating to the directory where it is, typing gdb world, then run once it starts. If it crashes type bt to get the stack trace. |
Wow, gdb, who knew. I had to go find it and install it, but now I've got it to use. Thanks!
There was not core file of any sort that you mentioned so I ran gdb world. Code:
eqemu@xxxxxx:~/server$ gdb world |
Ok, there's something wrong with your items database. If I had to guess I'd say one of the columns is NULL where it is using atoi to extract a number from a string.
Run it under gdb again and let it crash. Type up until the SharedDatabase::DBLoadItems frame is selected. Type list and hopefully it will show you the line in the source code where it crashed so you can tell what column it is. You might be able to figure out exactly which item it is by typing print item, print item.Name, or print item.ID. That's assuming that those were parsed successfully before the crash happened. It's been a while since I used gdb every day, so I might be a little fuzzy on the commands, but hopefully this will help you narrow it down a bit. |
Thanks very much, this was very helpful.
I am still building this server, so I just re-sourced the whole db since it only takes a few minutes, and that fixed it. I have never experienced a Segmentation Fault before and I was worried that the OS had broken or possibly a hardware problem. But it was just the db, no problem. Thanks again. |
Quote:
Code:
apt-get install gdb |
Ok, so I got this same problem again, another Segmentation Fault. So I dived into gdb some more like you said lerxst and sure enough you were right.
In game I have a SQL sproc that adds an item to the db and I didn't do some of the columns right and they were coming out NULL, and it was trying to atoi one of those columns. Thanks for the help, I would have never tracked that bug down without you. :grin: |
All times are GMT -4. The time now is 02:11 AM. |
Powered by vBulletin®, Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.