Author Topic: [fixed] v3.6.0 crashes with broken maps  (Read 1626 times)

tomreyn

  • Local Moderator
  • Airship
  • ********
  • Posts: 2,764
    • View Profile
    • MegaGlest - the free and open source cross platform 3D real-time strategy game
[fixed] v3.6.0 crashes with broken maps
« on: 4 December 2011, 09:28:53 »
Unfortunately the 3.6.0 headless server seems to segfault on load. Please find below the output my development system throws (I also reproduced this on a real dedicated server, though):

Code: [Select]
$ ./dev_rungame --ini-path=./ --data-path=./ --headless-server-mode=vps,exit
Disabled reading from console [vps]
Forcing quit after game has completed [exit]
v3.6.0-GNUC: 40601 [64bit]-Dec  4 2011 10:21:24, SVN: [Rev: 2954M], [STREFLOP]
Waiting for players to join and start a game...
In [/home/tomreyn/SCM/megaglest-trunk/source/glest_game/main/main.cpp::handleSIGSEGV Line: 651] Error detected: signal 11:
Error saved to logfile [/home/tomreyn/.megaglest/error.log]
[2011-12-04 10:24:40] *ERROR* In [/home/tomreyn/SCM/megaglest-trunk/source/glest_game/main/main.cpp::handleRuntimeError Line: 416] [In [/home/tomreyn/SCM/megaglest-trunk/source/glest_game/main/main.cpp::handleSIGSEGV Line: 651] Error detected: signal 11:
] gameInitialized = 0, program = 0x2ba3900
[2011-12-04 10:24:41] *ERROR* In [/home/tomreyn/SCM/megaglest-trunk/source/glest_game/main/main.cpp::handleRuntimeError Line: 509] [In [/home/tomreyn/SCM/megaglest-trunk/source/glest_game/main/main.cpp::handleSIGSEGV Line: 651] Error detected: signal 11:

Stack Trace:
./megaglest() [0x5be932] address [0x5be932] line: 655
/lib/x86_64-linux-gnu/libc.so.6:() address [0x7f932bf35420] line: 0
./megaglest:Glest::Game::MenuStateCustomGame::MenuStateCustomGame(Glest::Game::Program*, Glest::Game::MainMenu*, bool, Glest::Game::ParentMenuState, bool, Glest::Game::GameSettings*, bool) address [0x692d83] line: 828
./megaglest:Glest::Game::Program::initServer(Shared::Platform::WindowGl*, bool, bool, bool) address [0x5de744] line: 211
./megaglest:Glest::Game::glestMain(int, char**) address [0x5c74c8] line: 3309
./megaglest:Glest::Game::glestMainWrapper(int, char**) address [0x5cb61c] line: 3739
/lib/x86_64-linux-gnu/libc.so.6:__libc_start_main() address [0x7f932bf2030d] line: 0
./megaglest() [0x4a3589] address [0x4a3589] line: 0
]
******************************************************
    #2 An error occurred and MegaGlest will close.
Error msg = [In [/home/tomreyn/SCM/megaglest-trunk/source/glest_game/main/main.cpp::handleSIGSEGV Line: 651] Error detected: signal 11:

Stack Trace:
./megaglest() [0x5be932] address [0x5be932] line: 655
/lib/x86_64-linux-gnu/libc.so.6:() address [0x7f932bf35420] line: 0
./megaglest:Glest::Game::MenuStateCustomGame::MenuStateCustomGame(Glest::Game::Program*, Glest::Game::MainMenu*, bool, Glest::Game::ParentMenuState, bool, Glest::Game::GameSettings*, bool) address [0x692d83] line: 828
./megaglest:Glest::Game::Program::initServer(Shared::Platform::WindowGl*, bool, bool, bool) address [0x5de744] line: 211
./megaglest:Glest::Game::glestMain(int, char**) address [0x5c74c8] line: 3309
./megaglest:Glest::Game::glestMainWrapper(int, char**) address [0x5cb61c] line: 3739
/lib/x86_64-linux-gnu/libc.so.6:__libc_start_main() address [0x7f932bf2030d] line: 0
./megaglest() [0x4a3589] address [0x4a3589] line: 0
]

Please report this bug to  http://bugs.megaglest.org
******************************************************

Segmentation fault detected, analyzing...

