ABrandau / Shattered-Paradise-SDK

Shattered Paradise's main repository and installation Kit.
GNU General Public License v3.0
58 stars 9 forks source link

Crash System.InvalidOperationException: Sequence contains no matching element #66

Closed vgaming closed 2 months ago

vgaming commented 3 months ago

Hi! I was playing skirmish, and upon destroying one of the very last or literally the last structure of AI, the game crashed with this in the terminal:

Platform is Linux (X64)
Engine version is 3cf8d362182ffc6431b011ebef6ef70616f696ab
Runtime: .NET CLR 6.0.30
Using SDL 2 with OpenGL (Modern) renderer
Desktop resolution: 3840x2160
No custom resolution provided, using desktop resolution
Using resolution: 3840x2160
Using window scale 1,00
OpenGL renderer: AMD Radeon RX 7900 XT (radeonsi, navi31, LLVM 17.0.6, DRM 3.57, 6.9.3-arch1-1)
OpenGL version: 4.6 (Core Profile) Mesa 24.1.1-arch1.1
Using default sound device
Internal mods:
    modcontent: Mod Content Manager (3cf8d362182ffc6431b011ebef6ef70616f696ab)
    sp: Shattered Paradise (playtest-20240526)
External mods:
    sp-playtest-20240526: Shattered Paradise (playtest-20240526)
Loading mod: sp
[2024-06-11T15.57.16] Game started
Exception of type `System.InvalidOperationException`: Sequence contains no matching element
   at System.Linq.ThrowHelper.ThrowNoMatchException()
   at OpenRA.Mods.Common.Traits.SpawnActorPower.<>c__DisplayClass2_0.<Activate>b__0(World w) in /home/runner/work/Shattered-Paradise-SDK/Shattered-Paradise-SDK/engine/OpenRA.Mods.Common/Traits/SupportPowers/SpawnActorPower.cs:line 81
   at OpenRA.World.Tick() in /home/runner/work/Shattered-Paradise-SDK/Shattered-Paradise-SDK/engine/OpenRA.Game/World.cs:line 463
   at OpenRA.Game.InnerLogicTick(OrderManager orderManager) in /home/runner/work/Shattered-Paradise-SDK/Shattered-Paradise-SDK/engine/OpenRA.Game/Game.cs:line 651
   at OpenRA.Game.LogicTick() in /home/runner/work/Shattered-Paradise-SDK/Shattered-Paradise-SDK/engine/OpenRA.Game/Game.cs:line 666
   at OpenRA.Game.Loop() in /home/runner/work/Shattered-Paradise-SDK/Shattered-Paradise-SDK/engine/OpenRA.Game/Game.cs:line 835
   at OpenRA.Game.Run() in /home/runner/work/Shattered-Paradise-SDK/Shattered-Paradise-SDK/engine/OpenRA.Game/Game.cs:line 888
   at OpenRA.Game.InitializeAndRun(String[] args) in /home/runner/work/Shattered-Paradise-SDK/Shattered-Paradise-SDK/engine/OpenRA.Game/Game.cs:line 313
   at OpenRA.Launcher.Program.Main(String[] args) in /home/runner/work/Shattered-Paradise-SDK/Shattered-Paradise-SDK/engine/OpenRA.Launcher/Program.cs:line 32

Does this stack trace help investigating in any way? Any additional info needed that could be helpful?

Thanks again for Shattered Paradise!

dnqbob commented 3 months ago

I need a replay on this, thanx

dnqbob commented 3 months ago

So was AI using support power? or you were using the support power at the very moment?

dnqbob commented 3 months ago

I have filled a fix on that, should fix the crash but it is better that I have the replay to confirm it.

vgaming commented 3 months ago

So was AI using support power? or you were using the support power at the very moment?

If I remember correctly, it's neither. Just destroying that single last building (or one of the last) with the whole army I've got.

vgaming commented 3 months ago

I'll try to do something about the replay. The problem is that I'm patching the yaml files to alter the rules. Nothing big, just e.g. to add an even slower game setting, or remove the possibility to have unit duplication from a crate (that's a bit over-powered for me), or cheat and add the possibility to build a hospital. I'll see if I can send the replay + the patch.

vgaming commented 3 months ago

UPDATE: it was an AI radar that got destroyed. It wasn't the last building of the AI.

Unfortunately, the game is pretty long, and with some pauses in it, too. Plus, as I've said, it requires patching the yaml files.. That being said, here's the replay and the yaml patch:

game-crash-rules.patch sp-2024-06-11T135718Z.zip

vgaming commented 3 months ago

Alternatively, I could try to build the patched version that you've created @dnqbob, and see if that works on the replay

dnqbob commented 3 months ago

Could you just give me a copy of your yamls? Patch cannot be applied.

vgaming commented 3 months ago

@dnqbob it was on top of the latest release (not the bleeding edge). Let me send the archive, 1 moment.

vgaming commented 3 months ago

I've removed "uibits", "maps" and "bits" directories to fit into github's file size requirements. The rest is attached: sp.zip

dnqbob commented 3 months ago

Thanks for the file and replay: 无标题 In bug-fixed version, I have reach the final frame without crash, which means bug is fixed. The timer above is buggy under 200% play speed so don't mind that.

I am sure this is the very moment and the last object you destroy is a radar 无标题2

vgaming commented 3 months ago

@dnqbob Yess! Awesome, thank you! :heart:

dnqbob commented 3 months ago

Bug report and player's playtest is always welcomed here.

dnqbob commented 2 months ago

Fixed and closed by https://github.com/MustaphaTR/OpenRA/pull/159