Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Possibly attack move related crash #17249

Open
matjaeck opened this issue Oct 18, 2019 · 1 comment
Labels
Milestone

Comments

@matjaeck
Copy link
Contributor

@matjaeck matjaeck commented Oct 18, 2019

Had a TS game running in the background and it suddenly crashed. Since I was idle, I assume it is related to the floaters on the map.

OpenRA engine version {DEV_VERSION}
Tiberian Sun mod version {DEV_VERSION}
on map f43a4306d6da3e2b9c4376de6f8147a831edead8 (They All Float by Westwood Studios).
Date: 2019-10-18 10:16:34Z
Operating System: Linux (Unix 4.15.0.65)
Runtime Version: Mono 6.4.0.198 (tarball Tue Sep 24 01:21:28 UTC 2019) CLR 4.0.30319.42000
Exception of type `System.NullReferenceException`: Object reference not set to an instance of an object
  at OpenRA.Mods.Common.Activities.Move.Tick (OpenRA.Actor self) [0x00083] in <b9cb8f8fdc744b01b20164f08ab8a895>:0 
  at OpenRA.Activities.Activity.TickOuter (OpenRA.Actor self) [0x00052] in <e755f3b593d94da394c00bc46178a8da>:0 
  at OpenRA.Traits.ActivityUtils.RunActivity (OpenRA.Actor self, OpenRA.Activities.Activity act) [0x00015] in <e755f3b593d94da394c00bc46178a8da>:0 
  at OpenRA.Activities.Activity.TickChild (OpenRA.Actor self) [0x00008] in <e755f3b593d94da394c00bc46178a8da>:0 
  at OpenRA.Mods.Common.Activities.AttackMoveActivity.Tick (OpenRA.Actor self) [0x000b1] in <b9cb8f8fdc744b01b20164f08ab8a895>:0 
  at OpenRA.Activities.Activity.TickOuter (OpenRA.Actor self) [0x00083] in <e755f3b593d94da394c00bc46178a8da>:0 
  at OpenRA.Traits.ActivityUtils.RunActivity (OpenRA.Actor self, OpenRA.Activities.Activity act) [0x00015] in <e755f3b593d94da394c00bc46178a8da>:0 
  at OpenRA.Actor.Tick () [0x0000f] in <e755f3b593d94da394c00bc46178a8da>:0 
  at OpenRA.World.Tick () [0x00123] in <e755f3b593d94da394c00bc46178a8da>:0 
  at OpenRA.Game.InnerLogicTick (OpenRA.Network.OrderManager orderManager) [0x001bc] in <e755f3b593d94da394c00bc46178a8da>:0 
  at OpenRA.Game.LogicTick () [0x0003e] in <e755f3b593d94da394c00bc46178a8da>:0 
  at OpenRA.Game.Loop () [0x000e3] in <e755f3b593d94da394c00bc46178a8da>:0 
  at OpenRA.Game.Run () [0x0003c] in <e755f3b593d94da394c00bc46178a8da>:0 
  at OpenRA.Game.InitializeAndRun (System.String[] args) [0x00010] in <e755f3b593d94da394c00bc46178a8da>:0 
  at OpenRA.Program.Main (System.String[] args) [0x00044] in <e755f3b593d94da394c00bc46178a8da>:0 

OpenRA-2019-10-18T100521Z.zip

763e6d8

Crash happens at 10:30.

@abcdefg30 abcdefg30 added the Crash label Oct 18, 2019
@pchote

This comment has been minimized.

Copy link
Member

@pchote pchote commented Oct 20, 2019

This is a case of

Testing in #16584 uncovered a fairly nasty edge case in the activity state plumbing. I'm not sure whether it makes sense to fix it here, or in its own PR.

If you queue a child activity and then cancel it before it can tick it will go directly from ActivityState.Queued to ActivityState.Canceling. This allows it to tick without OnFirstRun ever being called, which breaks a lot of assumptions!

Originally posted by @pchote in #16481 (comment)

This would normally have been caught by

if (IsCanceling && self.Location.Layer != CustomMovementLayerType.Tunnel)
return true;
except the unit (a medic in this case) was indeed in a tunnel. This allows the rest of Tick to run without OnFirstRun, which, unsurprisingly, breaks horribly.

We could bodge a way around this by setting a flag in OnFirstRun and then making sure we always return if that has not been set. I would prefer it if we could instead fix the Activity plumbing properly so we wouldn't call Tick at all.

This issue exists in principle on the current prep branch, but we don't use tunnels in RA/TD/D2k so we should defer this to Next + 1.

@pchote pchote added this to the Next+1 milestone Oct 20, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
3 participants
You can’t perform that action at this time.