Andrettin / Wyrmsun

Strategy game based on history, mythology and fiction
http://andrettin.github.io/
GNU General Public License v2.0
301 stars 47 forks source link

Crash with goblins #114

Closed KroArtem closed 8 years ago

KroArtem commented 8 years ago

I'm not sure what happened. The thing I noticed is that "Find body of your hero" icon is not related to goblins. However, it's ok as a placeholder.

bt:

Thread 1 "stratagus-dbg" received signal SIGSEGV, Segmentation fault.
0x0000000000a2c7b2 in CUnit::GetHairColor (this=0x25319930)
    at /home/kroartem/SVN/Wyrmgus/src/unit/unit.cpp:4330
4330        VariationInfo *varinfo = this->Type->VarInfo[this->Variation];
(gdb) bt
#0  0x0000000000a2c7b2 in CUnit::GetHairColor (this=0x25319930)
    at /home/kroartem/SVN/Wyrmgus/src/unit/unit.cpp:4330
#1  0x00000000008cc2c4 in UpdateDisplay ()
    at /home/kroartem/SVN/Wyrmgus/src/stratagus/mainloop.cpp:303
#2  0x00000000008cd974 in DisplayLoop ()
    at /home/kroartem/SVN/Wyrmgus/src/stratagus/mainloop.cpp:683
#3  0x00000000008cd990 in SingleGameLoop ()
    at /home/kroartem/SVN/Wyrmgus/src/stratagus/mainloop.cpp:702
#4  0x00000000008cdc85 in GameMainLoop ()
    at /home/kroartem/SVN/Wyrmgus/src/stratagus/mainloop.cpp:762
#5  0x0000000000769be1 in StartMap (
    filename="maps/random/random-map-forest.smp", clean=true)
    at /home/kroartem/SVN/Wyrmgus/src/game/game.cpp:193
#6  0x0000000000aa064e in tolua_stratagus_StartMap00 (tolua_S=0x1b84bf0)
    at /home/kroartem/SVN/Wyrmgus/tolua.cpp:1075
#7  0x00007ffff7bb5320 in ?? () from /usr/lib/x86_64-linux-gnu/liblua5.1.so.0
#8  0x00007ffff7bbfeea in ?? () from /usr/lib/x86_64-linux-gnu/liblua5.1.so.0
#9  0x00007ffff7bb577d in ?? () from /usr/lib/x86_64-linux-gnu/liblua5.1.so.0
#10 0x00007ffff7bb4a5e in ?? () from /usr/lib/x86_64-linux-gnu/liblua5.1.so.0
#11 0x00007ffff7bb58eb in ?? () from /usr/lib/x86_64-linux-gnu/liblua5.1.so.0
#12 0x00007ffff7bb13a8 in lua_pcall ()
   from /usr/lib/x86_64-linux-gnu/liblua5.1.so.0
#13 0x00000000008c8def in LuaCallback::run (this=0x191aef78, results=0)
---Type <return> to continue, or q <return> to quit---
    at /home/kroartem/SVN/Wyrmgus/src/stratagus/luacallback.cpp:149
#14 0x00000000009cf214 in LuaActionListener::action (this=0x191aef70, 
    eventId="") at /home/kroartem/SVN/Wyrmgus/src/ui/widgets.cpp:494
#15 0x00000000007925b2 in gcn::Widget::generateAction (this=0x191aed30)
    at /home/kroartem/SVN/Wyrmgus/src/guichan/widget.cpp:616
#16 0x0000000000795c13 in gcn::Button::mouseClick (this=0x191aed30, button=1)
    at /home/kroartem/SVN/Wyrmgus/src/guichan/widgets/button.cpp:254
#17 0x0000000000791feb in gcn::Widget::_mouseInputMessage (this=0x191aed30, 
    mouseInput=...) at /home/kroartem/SVN/Wyrmgus/src/guichan/widget.cpp:502
#18 0x00000000007978e7 in gcn::Container::_mouseInputMessage (this=0x1914f290, 
    mouseInput=...)
    at /home/kroartem/SVN/Wyrmgus/src/guichan/widgets/container.cpp:394
#19 0x0000000000789964 in gcn::Gui::logic (this=0x1894a8e0)
    at /home/kroartem/SVN/Wyrmgus/src/guichan/gui.cpp:155
#20 0x00000000009cf043 in handleInput (event=0x0)
    at /home/kroartem/SVN/Wyrmgus/src/ui/widgets.cpp:443
#21 0x0000000000a87ee2 in WaitEventsOneFrame ()
    at /home/kroartem/SVN/Wyrmgus/src/video/sdl.cpp:977
