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

Crash due to Huntable actors outside map boundaries #20000

Closed
darkademic opened this issue Apr 23, 2022 · 4 comments · Fixed by #20001
Closed

Crash due to Huntable actors outside map boundaries #20000

darkademic opened this issue Apr 23, 2022 · 4 comments · Fixed by #20001
Labels

Comments

@darkademic
Copy link
Contributor

Game crashes when Huntable units are outside the map boundaries (e.g. an aircraft flying in to drop reinforcements).

Not sure if this will happen in the base mods as reinforcement actors (e.g. BADR) don't have Huntable, so can probably be considered low priority. Have fixed in CA by removing Huntable from units likely to be outside map boundaries.

Could more broadly apply to units attempting to path to units outside the map for whatever reason?

The following test map can be used which crashes immediately, which simply adds Huntable to BADR, adds some AI flak trucks which are told to hunt, and calls some paradrops for the opposing team: http://www.darkademic.co.uk/uploads/testhuntable.zip

OpenRA engine version {DEV_VERSION}
Red Alert mod version {DEV_VERSION}
on map d5167845ef22b216bda82c03b37f606f0f411196 (TestHuntable by Darkademic).
Date: 2022-04-23 11:57:26Z
Operating System: Windows (Microsoft Windows NT 10.0.19043.0)
Runtime Version: .NET CLR 6.0.2
Exception of type `System.IndexOutOfRangeException`: Index was outside the bounds of the array.
   at OpenRA.Mods.Common.Traits.Locomotor.CanMoveFreelyInto(Actor actor, CPos cell, SubCell subCell, BlockedByActor check, Actor ignoreActor) in J:\Modding\OpenRA\Repositories\Darkademic\OpenRA\OpenRA.Mods.Common\Traits\World\Locomotor.cs:line 222
   at OpenRA.Mods.Common.Traits.PathFinder.FindUnitPathToTargetCell(Actor self, IEnumerable`1 sources, CPos target, BlockedByActor check, Func`2 customCost, Actor ignoreActor, Boolean laneBias) in J:\Modding\OpenRA\Repositories\Darkademic\OpenRA\OpenRA.Mods.Common\Traits\World\PathFinder.cs:line 91
   at OpenRA.Mods.Common.Activities.Move.<>c__DisplayClass15_0.<.ctor>b__0(BlockedByActor check) in J:\Modding\OpenRA\Repositories\Darkademic\OpenRA\OpenRA.Mods.Common\Activities\Move\Move.cs:line 78
   at OpenRA.Mods.Common.Activities.Move.EvalPath(BlockedByActor check) in J:\Modding\OpenRA\Repositories\Darkademic\OpenRA\OpenRA.Mods.Common\Activities\Move\Move.cs:line 108
   at OpenRA.Mods.Common.Activities.Move.OnFirstRun(Actor self) in J:\Modding\OpenRA\Repositories\Darkademic\OpenRA\OpenRA.Mods.Common\Activities\Move\Move.cs:line 123
   at OpenRA.Activities.Activity.TickOuter(Actor self) in J:\Modding\OpenRA\Repositories\Darkademic\OpenRA\OpenRA.Game\Activities\Activity.cs:line 108
   at OpenRA.Traits.ActivityUtils.RunActivity(Actor self, Activity act) in J:\Modding\OpenRA\Repositories\Darkademic\OpenRA\OpenRA.Game\Traits\ActivityUtils.cs:line 31
   at OpenRA.Activities.Activity.TickChild(Actor self) in J:\Modding\OpenRA\Repositories\Darkademic\OpenRA\OpenRA.Game\Activities\Activity.cs:line 144
   at OpenRA.Mods.Common.Activities.AttackMoveActivity.Tick(Actor self) in J:\Modding\OpenRA\Repositories\Darkademic\OpenRA\OpenRA.Mods.Common\Activities\Move\AttackMoveActivity.cs:line 80
   at OpenRA.Activities.Activity.TickOuter(Actor self) in J:\Modding\OpenRA\Repositories\Darkademic\OpenRA\OpenRA.Game\Activities\Activity.cs:line 108
   at OpenRA.Traits.ActivityUtils.RunActivity(Actor self, Activity act) in J:\Modding\OpenRA\Repositories\Darkademic\OpenRA\OpenRA.Game\Traits\ActivityUtils.cs:line 31
   at OpenRA.Activities.Activity.TickChild(Actor self) in J:\Modding\OpenRA\Repositories\Darkademic\OpenRA\OpenRA.Game\Activities\Activity.cs:line 144
   at OpenRA.Activities.Activity.TickOuter(Actor self) in J:\Modding\OpenRA\Repositories\Darkademic\OpenRA\OpenRA.Game\Activities\Activity.cs:line 108
   at OpenRA.Traits.ActivityUtils.RunActivity(Actor self, Activity act) in J:\Modding\OpenRA\Repositories\Darkademic\OpenRA\OpenRA.Game\Traits\ActivityUtils.cs:line 31
   at OpenRA.Actor.Tick() in J:\Modding\OpenRA\Repositories\Darkademic\OpenRA\OpenRA.Game\Actor.cs:line 262
   at OpenRA.World.Tick() in J:\Modding\OpenRA\Repositories\Darkademic\OpenRA\OpenRA.Game\World.cs:line 428
   at OpenRA.Game.InnerLogicTick(OrderManager orderManager) in J:\Modding\OpenRA\Repositories\Darkademic\OpenRA\OpenRA.Game\Game.cs:line 622
   at OpenRA.Game.LogicTick() in J:\Modding\OpenRA\Repositories\Darkademic\OpenRA\OpenRA.Game\Game.cs:line 637
   at OpenRA.Game.Loop() in J:\Modding\OpenRA\Repositories\Darkademic\OpenRA\OpenRA.Game\Game.cs:line 802
   at OpenRA.Game.Run() in J:\Modding\OpenRA\Repositories\Darkademic\OpenRA\OpenRA.Game\Game.cs:line 855
   at OpenRA.Game.InitializeAndRun(String[] args) in J:\Modding\OpenRA\Repositories\Darkademic\OpenRA\OpenRA.Game\Game.cs:line 294
   at OpenRA.Launcher.Program.Main(String[] args) in J:\Modding\OpenRA\Repositories\Darkademic\OpenRA\OpenRA.Launcher\Program.cs:line 32
@pchote
Copy link
Member

pchote commented Apr 23, 2022

The testcase doesn't crash for me, can anybody else confirm?

@darkademic
Copy link
Contributor Author

Can confirm it no longer crashes with the fix in place.

@pchote
Copy link
Member

pchote commented Apr 23, 2022

I mean that it doesn't crash on bleed, which makes it difficult to confirm the fix!

@darkademic
Copy link
Contributor Author

Hmmm, try it with 2 bots with you spectating.

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