#3684: Further scav transport death crash investigation
--------------------+-------------------------------------
Reporter: NoQ | Owner:
Type: bug | Status: new
Priority: normal | Milestone: unspecified
Component: other | Version: 3.1 RC 2
Keywords: | Blocked By:
Blocking: | Operating System: All/Non-Specific
--------------------+-------------------------------------
I've made some more digging into the crashes i have with my scav AI mod
(where i make scavengers produce transporter-type droids), and here's what
is showing up; i'm asking for help in investigating that, cause it may be
appearing in the base game as well in some rare cases / who knows.
The game sometimes crashes after some of the scavenger transporter dies
(probably on the next game tick or something like that), and never crashes
on any other unit's death.
When a transporter droid dies, a some pointer to a droid object becomes
invalid and makes the game crash in some random place of the code inside
gameLoop (either in rendering or in updating game state).
I believe the bad pointer appears in '''src/droid.cpp''' in
'''removeBaseDroid()''', the part where it kills all droids inside the
transporter. The transporter's psGroup somehow contains some scavenger
tanks, which is impossible (it's not a supertransport and these tanks are
not cyborgs but actually tanks), and their deletion leads to the crash.
I believe in that because when i change the debug statement inside this
for(;;) loop to
{{{
debug(LOG_DEATH,"psCurr: %d %d %s; psDel: %d %d %s",
psCurr->id,psCurr->droidType,objInfo(psCurr),
psDel->id, psDel->droidType, objInfo(psDel)
);
}}}
then i have actually managed to obtain the following stderr (with
--debug=death):
{{{
death |02:28:27: [droidDamage:224] Droid 160883 (0xb50cb38) is toast
death |02:28:27: [removeDroidBase:440] psCurr: 160901 0 Tank; psDel:
160883 6 Scavenger VTOL
info |02:28:27: [destroyObject:272] destroyObject: object not found in
list
}}}
Something like that shows up every time the crash happens (and there are
no other known crash cases with this mod until now). The "Tank" name can
only belong to a scavenger tank, and the droidType is 0 ("DROID_WEAPON").
So it couldn't have appeared in this loop at all, but still it is deleted
in this loop.
One extra thing i found suspicious is that when i use the cheat mode to
switch to the scavenger player and try to see what droids are inside the
transporter, i'm unable to do that: the list UI just doesn't show up when
i right-click the transporter. But this isn't true for the regular
transporters i give to the scav player with Ctrl+O.
Scavenger transporters are produced by the following call in scavfact.js:
{{{
buildDroid(fac, name, body, "V-Tol", "", DROID_TRANSPORTER, weapon);
}}}
--
Ticket URL: <http://developer.wz2100.net/ticket/3684>
Warzone 2100 Trac <http://developer.wz2100.net/>
The Warzone 2100 Project
------------------------------------------------------------------------------
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and
threat landscape has changed and how IT managers can respond. Discussions
will include endpoint security, mobile security and the latest in malware
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
_______________________________________________
Warzone2100-project mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/warzone2100-project