#22 0x00000000009db033 in MenuScreen::run (this=0x1914f290, loop=true)
    at /home/kroartem/SVN/Wyrmgus/src/ui/widgets.cpp:3182
#23 0x0000000000aedc9a in tolua_stratagus_CMenuScreen_run00 (tolua_S=0x1b84bf0)
    at /home/kroartem/SVN/Wyrmgus/tolua.cpp:27456
#24 0x00007ffff7bb5320 in ?? () from /usr/lib/x86_64-linux-gnu/liblua5.1.so.0
---Type <return> to continue, or q <return> to quit---
#25 0x00007ffff7bbfeea in ?? () from /usr/lib/x86_64-linux-gnu/liblua5.1.so.0
#26 0x00007ffff7bb577d in ?? () from /usr/lib/x86_64-linux-gnu/liblua5.1.so.0
#27 0x00007ffff7bb4a5e in ?? () from /usr/lib/x86_64-linux-gnu/liblua5.1.so.0
#28 0x00007ffff7bb58eb in ?? () from /usr/lib/x86_64-linux-gnu/liblua5.1.so.0
#29 0x00007ffff7bb13a8 in lua_pcall ()
   from /usr/lib/x86_64-linux-gnu/liblua5.1.so.0
#30 0x00000000008c8def in LuaCallback::run (this=0x18992268, results=0)
    at /home/kroartem/SVN/Wyrmgus/src/stratagus/luacallback.cpp:149
#31 0x00000000009cf214 in LuaActionListener::action (this=0x18992260, 
    eventId="") at /home/kroartem/SVN/Wyrmgus/src/ui/widgets.cpp:494
#32 0x00000000007925b2 in gcn::Widget::generateAction (this=0x18c65310)
    at /home/kroartem/SVN/Wyrmgus/src/guichan/widget.cpp:616
#33 0x0000000000795c13 in gcn::Button::mouseClick (this=0x18c65310, button=1)
    at /home/kroartem/SVN/Wyrmgus/src/guichan/widgets/button.cpp:254
#34 0x0000000000791feb in gcn::Widget::_mouseInputMessage (this=0x18c65310, 
    mouseInput=...) at /home/kroartem/SVN/Wyrmgus/src/guichan/widget.cpp:502
#35 0x00000000007978e7 in gcn::Container::_mouseInputMessage (this=0x18a241a0, 
    mouseInput=...)
    at /home/kroartem/SVN/Wyrmgus/src/guichan/widgets/container.cpp:394
#36 0x0000000000789964 in gcn::Gui::logic (this=0x1894a8e0)
    at /home/kroartem/SVN/Wyrmgus/src/guichan/gui.cpp:155
#37 0x00000000009cf043 in handleInput (event=0x0)
    at /home/kroartem/SVN/Wyrmgus/src/ui/widgets.cpp:443
---Type <return> to continue, or q <return> to quit---
#38 0x0000000000a87ee2 in WaitEventsOneFrame ()
    at /home/kroartem/SVN/Wyrmgus/src/video/sdl.cpp:977
#39 0x00000000009db033 in MenuScreen::run (this=0x18a241a0, loop=true)
    at /home/kroartem/SVN/Wyrmgus/src/ui/widgets.cpp:3182
#40 0x0000000000aedc9a in tolua_stratagus_CMenuScreen_run00 (tolua_S=0x1b84bf0)
    at /home/kroartem/SVN/Wyrmgus/tolua.cpp:27456
#41 0x00007ffff7bb5320 in ?? () from /usr/lib/x86_64-linux-gnu/liblua5.1.so.0
#42 0x00007ffff7bbfe87 in ?? () from /usr/lib/x86_64-linux-gnu/liblua5.1.so.0
#43 0x00007ffff7bb577d in ?? () from /usr/lib/x86_64-linux-gnu/liblua5.1.so.0
#44 0x00007ffff7bb4a5e in ?? () from /usr/lib/x86_64-linux-gnu/liblua5.1.so.0
#45 0x00007ffff7bb58eb in ?? () from /usr/lib/x86_64-linux-gnu/liblua5.1.so.0
#46 0x00007ffff7bb13a8 in lua_pcall ()
   from /usr/lib/x86_64-linux-gnu/liblua5.1.so.0
#47 0x00000000008c8def in LuaCallback::run (this=0x53f66a8, results=0)
    at /home/kroartem/SVN/Wyrmgus/src/stratagus/luacallback.cpp:149
#48 0x00000000009cf214 in LuaActionListener::action (this=0x53f66a0, 
    eventId="") at /home/kroartem/SVN/Wyrmgus/src/ui/widgets.cpp:494
#49 0x00000000007925b2 in gcn::Widget::generateAction (this=0x18cacf30)
    at /home/kroartem/SVN/Wyrmgus/src/guichan/widget.cpp:616
