Author Topic: [fixed] r3166: savegame menu: segfault when deleting without prior selection  (Read 606 times)

tomreyn

  • Local Moderator
  • Airship
  • ********
  • Posts: 2,764
    • View Profile
    • MegaGlest - the free and open source cross platform 3D real-time strategy game
In the savegame menu, when you select a savegame, then delete it, you end up with the list of available savesgames, none of which are selected. If you then click on "delete game" again, nothing should happen, but instead the game segfaults:

error.log:
Code: [Select]
[2012-03-20 14:52:39] Runtime Error information:
======================================================
In [/home/tomreyn/SCM/megaglest-trunk/source/glest_game/main/main.cpp::handleSIGSEGV Line: 649] Error detected: signal 11:

Stack Trace:
./megaglest() [0x609a92] address [0x609a92] line: 653
/lib/x86_64-linux-gnu/libc.so.6:() address [0x7ff9c9fdc420] line: 0
./megaglest:Glest::Game::MenuStateLoadGame::mouseClick(int, int, Shared::Platform::MouseButton) address [0x6fbebb] line: 239
./megaglest:Glest::Game::MainWindow::eventMouseDown(int, int, Shared::Platform::MouseButton) address [0x5f90e4] line: 729
./megaglest:Shared::Platform::Window::handleMouseDown(SDL_Event) address [0x927176] line: 604
./megaglest:Shared::Platform::Window::handleEvent() address [0x927d99] line: 153
./megaglest:Glest::Game::glestMain(int, char**) address [0x61535f] line: 3762
./megaglest:Glest::Game::glestMainWrapper(int, char**) address [0x617276] line: 4006
/lib/x86_64-linux-gnu/libc.so.6:__libc_start_main() address [0x7ff9c9fc730d] line: 0
./megaglest() [0x4add09] address [0x4add09] line: 0

gdb backtrace:
Code: [Select]
Program terminated with signal 11, Segmentation fault.
#0  Glest::Game::Renderer::getCentered3DPos (text=..., font=0x0, pos=..., w=90, h=22, centeredW=true, centeredH=true, this=<optimized out>) at /home/tomreyn/SCM/megaglest-trunk/source/glest_game/graphics/renderer.cpp:8413
8413    }}//end namespace
#0  Glest::Game::Renderer::getCentered3DPos (text=..., font=0x0, pos=..., w=90, h=22, centeredW=true, centeredH=true, this=<optimized out>) at /home/tomreyn/SCM/megaglest-trunk/source/glest_game/graphics/renderer.cpp:8413
#1  0x00000000005b8d43 in Glest::Game::Renderer::renderTextBoundingBox3D (this=0xc51240, text=..., font=0x0, color=..., x=<optimized out>, y=<optimized out>, w=90, h=22, centeredW=true, centeredH=true) at /home/tomreyn/SCM/megaglest-trunk/source/glest_game/graphics/renderer.cpp:2517
#2  0x00000000005b9295 in Glest::Game::Renderer::renderButton (this=0xc51240, button=0x1fc87f0, fontColorOverride=<optimized out>, lightedOverride=0x0) at /home/tomreyn/SCM/megaglest-trunk/source/glest_game/graphics/renderer.cpp:2835
#3  0x00000000005bb5c9 in renderButton (button=0x1fc87f0, this=<optimized out>, fontColorOverride=<optimized out>, lightedOverride=<optimized out>) at /home/tomreyn/SCM/megaglest-trunk/source/glest_game/graphics/renderer.cpp:2725
#4  Glest::Game::Renderer::renderMessageBox (this=0xc51240, messageBox=0x1fb1bf0) at /home/tomreyn/SCM/megaglest-trunk/source/glest_game/graphics/renderer.cpp:3266
#5  0x0000000000626754 in Glest::Game::Program::renderProgramMsgBox (this=0x1fb1ba0) at /home/tomreyn/SCM/megaglest-trunk/source/glest_game/main/program.cpp:476
#6  0x00000000006f90d8 in Glest::Game::MenuStateLoadGame::render (this=0x7ff9b80f0ca0) at /home/tomreyn/SCM/megaglest-trunk/source/glest_game/menu/menu_state_load_game.cpp:386
#7  0x00000000006a24df in Glest::Game::MainMenu::render (this=0x25da110) at /home/tomreyn/SCM/megaglest-trunk/source/glest_game/menu/main_menu.cpp:121
#8  0x000000000062587c in Glest::Game::Program::loopWorker (this=0x1fb1ba0) at /home/tomreyn/SCM/megaglest-trunk/source/glest_game/main/program.cpp:391
#9  0x000000000061c36d in Glest::Game::ExceptionHandler::handleRuntimeError (msg=<optimized out>) at /home/tomreyn/SCM/megaglest-trunk/source/glest_game/main/main.cpp:524
#10 0x0000000000609a92 in Glest::Game::handleSIGSEGV (sig=<optimized out>) at /home/tomreyn/SCM/megaglest-trunk/source/glest_game/main/main.cpp:653
#11 <signal handler called>
#12 0x00000000006fbebb in Glest::Game::MenuStateLoadGame::mouseClick (this=0x7ff9b80f0ca0, x=201, y=37, mouseButton=<optimized out>) at /home/tomreyn/SCM/megaglest-trunk/source/glest_game/menu/menu_state_load_game.cpp:239
#13 0x00000000005f90e4 in Glest::Game::MainWindow::eventMouseDown (this=0x1fb1cc0, x=<optimized out>, y=<optimized out>, mouseButton=Shared::Platform::mbLeft) at /home/tomreyn/SCM/megaglest-trunk/source/glest_game/main/main.cpp:728
#14 0x0000000000927176 in Shared::Platform::Window::handleMouseDown (this=0x1fb1cc0, event=...) at /home/tomreyn/SCM/megaglest-trunk/source/shared_lib/sources/platform/sdl/window.cpp:602
#15 0x0000000000927d99 in Shared::Platform::Window::handleEvent () at /home/tomreyn/SCM/megaglest-trunk/source/shared_lib/sources/platform/sdl/window.cpp:152
#16 0x000000000061535f in Glest::Game::glestMain (argc=<optimized out>, argv=<optimized out>) at /home/tomreyn/SCM/megaglest-trunk/source/glest_game/main/main.cpp:3762
#17 0x0000000000617276 in Glest::Game::glestMainWrapper (argc=1, argv=0x7fffb57d5ac8) at /home/tomreyn/SCM/megaglest-trunk/source/glest_game/main/main.cpp:4004
#18 0x00007ff9c9fc730d in __libc_start_main (main=0x4a88b0 <main(int, char**)>, argc=1, ubp_av=0x7fffb57d5ac8, init=<optimized out>, fini=<optimized out>, rtld_fini=<optimized out>, stack_end=0x7fffb57d5ab8) at libc-start.c:226
#19 0x00000000004add09 in _start ()
« Last Edit: 20 March 2012, 14:48:11 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.

tomreyn

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