View Issue Details

IDProjectCategoryView StatusLast Update
0000849Spring engineGeneralpublic2008-02-19 23:39
ReporterKDR_11k Assigned ToKDR_11k  
PrioritynormalSeveritycrashReproducibilitysometimes
Status resolvedResolutionfixed 
Summary0000849: Crashbug with Lua-spawned units
DescriptionIn KP.net I sometimes get a crash with the Network's Dispatch command. The command spawns units in a ring around another unit and gives them a move order. Sometimes this move order crashes the game. It's the easiest to produce if you use WIP2:

Spawn 4 network_big with one give command and don't move them.
Spawn 48 network_spam, select them and rightclick onto one of the big units from before (preferrably the closest one so no bumping happens).
Once all spam has disappeared with those white flashes, select all four big units, click on dispatch and then on any place on the map. BAM, crash.

Works in both 76b1 and SVN.
Additional Informationdownload link: http://mitglied.lycos.de/KDR_11k/files/Kernel%20Panic%20net%20WIP2.sd7
TagsNo tags attached.
Attached Files
Kopie (4) von infolog.txt (Attachment missing)
Checked infolog.txt for Errors

Activities

KDR_11k

2008-02-13 23:32

reporter   ~0001971

when it happens in a multiplayer game all players crash simultaneously.

Kloot

2008-02-14 00:16

developer   ~0001972

Reproduced stacktrace:

#0 0x082aeb27 in SyncedFloat3 (this=0xbfe5be84, f=@0x32c8300c) at rts/System/Sync/SyncedFloat3.h:49
#1 0x08316fe4 in CGroundMoveType::ChangeHeading (this=0xa5ccf40, wantedHeading=0) at rts/Sim/MoveTypes/GroundMoveType.cpp:591
#2 0x08318f4c in CGroundMoveType::Update (this=0xa5ccf40) at rts/Sim/MoveTypes/GroundMoveType.cpp:300
0000003 0x083d59b2 in CUnit::Update (this=0x8ffbc48) at rts/Sim/Units/Unit.cpp:449
0000004 0x083c4834 in CUnitHandler::Update (this=0x9c24520) at rts/Sim/Units/UnitHandler.cpp:249
0000005 0x081d1b5a in CGame::SimFrame (this=0x8b43020) at rts/Game/Game.cpp:2523
#6 0x081d391f in CGame::ClientReadNet (this=0x8b43020) at rts/Game/Game.cpp:2944
#7 0x081d818d in CGame::Update (this=0x8b43020) at rts/Game/Game.cpp:1892
#8 0x084cd1d9 in SpringApp::Update (this=0xbfe5c5a0) at rts/System/Main.cpp:864
#9 0x084d1678 in SpringApp::Run (this=0xbfe5c5a0, argc=1, argv=0xbfe5c694) at rts/System/Main.cpp:1050
0000010 0x084d19b5 in Run (argc=1, argv=0xbfe5c694) at rts/System/Main.cpp:1110
#11 0x084d1bac in main (argc=-1122428866, argv=0x3f7fd19e, envp=0xbb8aa6dc) at rts/System/Main.cpp:1163

#1 0x08316fe4 in CGroundMoveType::ChangeHeading (this=0xa5ccf40, wantedHeading=0) at rts/Sim/MoveTypes/GroundMoveType.cpp:591
591 owner->updir=ground->GetNormal(owner->pos.x, owner->pos.z);

print owner->pos.x
$2 = -nan(0x400000)
print owner->pos.z
$3 = -nan(0x400000)

KDR_11k

2008-02-14 08:45

reporter   ~0001973

I've made the Lua script verbose and GetUnitPosition works fine, reports the numbers it should. Well, the units show up fine too and start moving just fine, only a moment later does it crash...

KDR_11k

2008-02-19 23:39

reporter   ~0001976

I think I fixed it in r5518, there was a division by the length of a vector difference in the collision code, if two units had the exact same coordinate that would cause a division by zero.

Issue History

Date Modified Username Field Change
2008-02-13 23:30 KDR_11k New Issue
2008-02-13 23:30 KDR_11k File Added: Kopie (4) von infolog.txt
2008-02-13 23:32 KDR_11k Note Added: 0001971
2008-02-14 00:16 Kloot Note Added: 0001972
2008-02-14 08:45 KDR_11k Note Added: 0001973
2008-02-19 23:39 KDR_11k Status new => resolved
2008-02-19 23:39 KDR_11k Resolution open => fixed
2008-02-19 23:39 KDR_11k Assigned To => KDR_11k
2008-02-19 23:39 KDR_11k Note Added: 0001976