#50 0x0000000000795c13 in gcn::Button::mouseClick (this=0x18cacf30, button=1)
    at /home/kroartem/SVN/Wyrmgus/src/guichan/widgets/button.cpp:254
#51 0x0000000000791feb in gcn::Widget::_mouseInputMessage (this=0x18cacf30, 
    mouseInput=...) at /home/kroartem/SVN/Wyrmgus/src/guichan/widget.cpp:502
---Type <return> to continue, or q <return> to quit---
#52 0x00000000007978e7 in gcn::Container::_mouseInputMessage (this=0x18bfbb00, 
    mouseInput=...)
    at /home/kroartem/SVN/Wyrmgus/src/guichan/widgets/container.cpp:394
#53 0x0000000000789964 in gcn::Gui::logic (this=0x1894a8e0)
    at /home/kroartem/SVN/Wyrmgus/src/guichan/gui.cpp:155
#54 0x00000000009cf043 in handleInput (event=0x0)
    at /home/kroartem/SVN/Wyrmgus/src/ui/widgets.cpp:443
#55 0x0000000000a87ee2 in WaitEventsOneFrame ()
    at /home/kroartem/SVN/Wyrmgus/src/video/sdl.cpp:977
#56 0x00000000009db033 in MenuScreen::run (this=0x18bfbb00, loop=true)
    at /home/kroartem/SVN/Wyrmgus/src/ui/widgets.cpp:3182
#57 0x0000000000aedc9a in tolua_stratagus_CMenuScreen_run00 (tolua_S=0x1b84bf0)
    at /home/kroartem/SVN/Wyrmgus/tolua.cpp:27456
#58 0x00007ffff7bb5320 in ?? () from /usr/lib/x86_64-linux-gnu/liblua5.1.so.0
#59 0x00007ffff7bbfe87 in ?? () from /usr/lib/x86_64-linux-gnu/liblua5.1.so.0
#60 0x00007ffff7bb577d in ?? () from /usr/lib/x86_64-linux-gnu/liblua5.1.so.0
#61 0x00007ffff7bb4a5e in ?? () from /usr/lib/x86_64-linux-gnu/liblua5.1.so.0
#62 0x00007ffff7bb58eb in ?? () from /usr/lib/x86_64-linux-gnu/liblua5.1.so.0
#63 0x00007ffff7bb13a8 in lua_pcall ()
   from /usr/lib/x86_64-linux-gnu/liblua5.1.so.0
#64 0x00000000008fbfff in LuaCall (narg=0, clear=1, exitOnError=true)
    at /home/kroartem/SVN/Wyrmgus/src/stratagus/script.cpp:185
#65 0x00000000008fc390 in LuaLoadFile (file="scripts/guichan.lua", strArg="")
---Type <return> to continue, or q <return> to quit---
    at /home/kroartem/SVN/Wyrmgus/src/stratagus/script.cpp:246
#66 0x000000000096d3d9 in MenuLoop ()
    at /home/kroartem/SVN/Wyrmgus/src/stratagus/stratagus.cpp:313
#67 0x000000000096dea6 in stratagusMain (argc=1, argv=0x7fffffffdbd8)
    at /home/kroartem/SVN/Wyrmgus/src/stratagus/stratagus.cpp:822
#68 0x00000000008cb44c in main (argc=1, argv=0x7fffffffdbd8)
    at /home/kroartem/SVN/Wyrmgus/src/stratagus/main.cpp:37

2016-08-17 19-12-25

Andrettin commented 8 years ago

Thanks for the bug report! The icon should be the same as your custom hero's, it's weird that a dwarven miner icon is appearing instead. What is your hero's unit type? And is this a loaded game?

KroArtem commented 8 years ago

It was not a loaded game, my main hero was a barbarian.

Andrettin commented 8 years ago

Hmm, I can't reproduce =/ Even with a Barbarian hero. The find custom hero icon appears properly as the hero's icon.

KroArtem commented 8 years ago

Currently I'm not able to reproduce. When I load saved game, main hero is already dead and I don't have this button. When I try to play new game, segfault due to sound arises.

Andrettin commented 8 years ago

You're getting a sound segfault whenever you try to start a new game?

KroArtem commented 8 years ago

No, it happens randomly and I didn't manage to find any steps to reproduce the problem. It just happens in the middle of the game and my autosave is old enough, usually I feel lazy to start from scratch or to repeat the same things.

Andrettin commented 8 years ago

I found out what the issue was :) The button was making the game crash if the custom hero died, this is fixed now: https://github.com/Andrettin/Wyrmgus/commit/c73cf38a139cacf1977cde1274e04835f82f7d82