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

System.DivideByZeroException #15618

Open
ghost opened this Issue Sep 15, 2018 · 3 comments

Comments

Projects
None yet
4 participants
@ghost

ghost commented Sep 15, 2018

Hi !

Issue Summary

I got this while watching a 100 % bot game :

OpenRA engine version playtest-20180825
Red Alert mod version playtest-20180825
on map c3221005bf33f1f71ccc3fb7b55e580ba0ff2bd0 (Love Thy Neighbor by cpthavoc).
Date: 2018-09-15 11:17:55Z
Operating System: Windows (Microsoft Windows NT 6.2.9200.0)
Runtime Version: .NET CLR 4.0.30319.42000
Exception of type `System.DivideByZeroException`: Tentative de division par zéro.
   à OpenRA.WVec.op_Division(WVec a, Int32 b)
   à OpenRA.Mods.Common.Activities.ReturnToBase.Calculate(Actor self)
   à OpenRA.Mods.Common.Activities.ReturnToBase.Tick(Actor self)
   à OpenRA.Activities.Activity.TickOuter(Actor self)
   à OpenRA.Traits.ActivityUtils.RunActivity(Actor self, Activity act)
   à OpenRA.Actor.Tick()
   à OpenRA.World.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)

System Information

  • Operating System : Windows 10
  • .Net Version : .Net 4.7.2
  • OpenRA Version : playtest-20180825
  • Mod : Red Alert

Additional Information

@abcdefg30

This comment has been minimized.

Show comment
Hide comment
@pchote

This comment has been minimized.

Show comment
Hide comment
@pchote

pchote Sep 15, 2018

Member

Confirmed that this happened because approachCenter was equal to posCenter, causing tangentDirection to have length 0.

We should aim to fix this for Next + 1.

Member

pchote commented Sep 15, 2018

Confirmed that this happened because approachCenter was equal to posCenter, causing tangentDirection to have length 0.

We should aim to fix this for Next + 1.

@pchote pchote removed the Red Alert label Sep 15, 2018

@pchote pchote added this to the Next + 1 milestone Sep 15, 2018

@pchote pchote modified the milestones: Next + 1, Hotfix release Sep 26, 2018

@xp65

This comment has been minimized.

Show comment
Hide comment
@xp65

xp65 Oct 5, 2018

I just had the same issue:

OpenRA engine version release-20180923
Red Alert mod version release-20180923
on map 0b7807046e1b1a0798a60e321982afb4905442cc (Europe Edition by ers).
Date: 2018-10-05 17:14:19Z
Operating System: Windows (Microsoft Windows NT 6.2.9200.0)
Runtime Version: .NET CLR 4.0.30319.42000
Exception of type System.DivideByZeroException: Poging door nul te delen.
bij OpenRA.WVec.op_Division(WVec a, Int32 b)
bij OpenRA.Mods.Common.Activities.ReturnToBase.Calculate(Actor self)
bij OpenRA.Mods.Common.Activities.ReturnToBase.Tick(Actor self)
bij OpenRA.Activities.Activity.TickOuter(Actor self)
bij OpenRA.Traits.ActivityUtils.RunActivity(Actor self, Activity act)
bij OpenRA.Actor.Tick()
bij OpenRA.World.Tick()
bij OpenRA.Game.InnerLogicTick(OrderManager orderManager)
bij OpenRA.Game.LogicTick()
bij OpenRA.Game.Loop()
bij OpenRA.Game.Run()
bij OpenRA.Game.InitializeAndRun(String[] args)
bij OpenRA.WindowsLauncher.RunGame(String[] args)

xp65 commented Oct 5, 2018

I just had the same issue:

OpenRA engine version release-20180923
Red Alert mod version release-20180923
on map 0b7807046e1b1a0798a60e321982afb4905442cc (Europe Edition by ers).
Date: 2018-10-05 17:14:19Z
Operating System: Windows (Microsoft Windows NT 6.2.9200.0)
Runtime Version: .NET CLR 4.0.30319.42000
Exception of type System.DivideByZeroException: Poging door nul te delen.
bij OpenRA.WVec.op_Division(WVec a, Int32 b)
bij OpenRA.Mods.Common.Activities.ReturnToBase.Calculate(Actor self)
bij OpenRA.Mods.Common.Activities.ReturnToBase.Tick(Actor self)
bij OpenRA.Activities.Activity.TickOuter(Actor self)
bij OpenRA.Traits.ActivityUtils.RunActivity(Actor self, Activity act)
bij OpenRA.Actor.Tick()
bij OpenRA.World.Tick()
bij OpenRA.Game.InnerLogicTick(OrderManager orderManager)
bij OpenRA.Game.LogicTick()
bij OpenRA.Game.Loop()
bij OpenRA.Game.Run()
bij OpenRA.Game.InitializeAndRun(String[] args)
bij OpenRA.WindowsLauncher.RunGame(String[] args)

@abcdefg30 abcdefg30 referenced a pull request that will close this issue Oct 5, 2018

Open

Prevent ReturnToBase from causing a divide by zero crash #15681

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment