OpenRA icon indicating copy to clipboard operation
OpenRA copied to clipboard

Cannot AddInfluence until previous influence is removed with RemoveInfluence

Open fusion809 opened this issue 10 months ago • 5 comments

Issue Summary

I was just running the Red Alert AppImage built for commit 440987c in my Arch Linux Windows Subsystem for Linux 2 (WSL2) and it crashed with the error:

Exception of type `System.InvalidOperationException`: Cannot AddInfluence until previous influence is removed with RemoveInfluence
   at OpenRA.Mods.Common.Traits.Aircraft.AddInfluence(ValueTuple`2[] landingCells) in /mnt/d/GitHub/others/OpenRA/OpenRA.Mods.Common/Traits/Air/Aircraft.cs:line 875
   at OpenRA.Mods.Common.Traits.Aircraft.AddInfluence(CPos landingCell) in /mnt/d/GitHub/others/OpenRA/OpenRA.Mods.Common/Traits/Air/Aircraft.cs:line 886
   at OpenRA.Mods.Common.Activities.Land.Tick(Actor self) in /mnt/d/GitHub/others/OpenRA/OpenRA.Mods.Common/Activities/Air/Land.cs:line 236
   at OpenRA.Activities.Activity.TickOuter(Actor self) in /mnt/d/GitHub/others/OpenRA/OpenRA.Game/Activities/Activity.cs:line 108
   at OpenRA.Traits.ActivityUtils.RunActivity(Actor self, Activity act) in /mnt/d/GitHub/others/OpenRA/OpenRA.Game/Traits/ActivityUtils.cs:line 29
   at OpenRA.Activities.Activity.TickChild(Actor self) in /mnt/d/GitHub/others/OpenRA/OpenRA.Game/Activities/Activity.cs:line 144
   at OpenRA.Activities.Activity.TickOuter(Actor self) in /mnt/d/GitHub/others/OpenRA/OpenRA.Game/Activities/Activity.cs:line 108
   at OpenRA.Traits.ActivityUtils.RunActivity(Actor self, Activity act) in /mnt/d/GitHub/others/OpenRA/OpenRA.Game/Traits/ActivityUtils.cs:line 29
   at OpenRA.Activities.Activity.TickChild(Actor self) in /mnt/d/GitHub/others/OpenRA/OpenRA.Game/Activities/Activity.cs:line 144
   at OpenRA.Activities.Activity.TickOuter(Actor self) in /mnt/d/GitHub/others/OpenRA/OpenRA.Game/Activities/Activity.cs:line 108
   at OpenRA.Traits.ActivityUtils.RunActivity(Actor self, Activity act) in /mnt/d/GitHub/others/OpenRA/OpenRA.Game/Traits/ActivityUtils.cs:line 29
   at OpenRA.Actor.Tick() in /mnt/d/GitHub/others/OpenRA/OpenRA.Game/Actor.cs:line 270
   at OpenRA.World.Tick() in /mnt/d/GitHub/others/OpenRA/OpenRA.Game/World.cs:line 456
   at OpenRA.Game.InnerLogicTick(OrderManager orderManager) in /mnt/d/GitHub/others/OpenRA/OpenRA.Game/Game.cs:line 644
   at OpenRA.Game.LogicTick() in /mnt/d/GitHub/others/OpenRA/OpenRA.Game/Game.cs:line 659
   at OpenRA.Game.Loop() in /mnt/d/GitHub/others/OpenRA/OpenRA.Game/Game.cs:line 828
   at OpenRA.Game.Run() in /mnt/d/GitHub/others/OpenRA/OpenRA.Game/Game.cs:line 881
   at OpenRA.Game.InitializeAndRun(String[] args) in /mnt/d/GitHub/others/OpenRA/OpenRA.Game/Game.cs:line 313
   at OpenRA.Launcher.Program.Main(String[] args) in /mnt/d/GitHub/others/OpenRA/OpenRA.Launcher/Program.cs:line 46

Reproduction

I don't remember exactly what I was doing, I was just playing the game and didn't expect the game to crash out of the blue. But to reproduce it you could try building the AppImages for commit 440987c on an Arch WSL2 and play a Red Alert game.

Screenshots / Screen recordings / Replays

In here is my replay. orarep-20250131.zip

fusion809 avatar Jan 31 '25 06:01 fusion809

If I run the replay on that commit I desync. Are you sure you were using it? Can you confirm that when you run the replay to reproduce the same crash?

PunkPun avatar Jan 31 '25 12:01 PunkPun

Hmm, good point. I just ran the replay and it didn't crash on me. Sorry, I wish I knew what I was doing when this happened, but I was enjoying the game in the moment, not expecting a crash and hence paying attention to everything I was doing to help with its reproduction.

fusion809 avatar Jan 31 '25 12:01 fusion809

For this specific error we need the replay and the exact commits the game was built on. The exception message is not helpful.

Due to OpenRA being fully deterministic, to reproduce most errors you don't need to figure out what steps to take to reproduce it. The replay itself contains the reproduction steps. However it seems that you weren't running on the commit you said, or something was modified. Or maybe the issue lies somewhere outside the simulation, in which case it would be quite alarming

PunkPun avatar Jan 31 '25 13:01 PunkPun

Hmm. When I build OpenRA as an AppImage I set the version to the commit number dot git dot a 7-character commit hash. So each commit gets its own replay directory within ~/.config/openra/Replays/ra. And the AppImage for that commit will only show me replays for that commit. So I know for a fact it was the right commit. Next time I play the game, I'll pay more attention to what I'm doing as now I'm expecting a bug.

fusion809 avatar Jan 31 '25 13:01 fusion809

Hi all. I just experienced the same issue. I am running from bleed on my Mac M1 and my build is based on 9c8470d18e3d850583e64a5defc5d3492ba5055b and was created with

make RUNTIME=mono

I was playing a custom map, this is the logs:

Platform is OSX (Arm64)
Engine version is {DEV_VERSION}
Runtime: .NET CLR 8.0.8
Using SDL 2 with OpenGL (Modern) renderer
Desktop resolution: 1512x982
No custom resolution provided, using desktop resolution
Using resolution: 1512x982
2025-06-03 22:44:56.416 dotnet[14372:391831635] +[IMKClient subclass]: chose IMKClient_Modern
2025-06-03 22:44:56.416 dotnet[14372:391831635] +[IMKInputSession subclass]: chose IMKInputSession_Modern
Using new resolution: 1512x945
Using window scale 2.00
OpenGL renderer: Apple M1 Max
OpenGL version: 4.1 Metal - 89.3
Using default sound device
Internal mods:
	cnc ({DEV_VERSION})
	d2k ({DEV_VERSION})
	ts-content ({DEV_VERSION})
	cnc-content ({DEV_VERSION})
	all ({DEV_VERSION})
	ra ({DEV_VERSION})
	d2k-content ({DEV_VERSION})
	ra-content ({DEV_VERSION})
	ts ({DEV_VERSION})
External mods:
	ra-{DEV_VERSION} ({DEV_VERSION})
	rv-playtest-20240218 (playtest-20240218)
	cnc-{DEV_VERSION} ({DEV_VERSION})
	ts-{DEV_VERSION} ({DEV_VERSION})
	ra-release-20231010 (release-20231010)
	d2k-{DEV_VERSION} ({DEV_VERSION})
Loading mod: ra
UNSUPPORTED (log once): POSSIBLE ISSUE: unit 0 GLD_TEXTURE_INDEX_2D is unloadable and bound to sampler type (Float) - using zero texture because texture unloadable
/Users/ericlacher/Library/Application Support/OpenRA/maps/ra/{DEV_VERSION}/innenaussen.oramap was added
[2025-06-03T23:10:20] Game started.
Exception of type `System.InvalidOperationException`: Cannot AddInfluence until previous influence is removed with RemoveInfluence
   at OpenRA.Mods.Common.Traits.Aircraft.AddInfluence(ValueTuple`2[] landingCells) in /Users/ericlacher/opt/OpenRA/OpenRA.Mods.Common/Traits/Air/Aircraft.cs:line 875
   at OpenRA.Mods.Common.Traits.Aircraft.AddInfluence(CPos landingCell) in /Users/ericlacher/opt/OpenRA/OpenRA.Mods.Common/Traits/Air/Aircraft.cs:line 885
   at OpenRA.Mods.Common.Activities.Land.Tick(Actor self) in /Users/ericlacher/opt/OpenRA/OpenRA.Mods.Common/Activities/Air/Land.cs:line 236
   at OpenRA.Activities.Activity.TickOuter(Actor self) in /Users/ericlacher/opt/OpenRA/OpenRA.Game/Activities/Activity.cs:line 97
   at OpenRA.Traits.ActivityUtils.RunActivity(Actor self, Activity act) in /Users/ericlacher/opt/OpenRA/OpenRA.Game/Traits/ActivityUtils.cs:line 28
   at OpenRA.Activities.Activity.TickChild(Actor self) in /Users/ericlacher/opt/OpenRA/OpenRA.Game/Activities/Activity.cs:line 144
   at OpenRA.Activities.Activity.TickOuter(Actor self) in /Users/ericlacher/opt/OpenRA/OpenRA.Game/Activities/Activity.cs:line 127
   at OpenRA.Traits.ActivityUtils.RunActivity(Actor self, Activity act) in /Users/ericlacher/opt/OpenRA/OpenRA.Game/Traits/ActivityUtils.cs:line 28
   at OpenRA.Activities.Activity.TickChild(Actor self) in /Users/ericlacher/opt/OpenRA/OpenRA.Game/Activities/Activity.cs:line 144
   at OpenRA.Activities.Activity.TickOuter(Actor self) in /Users/ericlacher/opt/OpenRA/OpenRA.Game/Activities/Activity.cs:line 129
   at OpenRA.World.Tick() in /Users/ericlacher/opt/OpenRA/OpenRA.Game/World.cs:line 459
   at OpenRA.Game.InnerLogicTick(OrderManager orderManager) in /Users/ericlacher/opt/OpenRA/OpenRA.Game/Game.cs:line 661
   at OpenRA.Game.LogicTick() in /Users/ericlacher/opt/OpenRA/OpenRA.Game/Game.cs:line 685
   at OpenRA.Game.Loop() in /Users/ericlacher/opt/OpenRA/OpenRA.Game/Game.cs:line 857
   at OpenRA.Game.Run() in /Users/ericlacher/opt/OpenRA/OpenRA.Game/Game.cs:line 910
   at OpenRA.Game.InitializeAndRun(String[] args) in /Users/ericlacher/opt/OpenRA/OpenRA.Game/Game.cs:line 339
   at OpenRA.Launcher.Program.Main(String[] args) in /Users/ericlacher/opt/OpenRA/OpenRA.Launcher/Program.cs:line 46

It's quite long time ago I set up the build so I do not recall the details, but I had to do quite some manual efforts to get the libs in place and I am not sure I did everything the way it should be. Having said that, the game was stable for me for a long time (June 2024) and just recently (weeks) seems to have started becoming unstable (2nd time this week).

I possibly should mention that I was using cheats in this session and therefore already had created around 300 Mammoths and a similar amount of Rocket Submarines. So far I believed the game wouldn't be able to handle this "misusage" and attributed the first crash a few weeks ago to that.

Attached you may find the replay.

Thanks for all your efforts, enjoying playing RA a lot! If there's anything more needed, just ping me.

ra-2025-06-03T211021Z.orarep.zip

ericlacher avatar Jun 03 '25 21:06 ericlacher

I found a reliable reproducer when adjusting the game rules. https://github.com/OpenRA/OpenRA/issues/21987

Mailaender avatar Jul 23 '25 17:07 Mailaender