spring/KAIK

UnitHandler.cpp:773: void CUnitHandler::BuildTaskRemove(BuilderTracker*): Assertion `false' failed.

Opened this issue · 1 comments

Not very important but i saw this when running a 3v3 KAIK game in a Debug2 build:

spring: /home/johanr/my_projects/spring/AI/Skirmish/KAIK/UnitHandler.cpp:773: void CUnitHandler::BuildTaskRemove(BuilderTracker*): Assertion `false' failed.
[f=0041299] Error: Aborted (SIGABRT) in spring 94.1.1-826-g7f6f61d develop (Debug)
[f=0041299] Error: Stacktrace:
[f=0041299] Error: This stack trace indicates a problem with a Skirmish AI library.
[f=0041299] Error: <0> /usr/lib/libc.so.6(+0x35240) [0x7fbdd29eb240]
[f=0041299] Error: <1> /usr/lib/libc.so.6(gsignal+0x39) [0x7fbdd29eb1c9]
[f=0041299] Error: <2> /usr/lib/libc.so.6(abort+0x148) [0x7fbdd29ec5c8]
[f=0041299] Error: <3> /usr/lib/libc.so.6(+0x2e356) [0x7fbdd29e4356]
[f=0041299] Error: <4> /usr/lib/libc.so.6(+0x2e402) [0x7fbdd29e4402]
[f=0041299] Error: <5> /home/johanr/my_projects/spring/AI/Skirmish/KAIK/UnitHandler.cpp:777
[f=0041299] Error: <6> /home/johanr/my_projects/spring/AI/Skirmish/KAIK/UnitHandler.cpp:752
[f=0041299] Error: <7> /home/johanr/my_projects/spring/AI/Skirmish/KAIK/KAIK.cpp:106
[f=0041299] Error: <8> /home/johanr/my_projects/spring/AI/Wrappers/LegacyCpp/Event/AIUnitFinishedEvent.h:18
[f=0041299] Error: <9> /home/johanr/my_projects/spring/AI/Wrappers/LegacyCpp/AIAI.cpp:172
[f=0041299] Error: <10> /home/johanr/my_projects/spring/AI/Skirmish/KAIK/AIExport.cpp:99
[f=0041299] Error: <11> /home/johanr/my_projects/spring/rts/Rendering/Models/OBJParser.cpp:592
[f=0041299] Error: <12> /usr/include/c++/4.8.1/bits/stl_vector.h:650
[f=0041299] Error: <13> /home/johanr/my_projects/spring/rts/Rendering/Models/OBJParser.h:16
[f=0041299] Error: <14> /home/johanr/my_projects/spring/rts/System/creg/TypeDeduction.h:73
[f=0041299] Error: <15> /home/johanr/my_projects/spring/rts/Lua/LuaUnitDefs.cpp:677 (discriminator 1)
[f=0041299] Error: <16> /home/johanr/my_projects/spring/rts/Lua/LuaUnitDefs.cpp:658 (discriminator 1)
[f=0041299] Error: <17> /home/johanr/my_projects/spring/rts/Lua/LuaUnsyncedRead.cpp:2182
[f=0041299] Error: <18> /usr/include/c++/4.8.1/bits/stl_map.h:463
[f=0041299] Error: <19> /home/johanr/my_projects/spring/rts/Game/Game.cpp:1566
[f=0041299] Error: <20> /home/johanr/my_projects/spring/rts/Net/NetCommands.cpp:429
[f=0041299] Error: <21> /home/johanr/my_projects/spring/rts/Game/Game.cpp:966
[f=0041299] Error: <22> /home/johanr/my_projects/spring/rts/Map/SMF/SMFGroundTextures.cpp:196
[f=0041299] Error: <23> /home/johanr/my_projects/spring/rts/Map/SMF/Legacy/LegacyMeshDrawer.cpp:40
[f=0041299] Error: <24> /home/johanr/my_projects/spring/rts/Map/SMF/Legacy/LegacyMeshDrawer.cpp:129
[f=0041299] Error: <25> /usr/include/c++/4.8.1/bits/stl_uninitialized.h:256
[f=0041299] Error: <26> /home/johanr/my_projects/spring/rts/Map/SM3/terrain/TerrainTexture.cpp:57 (discriminator 1)
[f=0041299] Error: <27> /usr/lib/libc.so.6(__libc_start_main+0xf5) [0x7fbdd29d7a15]
[f=0041299] Error: <28> ??:?

The code fails silently in a non-debug build:
void CUnitHandler::BuildTaskRemove(BuilderTracker* builderTracker) {
if (builderTracker->buildTaskId == 0) {
assert(false);
return;
}

abma commented

thats the only place i found where buildTaskId is set != 0:

https://github.com/spring/KAIK/blob/master/UnitHandler.cpp#L832