Page 1 of 1

segmentation fault

PostPosted: Wed Dec 28, 2011 17:10
by jordan4ibanez
my server will hit a segmentation fault randomly...why is this?

it is not my hardware though

PostPosted: Thu Dec 29, 2011 17:33
by strasbur
Another segfault, this time not a random one, occurs with 0.3.1, immediately after starting the game in creative mode.
More info (output from the program, backtrace from gdb and content of debug.txt) is available here: http://chkw386.ch.pwr.wroc.pl/~strasbur/minetest.err .
Note the following message:
INFO: Initial run of init_mapnode with g_texturesource=NULL. If this segfaults, there is a bug with something not checking for the NULL value.
I hope it helps. BTW, 0.2 works OK with exactly the same settings.

PostPosted: Thu Dec 29, 2011 19:50
by dannydark
@jordan4ibanez IIRC there is a random segfault that celeron55 knows about an "Assertion '0' failed" (I think) could you post the lines relevant to the crash from your debug.txt here so we will have a better idea of what the error is.

-----------------------------------------------------

@strasbur looking at your log its the last line that is the problem "5: Bind failed: Address already in use" which means that something is already using that ip:port do you have two instances of the game running? also is this when trying to play single player or when you are running a server?

The line you highlighted in your post is always added to the log and is just an info line meaning if it was to segfault while running the init_mapnode then the problem is with something not checking for the NULL value, this line can be ignored unless it did segfault before "INFO: Full run of init_mapnode with g_texturesource!=NULL" was outputted.

Hope this helps fix your problem.

PostPosted: Thu Dec 29, 2011 20:18
by jordan4ibanez
it was in 0.4 and i realized it was either from a mod or me constantly restarting the server forcefully which i believe corrupted the game

PostPosted: Thu Dec 29, 2011 20:46
by strasbur
@dannydark There was only one game instance, in single player mode. I repeated it a few times and the game always crashed, if creative mode was enabled. It doesn't crash with creative mode disabled, but then exiting the game never finishes - the process simply goes to sleep and I have to kill it manually.
BTW, that message about "address in use" was not repeatable - maybe I ran two instances by mistake that time. Content of debug.txt from a second (crashed) run is appended to my report file (same URL as previously).
It seems that the server thread has been started succesfully this time and client thread has connected to that "server" too.
The segfault occurs always in the same place in irrlich library, with the same backtrace (shown by gdb).

PostPosted: Thu Dec 29, 2011 21:36
by strasbur
A little more info - I tried to enable these "fanciness" parameters (fancy trees, smooth lighting, 3d clouds and opaque water - i disable them normally for performance reasons) and _one time_ the game didn't crash.
Unfortunately, it has happened only once and next run with the same settings ended as usually. So, I would suspect an uninitialized variable, probably a local one.
And something new from gdb - things are really not fully repeatable:
ExtrudedSpriteSceneNode::extrude (this=0x85263d8, texture=0x8549540)
at /usr/local/include/irrlicht/IReferenceCounted.h:121
121 --ReferenceCounter;