Drive there! No! Don't seg-fault!

Our old place to report Bugs, it's not used anymore. To report bugs, please read this topic.
Locked
User avatar
me1
Greenhorn
Posts: 11
Joined: 14 Apr 2007, 04:13

Drive there! No! Don't seg-fault!

Post by me1 »

Warzone2100 Version
Warzone 2100 - Version TRUNK - Built Apr 11 2007

Operating System
Ubuntu Linux 6.10

Hardware Information
Graphics card: Nvidia GeForce 6200se
Graphics Driver: Nvidia GLX
Sound Card: Griffin iMic
Sound Driver: ALSA

Warzone2100 Configuration
--fullscreen (and --window)
--shadows (and --noshadows)
--sound (and --nosound)

Bug Description
It is campaign 1, the third mission via transport
I send units to a certian area and it seg-faults. Image of where.
Terminal spat out this.
Everything except "Segmentation fault (core dumped)" happened before the crash.
Giel
Regular
Regular
Posts: 725
Joined: 26 Dec 2006, 19:18
Contact:

Re: Drive there! No! Don't seg-fault!

Post by Giel »

What revision are you using?

Also it would be nice if you could provide a backtrace using gdb.
"First make sure it works good, only then make it look good." -- Giel
Want to tip/donate? bitcoin:1EaqP4ZPMvUffazTxm7stoduhprzeabeFh
User avatar
me1
Greenhorn
Posts: 11
Joined: 14 Apr 2007, 04:13

Re: Drive there! No! Don't seg-fault!

Post by me1 »

I'm using revision 1118.
at segmentation fault I got this:
Program received signal SIGSEGV, Segmentation fault.
[Switching to Thread -1223501200 (LWP 9917)]
0x080ab2b0 in map_Height (x=55, y=3368874383) at map.c:1338
1338            if(TERRAIN_TYPE(mapTile(tileX,tileY)) == TER_WATER)
the rest was like the text file I linked to in the first post.
Giel
Regular
Regular
Posts: 725
Joined: 26 Dec 2006, 19:18
Contact:

Re: Drive there! No! Don't seg-fault!

Post by Giel »

me1 wrote: I'm using revision 1118.
at segmentation fault I got this:

Code: Select all

Program received signal SIGSEGV, Segmentation fault.
[Switching to Thread -1223501200 (LWP 9917)]
0x080ab2b0 in map_Height (x=55, y=3368874383) at map.c:1338
1338            if(TERRAIN_TYPE(mapTile(tileX,tileY)) == TER_WATER)
the rest was like the text file I linked to in the first post.
Well, I now why it segfaults: that y=3368874383 is way off the scale. I'm just not sure where it gets that y from.

So if you could compile with debugging enabled:

Code: Select all

./configure --enable-debug=strict
(if that doesn't compile use --enable-debug=yes instead)

and then start warzone in gdb like this (in the src/ directory):

Code: Select all

gdb ./warzone2100
(gdb) run
Then when it crashes type this in gdb:

Code: Select all

(gdb) bt full
("bt" is shorthand for backtrace, so "backtrace full" would work just as well)

Then please post the result from that `bt full` command here, that way we can try to determine what causes it.

What might also help is if you'd attach a savegame just before the segfault (savegames are found in ~/.warzone2100/savegames/, the needed files are the .gam and .es file plus the folder with the savegame's name).

PS compiling with debugging enabled might cause WZ to SIGABRT before SIGSEGV is sent (it probably will do that just before you could have a segfault, since there is debug code there that checks for invalid x and y values), this won't necessarily make a backtrace less usefull.
"First make sure it works good, only then make it look good." -- Giel
Want to tip/donate? bitcoin:1EaqP4ZPMvUffazTxm7stoduhprzeabeFh
User avatar
me1
Greenhorn
Posts: 11
Joined: 14 Apr 2007, 04:13

Re: Drive there! No! Don't seg-fault!

Post by me1 »

odd....
I started a new campaign to see what would happen (not too far in with the first) and it didn't happen this time....
Locked