Author Topic: [fixed] r3217: Savegames: Segfault/no human friendly message with missing maps  (Read 550 times)

tomreyn

  • Local Moderator
  • Airship
  • ********
  • Posts: 2,764
    • View Profile
    • MegaGlest - the free and open source cross platform 3D real-time strategy game
While loading a savegame (see note below) which uses a map not available on my system, I ran into this:

Code: [Select]
$ LANG=en_US.utf-8 ./dev_rungame
megaglest v3.6.1-dev
Compiled using: GNUC: 40601 [64bit] on: Apr  2 2012 12:42:52
SVN: [Rev: 3217M] - using STREFLOP [SSE] - [no-denormals]
[2012-04-02 14:59:35] *ERROR* In [program.cpp::setState Line: 590]
Error [Map not found [Doesnt Exist]
Scenario []]
In [/home/tomreyn/SCM/megaglest-trunk/source/glest_game/main/main.cpp::handleSIGSEGV Line: 634] Error detected: signal 11:
Error saved to logfile [/home/tomreyn/.megaglest/error.log]

Segmentation fault detected, analyzing...

warning: Can't read pathname for load map: Input/output error.
[Thread debugging using libthread_db enabled]
Core was generated by `./megaglest'.
Program terminated with signal 11, Segmentation fault.
#0  Glest::Game::Game::checkWinnerStandard (this=0x7f570c802f50) at /home/tomreyn/SCM/megaglest-trunk/source/glest_game/game/game.cpp:3225
3225        if(this->masterserverMode == true || world.getThisFaction()->getPersonalityType() == fpt_Observer) {
#0  Glest::Game::Game::checkWinnerStandard (this=0x7f570c802f50) at /home/tomreyn/SCM/megaglest-trunk/source/glest_game/game/game.cpp:3225
#1  0x000000000055da55 in checkWinner (this=0x7f570c802f50) at /home/tomreyn/SCM/megaglest-trunk/source/glest_game/game/game.cpp:3216
#2  Glest::Game::Game::tick (this=0x7f570c802f50) at /home/tomreyn/SCM/megaglest-trunk/source/glest_game/game/game.cpp:1722
#3  0x000000000063df6a in Glest::Game::Program::loopWorker (this=0x7f570c000b90) at /home/tomreyn/SCM/megaglest-trunk/source/glest_game/main/program.cpp:461
#4  0x0000000000634345 in Glest::Game::ExceptionHandler::handleRuntimeError (msg=<optimized out>) at /home/tomreyn/SCM/megaglest-trunk/source/glest_game/main/main.cpp:512
#5  0x000000000061da22 in Glest::Game::handleSIGSEGV (sig=<optimized out>) at /home/tomreyn/SCM/megaglest-trunk/source/glest_game/main/main.cpp:638
#6  <signal handler called>
#7  Glest::Game::Game::checkWinnerStandard (this=0x7f570c802f50) at /home/tomreyn/SCM/megaglest-trunk/source/glest_game/game/game.cpp:3225
#8  0x000000000055da55 in checkWinner (this=0x7f570c802f50) at /home/tomreyn/SCM/megaglest-trunk/source/glest_game/game/game.cpp:3216
#9  Glest::Game::Game::tick (this=0x7f570c802f50) at /home/tomreyn/SCM/megaglest-trunk/source/glest_game/game/game.cpp:1722
#10 0x000000000063df6a in Glest::Game::Program::loopWorker (this=0x7f570c000b90) at /home/tomreyn/SCM/megaglest-trunk/source/glest_game/main/program.cpp:461
#11 0x000000000062aca6 in Glest::Game::glestMain (argc=<optimized out>, argv=<optimized out>) at /home/tomreyn/SCM/megaglest-trunk/source/glest_game/main/main.cpp:4140
#12 0x000000000062e0d6 in Glest::Game::glestMainWrapper (argc=1, argv=0x7fff98d7d1b8) at /home/tomreyn/SCM/megaglest-trunk/source/glest_game/main/main.cpp:4296
#13 0x00007f571c8de30d in __libc_start_main (main=0x4ab0c0 <main(int, char**)>, argc=1, ubp_av=0x7fff98d7d1b8, init=<optimized out>, fini=<optimized out>, rtld_fini=<optimized out>, stack_end=0x7fff98d7d1a8) at libc-start.c:226
#14 0x00000000004b0539 in _start ()

Please note that I manually edited an existing savegame to create this situation, replacing all occurrences of the previous techtree "megapack" by "doesntexist". Before this modification was made, this savegame loaded fine. If this is not a proper test case, please say so.

The game first displays a human friendly error message on screen here, saying something about a map not existing / not found. Unfortunatey this message gets immediately overwritten by another message window which displays a partial stacktrace, which is then immediately followed by the game crashing. So while this may not be a bug, this is not really user friendly, yet.
« Last Edit: 2 April 2012, 20:02:14 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
Fixed in svn rev #3218

tomreyn

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