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

Buildings lose their set points #108

Closed KroArtem closed 8 years ago

KroArtem commented 8 years ago

Choose town hall or something that produces units. Set a point where units will go. Save the game, load it, this building won't have any set point.

P.S. moreover, you can get a segfault whilst loading the game.

Andrettin commented 8 years ago

Thanks! I've fixed it now: https://github.com/Andrettin/Wyrmgus/commit/21ad59ac2f1b1d92d7cd92533966484465ee4e2d

About the segfault, if you manage to get any output on that, let me know.

KroArtem commented 8 years ago
Thread 1 "stratagus-dbg" received signal SIGSEGV, Segmentation fault.
malloc_consolidate (av=av@entry=0x7ffff5e24b20 <main_arena>) at malloc.c:4182
4182    malloc.c: Нет такого файла или каталога.
(gdb) bt
#0  malloc_consolidate (av=av@entry=0x7ffff5e24b20 <main_arena>)
    at malloc.c:4182
#1  0x00007ffff5ae11e8 in _int_free (av=0x7ffff5e24b20 <main_arena>, 
    p=<optimized out>, have_lock=0) at malloc.c:4076
#2  0x00007ffff5ae4abc in __GI___libc_free (mem=<optimized out>)
    at malloc.c:2969
#3  0x0000000000758e46 in CMap::Clean (this=0xe12160 <Map>)
    at /home/kroartem/SVN/Wyrmgus/src/map/map.cpp:377
#4  0x00000000007200ee in CleanGame ()
    at /home/kroartem/SVN/Wyrmgus/src/game/game.cpp:1906
#5  0x0000000000717991 in StartMap (filename="~save/game.sav.gz", clean=false)
    at /home/kroartem/SVN/Wyrmgus/src/game/game.cpp:199
#6  0x000000000072d21f in StartSavedGame (filename="~save/game.sav.gz")
    at /home/kroartem/SVN/Wyrmgus/src/game/savegame.cpp:216
#7  0x0000000000a21baf in tolua_stratagus_StartSavedGame00 (tolua_S=0x1ae2bf0)
    at /home/kroartem/SVN/Wyrmgus/tolua.cpp:1133
#8  0x00007ffff7bb5320 in ?? () from /usr/lib/x86_64-linux-gnu/liblua5.1.so.0
#9  0x00007ffff7bbfeea in ?? () from /usr/lib/x86_64-linux-gnu/liblua5.1.so.0
#10 0x00007ffff7bb577d in ?? () from /usr/lib/x86_64-linux-gnu/liblua5.1.so.0
#11 0x00007ffff7bb4a5e in ?? () from /usr/lib/x86_64-linux-gnu/liblua5.1.so.0
#12 0x00007ffff7bb58eb in ?? () from /usr/lib/x86_64-linux-gnu/liblua5.1.so.0
#13 0x00007ffff7bb13a8 in lua_pcall ()
   from /usr/lib/x86_64-linux-gnu/liblua5.1.so.0
---Type <return> to continue, or q <return> to quit---
#14 0x000000000087ed05 in LuaCall (narg=0, clear=1, exitOnError=true)
    at /home/kroartem/SVN/Wyrmgus/src/stratagus/script.cpp:185
#15 0x000000000087f096 in LuaLoadFile (file="scripts/guichan.lua", strArg="")
    at /home/kroartem/SVN/Wyrmgus/src/stratagus/script.cpp:246
#16 0x00000000008ee78b in MenuLoop ()
    at /home/kroartem/SVN/Wyrmgus/src/stratagus/stratagus.cpp:313
#17 0x00000000008ef258 in stratagusMain (argc=1, argv=0x7fffffffdb68)
    at /home/kroartem/SVN/Wyrmgus/src/stratagus/stratagus.cpp:822
#18 0x0000000000854bf4 in main (argc=1, argv=0x7fffffffdb68)
    at /home/kroartem/SVN/Wyrmgus/src/stratagus/main.cpp:37
(gdb) 
KroArtem commented 8 years ago

I think this ticket can be closed. If I catch this segfault again, I'll open separate ticket.