warning: [New LWP 8227]
[New LWP 8232]
Can't read pathname for load map: Eingabe-/Ausgabefehler.
[Thread debugging using libthread_db enabled]
64    ../nptl/sysdeps/unix/sysv/linux/raise.c: Datei oder Verzeichnis nicht gefunden.
Core was generated by `./megaglest --ini-path=./ --data-path=./ --headless-server-mode=vps,exit'.
Program terminated with signal 6, Aborted.
#0  0x00007f932bf353a5 in __GI_raise (sig=6) at ../nptl/sysdeps/unix/sysv/linux/raise.c:64
    in ../nptl/sysdeps/unix/sysv/linux/raise.c
#0  0x00007f932bf353a5 in __GI_raise (sig=6) at ../nptl/sysdeps/unix/sysv/linux/raise.c:64
#1  0x00007f932bf38b0b in __GI_abort () at abort.c:92
#2  0x00000000005cff40 in Glest::Game::ExceptionHandler::handleRuntimeError (msg=<optimized out>) at /home/tomreyn/SCM/megaglest-trunk/source/glest_game/main/main.cpp:602
#3  0x00000000005be932 in Glest::Game::handleSIGSEGV (sig=<optimized out>) at /home/tomreyn/SCM/megaglest-trunk/source/glest_game/main/main.cpp:655
#4  <signal handler called>
#5  push_back (__x=..., this=0x862a7a200) at /usr/include/c++/4.6/bits/stl_vector.h:828
#6  Glest::Game::MenuStateCustomGame::MenuStateCustomGame (this=0x2c14820, program=<optimized out>, mainMenu=<optimized out>, openNetworkSlots=true, parentMenuState=Glest::Game::pNewGame, autostart=<optimized out>, settings=0x0, masterserverMode=true) at /home/tomreyn/SCM/megaglest-trunk/source/glest_game/menu/menu_state_custom_game.cpp:196
#7  0x00000000005de744 in Glest::Game::Program::initServer (this=0x2ba3900, window=<optimized out>, autostart=false, openNetworkSlots=true, masterserverMode=true) at /home/tomreyn/SCM/megaglest-trunk/source/glest_game/main/program.cpp:211
#8  0x00000000005c74c8 in Glest::Game::glestMain (argc=4, argv=0x7ffff554e968) at /home/tomreyn/SCM/megaglest-trunk/source/glest_game/main/main.cpp:3200
#9  0x00000000005cb61c in Glest::Game::glestMainWrapper (argc=4, argv=0x7ffff554e968) at /home/tomreyn/SCM/megaglest-trunk/source/glest_game/main/main.cpp:3737
#10 0x00007f932bf2030d in __libc_start_main (main=0x49e420 <main(int, char**)>, argc=4, ubp_av=0x7ffff554e968, init=<optimized out>, fini=<optimized out>, rtld_fini=<optimized out>, stack_end=0x7ffff554e958) at libc-start.c:226
#11 0x00000000004a3589 in _start ()

[small]Edit (tomreyn): Renamed this topic since it is about broken maps, not specific to headless server; add [fixed] tag[/small]
« Last Edit: 5 December 2011, 06:28:16 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: 3.6.0 headless server segfaults on load
« Reply #1 on: 4 December 2011, 10:48:34 »
Not exacty sure what is going on here but notice this part of the error:

Can't read pathname for load map: Eingabe-/Ausgabefehler.

What exactly is this weird name??

Also note, that when i run the headless with the same parameters I am able to connect and launch a game without any such error.
« Last Edit: 4 December 2011, 10:54:07 by softcoder »

titi

  • MegaGlest Team
  • Airship
  • ********
  • Posts: 4,240
    • View Profile
    • http://www.titusgames.de
Re: 3.6.0 headless server segfaults on load
« Reply #2 on: 4 December 2011, 11:43:57 »
Can't read pathname for load map: Eingabe-/Ausgabefehler.

is:
Can't read pathname for load map: Input-/Output error
Try Megaglest! Improved Engine / New factions / New tilesets / New maps / New scenarios

tomreyn

  • Local Moderator
  • Airship
  • ********
  • Posts: 2,764
    • View Profile
    • MegaGlest - the free and open source cross platform 3D real-time strategy game
Re: 3.6.0 headless server segfaults on load
« Reply #3 on: 4 December 2011, 13:07:16 »
I've always had the Can't read pathname for load map: input/output error - that's not new, and probably not the cause for this issue either: This part of the output is generated by gdb which is analyzing the core file which was written to disk after the game crashed and after its own stacktrace analyzer has done its work already (producing the stacktrace found twice above this message).

When I said I reproduced the bug I saw locally (whose log I posted above) on a dedicated server, then I was wrong there. I was tricked by the data package which contains a megaglest-3.6.0 subdirectory, causing these files to get extracted to said subdirectory and not being available to the game in the expected location (causing the game to fall flat on its face (?) when I tried to run it this way). So the dedicated is fine now and actually shows up onthe master server now - just PEBKAC there. However, the local issue prevails.
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 · · ·

tomreyn

  • Local Moderator
  • Airship
  • ********
  • Posts: 2,764
    • View Profile
    • MegaGlest - the free and open source cross platform 3D real-time strategy game
Re: 3.6.0 headless server segfaults on load
« Reply #4 on: 5 December 2011, 03:35:56 »
This finally turned out to be due to a broken map. Softcoder is working on a validation to prevent such situations in the future.

If you run into this issue, as a workaround, rename UserData_Root/maps to UserData_Root/maps-broken, then copy back the maps from UserData_Root/maps-broken to UserData_Root/maps one by one, starting the game after each map you copied back in place.

Alternatively, use a development build or r2957 or later and run it from a terminal window, it will show an error message which lists the problematic map (which you can then delete or move to a different directory).
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: v3.6.0 crashes with broken maps
« Reply #5 on: 5 December 2011, 05:34:34 »
svn now displays a report about corrupt maps and filters them out from any lists. Also language issues are fixed as well for users with old reference to renamed languages. Alternately user could always force MG to start in their desired language via commandline:

--use-language=german

or whatever language. Also accept is your languages iso639-1 code, example chinese is:

--use-language=zh

Then you can go into the options menu and save the new language setting. The next minor release will have these changes.

 

anything