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

Dead units can enter transports (Crashes when unloaded) #16405

Closed
cjshmyr opened this issue Apr 13, 2019 · 1 comment · Fixed by #17016
Closed

Dead units can enter transports (Crashes when unloaded) #16405

cjshmyr opened this issue Apr 13, 2019 · 1 comment · Fixed by #17016
Labels

Comments

@cjshmyr
Copy link
Member

cjshmyr commented Apr 13, 2019

There's a tight race condition that is allowing units to die and enter transports on the same tick. This will cause the game to crash when that transport tries to unload.

Engine version: release-20190314

Replay: OpenRA-2019-04-12T191227Z.zip - happens just before 14:00, replay is 14:04 long.

Stacktrace:

OpenRA engine version release-20190314
Tiberian Dawn mod version release-20190314
on map 1823885808927deb9fbb4c746ea9e8693fd6428e (Renegade 2D (C&C 0.93) by hamb).
Date: 2019-04-12 19:26:30Z
Operating System: Windows (Microsoft Windows NT 6.2.9200.0)
Runtime Version: .NET CLR 4.0.30319.42000
Exception of type `System.InvalidOperationException`: Attempted to get trait from destroyed object (e6 244 (not in world))
   в OpenRA.TraitDictionary.CheckDestroyed(Actor actor)
   в OpenRA.TraitDictionary.Get[T](Actor actor)
   в OpenRA.Actor.Trait[T]()
   в OpenRA.Mods.Common.Traits.Cargo.<CanUnload>c__AnonStorey2.<>m__0(Actor p)
   в System.Linq.Enumerable.Any[TSource](IEnumerable`1 source, Func`2 predicate)
   в OpenRA.Mods.Common.Traits.Cargo.<CanUnload>m__4(CPos c)
   в System.Linq.Enumerable.Any[TSource](IEnumerable`1 source, Func`2 predicate)
   в OpenRA.Mods.Common.Traits.Cargo.CanUnload()
   в OpenRA.Mods.Common.Traits.Cargo.ResolveOrder(Actor self, Order order)
   в OpenRA.Network.UnitOrders.ProcessOrder(OrderManager orderManager, World world, Int32 clientId, Order order)
   в OpenRA.Network.OrderManager.Tick()
   в OpenRA.Game.InnerLogicTick(OrderManager orderManager)
   в OpenRA.Game.LogicTick()
   в OpenRA.Game.Loop()
   в OpenRA.Game.Run()
   в OpenRA.Game.InitializeAndRun(String[] args)
   в OpenRA.WindowsLauncher.RunGame(String[] args)

We can confirm this happens by adding an a.IsDead check to the beginning of Cargo.Load(self, a). I'm not sure of the best way to fix this though.

@cjshmyr cjshmyr added the Crash label Apr 13, 2019
@abcdefg30
Copy link
Member

Sounds like #16295 might have fixed the crash here. An IsDead check before loading wouldn't hurt, though.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants