Today I gave savegames another try. The game now handles the situation where a map or a techtree is missing (a situation you may well run into when sharing savegames between players) graciously, displaying a message box without crashing. That's pretty nice from a user perspective.
This does not yet work for missing tilesets, though. If a
tileset given in a savegame is not available, the game will segfault immediately. Its own segfault handler doesn't get started in this case.
My dev_rungame script runs 'megaglest' (the binary) without further arguments, then, if the game crashes with a core file, it runs
gdb -q -n -ex "thread apply all bt full" -batch megaglest core, i.e. a full thread backtrace. The output below is cut off,
please find the entire output here.
tomreyn@atibox:~/SCM/megaglest-trunk/mk/linux$ ./dev_rungame
megaglest: /home/tomreyn/SCM/megaglest-trunk/source/shared_lib/sources/util/randomgen.cpp:51: int Shared::Util::RandomGen::randRange(int, int): Assertion `min<=max' failed.
megaglest v3.6.1-dev
Compiled using: GNUC: 40603 [64bit] on: May 11 2012 09:49:54
SVN: [Rev: 3303M] - using STREFLOP [SSE] - [no-denormals]
Segmentation fault detected, analyzing...
[New LWP 12207]
[New LWP 12211]
[New LWP 12215]
[New LWP 12220]
[New LWP 12217]
[New LWP 12221]
[New LWP 12219]
[New LWP 12213]
[New LWP 12218]
[New LWP 12210]
warning: Can't read pathname for load map: Input/output error.
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/lib/x86_64-linux-gnu/libthread_db.so.1".
64 ../nptl/sysdeps/unix/sysv/linux/raise.c: File or directory not found.
Core was generated by `./megaglest'.
Program terminated with signal 6, Aborted.
#0 0x00007f4e6ee41445 in __GI_raise (sig=<optimized out>) at ../nptl/sysdeps/unix/sysv/linux/raise.c:64
Please have a look at the second line of the output, too:
megaglest: /home/tomreyn/SCM/megaglest-trunk/source/shared_lib/sources/util/randomgen.cpp:51: int Shared::Util::RandomGen::randRange(int, int): Assertion `min<=max' failed.This also looks wrong to me and may or may not be related.