Openapoc: Game Crashes in Battlescape - Repeatable

Created on 14 Jul 2019  ·  6Comments  ·  Source: OpenApoc/OpenApoc

Select squad 1 and have them run to the nearest exit tile. The game will crash right before the squad gets there. The second nearest tile has the same effect, but seems to occur a few seconds later. If the unit does not run to the exit, the game continues to run normally. I was able to get this to repeat every time on stream.
save_Stream Test - Battle.zip

!BUG! HIGH PRIORITY Verified / Replicated

Most helpful comment

No, thank you for a good well-described reproduction case :)

All 6 comments

Also getting the Incorrect Tile Coordinates error a lot. 32,18,3 is the latest one I got. The error window is usually not selectable and sends me to the desktop when I try to click it.

Thanks for the save - asan log of the crash below for reference:

==11797==Hint: address points to the zero page.
#0 0x101d079a1 in OpenApoc::UnitAIDefault::think(OpenApoc::GameState&, OpenApoc::BattleUnit&, bool) unitaidefault.cpp:78
#1 0x101cfe67a in OpenApoc::AIBlockUnit::think(OpenApoc::GameState&, OpenApoc::BattleUnit&, bool) unitai.cpp:137
#2 0x101e93aab in OpenApoc::BattleUnit::updateAI(OpenApoc::GameState&, unsigned int) battleunit.cpp:3665
#3 0x101e8db98 in OpenApoc::BattleUnit::update(OpenApoc::GameState&, unsigned int) battleunit.cpp:1955
#4 0x101d6abae in OpenApoc::Battle::update(OpenApoc::GameState&, unsigned int) battle.cpp:1709
#5 0x10221cce0 in OpenApoc::GameState::update(unsigned int) gamestate.cpp:960
#6 0x102e2ffbd in OpenApoc::BattleView::update() battleview.cpp:1452
#7 0x101a3a237 in OpenApoc::Framework::run(std::__1::shared_ptr) framework.cpp:654
#8 0x10195e788 in main main.cpp:26
#9 0x7fff59cc63d4 in start (libdyld.dylib:x86_64+0x163d4)

So the issue seems to be that the unit leaving the map is the current target of a brainsucker, and that doesn't seem to handle their target disappearing.

While the crash is fixed in #636 - the save then instantly causes an out-of-bounds TileMap lookup (IE the "Incorrect Tile Coordinates" error) - that may be a similar issue, so looking into that now

Good news! Thanks!

No, thank you for a good well-described reproduction case :)

Was this page helpful?
0 / 5 - 0 ratings

Related issues

BeornTB picture BeornTB  ·  3Comments

FilmBoy84 picture FilmBoy84  ·  3Comments

makus82 picture makus82  ·  3Comments

FilmBoy84 picture FilmBoy84  ·  3Comments

FilmBoy84 picture FilmBoy84  ·  3Comments