View Issue Details

IDProjectCategoryView StatusLast Update
0001153The Dark ModCodingpublic29.06.2009 08:06
ReporterIshtvan Assigned ToIshtvan  
PrioritynormalSeveritycrashReproducibilityrandom
Status closedResolutionfixed 
Summary0001153: Intermittent crash when spawning and picking up arrows
DescriptionI went to map test/mantle, spawned ammo_ropearrow small and picked it up. When doing this repeatedly, I eventually get a crash. It's not consistent, sometimes it happens on the first arrow I pick up, sometimes it happens a few seconds after picking up the 5th arrow, but it always seems to happen. Seems to have started after we made arrows idMoveables instead of idMoveableItem, but could be wrong.
TagsNo tags attached.

Activities

greebo

greebo

21.09.2008 08:07

administrator   ~0001615

Last edited: 21.09.2008 08:09

I tried to reproduce this. These are my steps:

I went into test/mantle and switched on noclip mode and floated upwards a bit.
(Made a bind "F1" "spawn ammo_ropearrow_small" shortcut for testing purposes)
Spawned the arrow (it appears standing upright on the floor).
Pick it up.
Spawned another arrow.
Pick it up.
Repeat about 30 times at various locations on the floor.
If you're floating too low, the arrow sometimes appears in the floor, only the tip showing up, but this has not done any harm.

The map is still running as I type this, so there is no delayed crash for me. I also tried shooting two or three rope arrows at the walls, to make sure it's not the inventory count causing this (it went from 47 back up to 50 which is the maximum, but there was no crash).

To rule weird things out: are both SVN repositories up to date on your end?

greebo

greebo

21.09.2008 08:25

administrator   ~0001617

After fixing 0001152, I was thinking that these two intermittent crashes might be related?

Were you possibly running into the arrow after spawning them? This would have summoned a similar bug as described in 0001152.
Ishtvan

Ishtvan

21.09.2008 21:56

reporter   ~0001625

Last edited: 21.09.2008 21:58

Yeah, I think they are related, because now that you mention it, I was not in noclip mode, I was bumping into the arrows to try to knock them over before I picked them up. So it's quite possible lastPushEnt was set to the arrow, then it was deleted when adding to he inventory since it's a stackable item. I was just posting that on the forums. I haven't gotten a chance to test again yet, but this could well be resolved.

Ishtvan

Ishtvan

22.09.2008 01:51

reporter   ~0001626

Tested and there's no crash anymore, clearing lastPushEnt fixed it.
greebo

greebo

22.09.2008 07:30

administrator   ~0001627

For the records, I didn't clear lastPushEnt, I just converted the idEntity* raw pointer to an idEntityPtr<idEntity>. The getEntity() method returns NULL if the underlying entity got removed in the meantime, hence I'm able to catch this case.

This is why it's recommended to use the idEntityPtr<> template to reference entities that might be removed during runtime.

Issue History

Date Modified Username Field Change
20.09.2008 21:02 Ishtvan New Issue
20.09.2008 21:04 Ishtvan Description Updated
20.09.2008 21:04 Ishtvan Description Updated
21.09.2008 08:07 greebo Note Added: 0001615
21.09.2008 08:07 greebo Assigned To => Ishtvan
21.09.2008 08:07 greebo Status new => feedback
21.09.2008 08:09 greebo Note Edited: 0001615
21.09.2008 08:25 greebo Note Added: 0001617
21.09.2008 21:56 Ishtvan Note Added: 0001625
21.09.2008 21:57 Ishtvan Note Edited: 0001625
21.09.2008 21:58 Ishtvan Note Edited: 0001625
22.09.2008 01:51 Ishtvan Note Added: 0001626
22.09.2008 01:51 Ishtvan Status feedback => resolved
22.09.2008 01:51 Ishtvan Resolution open => fixed
22.09.2008 07:30 greebo Note Added: 0001627
29.06.2009 08:06 greebo Status resolved => closed