bzr7684[trunk] Crash on upcast in defaultai.cc:5381
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
widelands |
Fix Released
|
Medium
|
TiborB |
Bug Description
I compiled a trunk and a slightly modified Version on OSX 10.11.2 (15C50) with MacPorts and XCode Version 7.2 (7C68)
5378 uint32_t site_to_be_removed = std::numeric_
5379 Flag* flag = nullptr;
5380
5381 if (upcast(
5382 if (player_
5383 std::vector<Soldier *> defenders;
I played a self defined map (Schrägland) Barbarians vs. Empire,
after attacking the Empire at a small Bulding - to avoid the castle being built -
THe Empire attacked be back. So I teaead down my barrack. But before my soldiers
could leave the game caresd with a secfault:
After testing I found:
* I could not reproduc this on a plain "r7684" compiled by SirVer.
* I _could_ reproduc this in some debug version bzr7684[trunk]
* In the version I modified bzr7684[
The behaviour was different when I reloaded the saved File, so I assume it
is either base on som unititalized memory or some racecondition
(This is a MacBook with 2,3 GHz Intel Core i7, 8 crores via MultiThreading)
I may Attach more Info if possible and/or requested
Related branches
- SirVer: Approve
-
Diff: 257 lines (+38/-31)14 files modified.bzrignore (+3/-0)
src/ai/defaultai.cc (+2/-2)
src/base/exceptions.cc (+1/-1)
src/base/wexception.h (+2/-2)
src/economy/portdock.h (+1/-1)
src/logic/bob.h (+5/-1)
src/logic/building.h (+1/-1)
src/logic/game_controller.h (+2/-2)
src/logic/instances.h (+3/-3)
src/logic/message.h (+9/-9)
src/logic/requirements.h (+2/-2)
src/logic/ware_descr.h (+5/-5)
src/map_io/map_allowed_building_types_packet.cc (+1/-1)
src/ui_fsmenu/main_menu.h (+1/-1)
Changed in widelands: | |
assignee: | nobody → TiborB (tiborb95) |
Changed in widelands: | |
importance: | Undecided → Medium |
tags: | added: crash |
Changed in widelands: | |
status: | Fix Released → Fix Committed |
milestone: | none → build19-rc1 |
Changed in widelands: | |
status: | Fix Committed → Fix Released |
I compiled trunk (rev. 7686) and attacked the sentry at 11x39 (correct one?) - no crash...
This part of AI code is quite old, should be OK.
>The behaviour was different when I reloaded the saved File
Most of AI data are not stored in savegame. So when you load the game, AI has to recreate them gradually. So in fact you never get the same status after save/load.
Linux has GDB debugger, I think it could provide much better backtrace then the one provided.