Author Topic: [fixed] r3303: Savegames: Missing tileset causes unhandled segfault  (Read 668 times)

tomreyn

  • Local Moderator
  • Airship
  • ********
  • Posts: 2,764
    • View Profile
    • MegaGlest - the free and open source cross platform 3D real-time strategy game
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.

Code: [Select]
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.
« Last Edit: 14 July 2012, 19:30:41 by tomreyn »
atibox: Ryzen 1800X (8 cores @3.6GHz), 32 GB RAM, MSI Radeon RX 580 Gaming X 8G, PCI subsystem ID [1462:3417], (Radeon RX 580 chipset, POLARIS10) @3440x1440; latest stable Ubuntu release, (open source) radeon (amdgpu) / mesa video driver
atibox (old): Core2Quad Q9400 (4 cores @2.66GHz), 8 GB RAM, XFX HD-467X-DDF2, PCI subsystem ID [1682:2931], (Radeon HD 4670, RV730 XT) @1680x1050; latest stable Ubuntu release, (open source) radeon / mesa video driver
notebook: HP envy13d020ng
internet access: VDSL2+

· · · How YOU can contribute to MG · Latest development snapshot · How to build yourself · Megapack techtree · Currently hosted MG games · · ·

softcoder

  • MegaGlest Team
  • Battle Machine
  • ********
  • Posts: 2,239
    • View Profile
Re: r3303: Savegames: Missing tileset causes unhandled segfault
« Reply #1 on: 11 May 2012, 19:52:57 »
Fixed in svn

tomreyn

  • Local Moderator
  • Airship
  • ********
  • Posts: 2,764
    • View Profile
    • MegaGlest - the free and open source cross platform 3D real-time strategy game
Re: r3303: Savegames: Missing tileset causes unhandled segfault
« Reply #2 on: 14 July 2012, 19:30:28 »
Confirmed, thanks!
atibox: Ryzen 1800X (8 cores @3.6GHz), 32 GB RAM, MSI Radeon RX 580 Gaming X 8G, PCI subsystem ID [1462:3417], (Radeon RX 580 chipset, POLARIS10) @3440x1440; latest stable Ubuntu release, (open source) radeon (amdgpu) / mesa video driver
atibox (old): Core2Quad Q9400 (4 cores @2.66GHz), 8 GB RAM, XFX HD-467X-DDF2, PCI subsystem ID [1682:2931], (Radeon HD 4670, RV730 XT) @1680x1050; latest stable Ubuntu release, (open source) radeon / mesa video driver
notebook: HP envy13d020ng
internet access: VDSL2+

· · · How YOU can contribute to MG · Latest development snapshot · How to build yourself · Megapack techtree · Currently hosted MG games · · ·

 

anything