Game crashes when trying to start Arcade mode.

youmightbecancer

Green Slime
When I click 'Start' after designing or randomizing a character to play arcade mode, my game instantly crashes.
No other issues with the game's performance. Story mode works perfectly fine.

Here is the crash log:
Version: 0.800a Steamy Hot Stable

Error: System.ArgumentOutOfRangeException: Index was out of range. Must be non-negative and less than the size of the collection.
Parameter name: index
at System.ThrowHelper.ThrowArgumentOutOfRangeException()
at SoG.Game1.__Menu_PWRogueLikeSingleStartThread(Object knark) in (path)\States\Menus\MainMenus.cs:line 1636
at SoG.Game1.<__Menu_PWRogueLikeSingleStart>b__8f(Object state) in (path)\States\Menus\MainMenus.cs:line 1533 - FullScreen: No - NetworkRole: LocalOnly - MD5: 04030f7f310a5b3bae1ae3ad1ab46da1​
 

Teddy

Developer
Staff member
What happens if you delete/rename the arcade mode save file?

You can find it in "%APPDATA%/Secrets of Grindea", it's named "arcademode.sav"
 

youmightbecancer

Green Slime
Deleted the "arcademode.sav", game still crashed when pressing 'Start' in Arcade. It created a new "arcademode.sav".

Logs:
Version: 0.800a Steamy Hot Stable

Error: System.ArgumentOutOfRangeException: Index was out of range. Must be non-negative and less than the size of the collection.
Parameter name: index
at System.ThrowHelper.ThrowArgumentOutOfRangeException()
at SoG.Game1.__Menu_PWRogueLikeSingleStartThread(Object knark) in (path)\States\Menus\MainMenus.cs:line 1636
at SoG.Game1.<__Menu_PWRogueLikeSingleStart>b__8f(Object state) in (path)\States\Menus\MainMenus.cs:line 1533 - FullScreen: No - NetworkRole: LocalOnly - MD5: 04030f7f310a5b3bae1ae3ad1ab46da1
 

Teddy

Developer
Staff member
What seems to be happening is that it crashes when trying to access the Arcade Mode highscores, saying there are none, which is weird because when a new Arcade Mode save file is created ten fake high scores are (at least should be) created automatically!

For science, could you try downloading the attached file and replacing your arcade save with its contents?

It's basically a random save file I had on my computer which I know do contain high scores, so if the game still crashes we can conclude it's not because of the auto-score generation failing.
 

Attachments

  • arcademode.zip
    675 bytes · Views: 2

youmightbecancer

Green Slime
Still crashed at same point. Same crash logs too.

Version: 0.800a Steamy Hot Stable

Error: System.ArgumentOutOfRangeException: Index was out of range. Must be non-negative and less than the size of the collection.
Parameter name: index
at System.ThrowHelper.ThrowArgumentOutOfRangeException()
at SoG.Game1.__Menu_PWRogueLikeSingleStartThread(Object knark) in (path)\States\Menus\MainMenus.cs:line 1636
at SoG.Game1.<__Menu_PWRogueLikeSingleStart>b__8f(Object state) in (path)\States\Menus\MainMenus.cs:line 1533 - FullScreen: No - NetworkRole: LocalOnly - MD5: 04030f7f310a5b3bae1ae3ad1ab46da1
 

The G-Meister

Giga Slime
I wonder if it was an issue with steam not downloading a file then, especially as I don't think the current frontline is even different to the stable :confused:
 

youmightbecancer

Green Slime
I wonder if it was an issue with steam not downloading a file then, especially as I don't think the current frontline is even different to the stable :confused:

Frontline does not work. V0.730 is the stable version pre-frontline.
I've also verified files and re-downloaded current version multiple times.
 

Teddy

Developer
Staff member
Sometimes an error happens silently somewhere else and then crashes the game later, so I'd like to get some more intel on the game state coming up to the crash!

I'll try to whip up a diagnostic build on the SpecOps branch this afternoon (I'll post the pass to the specops beta when it's uploaded!) Basically it's a normal build except it will collect some extra data and attach it to the crash log.
 

Teddy

Developer
Staff member
Alright, I've uploaded a build that should add some debug variables to the crash report!

To download the special build, go to the beta switch in Steam and enter the password: thebloomorises

This will unlock the Specops1 branch!
 

youmightbecancer

Green Slime
Downloaded / Crashed at same place, here are the logs:

Version: 0.800a Steamy Hot Unstable

Error: System.ArgumentOutOfRangeException: Index was out of range. Must be non-negative and less than the size of the collection.
Parameter name: index
at System.ThrowHelper.ThrowArgumentOutOfRangeException()
at SoG.Game1.__Menu_PWRogueLikeSingleStartThread(Object knark) in (path)\States\Menus\MainMenus.cs:line 1657
at SoG.Game1.<__Menu_PWRogueLikeSingleStart>b__16(Object state) in (path)\States\Menus\MainMenus.cs:line 1534 - FullScreen: No - NetworkRole: LocalOnly - HS Count: 0 - RS Inited: true - tx_0: started - Checkpoint: h - MD5: d04fb1e10de60ab7456b7778a7a601e7
 

Teddy

Developer
Staff member
The quest continues! The log gave some interesting clues - I've updated the specops branch again, adding some more more checks, which should hopefully narrow it down even more.

Thanks for staying on this wild bugride!
 

youmightbecancer

Green Slime
It's not a problem!
Here's the new logs:

Version: 0.800a Steamy Hot Unstable

Error: System.ArgumentOutOfRangeException: Index was out of range. Must be non-negative and less than the size of the collection.
Parameter name: index
at System.ThrowHelper.ThrowArgumentOutOfRangeException()
at SoG.Game1.__Menu_PWRogueLikeSingleStartThread(Object knark) in (path)\States\Menus\MainMenus.cs:line 1657
at SoG.Game1.<__Menu_PWRogueLikeSingleStart>b__16(Object state) in (path)\States\Menus\MainMenus.cs:line 1534 - FullScreen: No - NetworkRole: LocalOnly - rl_cp: g - rl_oslo: System.ArgumentOutOfRangeException: Index was out of range. Must be non-negative and less than the size of the collection.
Parameter name: index
at System.ThrowHelper.ThrowArgumentOutOfRangeException()
at Quests.Quest.GetStartOfCurrentGroup() in C:\Dropbox\Eget jox\!DugTrio\Legend Of Grindia\Legend Of Grindia\Legend Of Grindia\GameProgress\Quests\QuestCodex.cs:line 1591
at SoG.Game1._Loading_LoadRogueFile(String sFileName) in C:\Dropbox\Eget jox\!DugTrio\Legend Of Grindia\Legend Of Grindia\Legend Of Grindia\GameProgress\Saving\Saving.cs:line 2710 - hsc: 0 - rsi: true - chkP: h - tx_0: started - MD5: 91adfb2e2d3b2a969ddcdb6854da5ab4
 

Teddy

Developer
Staff member
Hmm... that's a weird error! It tries to load a quest, even though your save file should be blank... I wonder if there's some bug in the saving that's gutting your file somehow.

I've updated the specops build yet again with some more checks!

Also, could you upload your arcademode.sav to the forum so I could take a look at it? You might need to zip it first!
 

youmightbecancer

Green Slime
Here are the logs again and the arcademode.sav file:

Version: 0.800a Steamy Hot Unstable

Error: System.ArgumentOutOfRangeException: Index was out of range. Must be non-negative and less than the size of the collection.
Parameter name: index
at System.ThrowHelper.ThrowArgumentOutOfRangeException()
at SoG.Game1.__Menu_PWRogueLikeSingleStartThread(Object knark) in (path)\States\Menus\MainMenus.cs:line 1657
at SoG.Game1.<__Menu_PWRogueLikeSingleStart>b__16(Object state) in (path)\States\Menus\MainMenus.cs:line 1534 - FullScreen: No - NetworkRole: LocalOnly - rl_cp: g - rl_aq1: None - rl_aq2: _MainQuest_FirstVillage_FindApples - rl_aq2b: 10 - rl_oslo: System.ArgumentOutOfRangeException: Index was out of range. Must be non-negative and less than the size of the collection.
Parameter name: index
at System.ThrowHelper.ThrowArgumentOutOfRangeException()
at Quests.Quest.GetStartOfCurrentGroup() in C:\Dropbox\Eget jox\!DugTrio\Legend Of Grindia\Legend Of Grindia\Legend Of Grindia\GameProgress\Quests\QuestCodex.cs:line 1591
at SoG.Game1._Loading_LoadRogueFile(String sFileName) in C:\Dropbox\Eget jox\!DugTrio\Legend Of Grindia\Legend Of Grindia\Legend Of Grindia\GameProgress\Saving\Saving.cs:line 2721 - rls_q: None - rls_qn: true - hsc: 0 - rsi: true - tx_0: started - chkP: h - MD5: e086013d38406d90d4edd1e7c2d67937
 

Attachments

  • arcademode.sav.zip
    704 bytes · Views: 1

Teddy

Developer
Staff member
I noticed that your zip has the same bonus folders we get from our sound guy, who's on a Mac! Are you using Wine on OSX or something similar? I actually think this might be an interpreter or JIT-bug in Wine if that's the case. The save file you sent me is working properly for me, and looking at it step by step and comparing it to the error logs, I'm fairly certain that the code is not running as written on your machine :(

I've updated the game yet again, changing the code slightly! If we're lucky this will make you able to load Arcade Mode - and hopefully that bug won't ruin anything inside the mode itself.
 

youmightbecancer

Green Slime
My steam is wrapped, yes. Probably something I should have mentioned in hindsight, but I've used steam like this for so long, I don't really think of it!
Sorry for the ordeal.

It works perfectly now.
 

Teddy

Developer
Staff member
Glad that it works! With some luck you might be able to play bug-free now, but you might run into issues with quests. Fingers crossed!

As usual with bizarre bugs, for wanderers interested in code I'll write a quick abridged description of what seems to have happened:

With the new Arcade Mode, the "Active Quest" variable got changed from a field to a property. The property returns the local active quest if the user is not in a replay, but if the player is in a replay, it returns an override value instead.

When used in comparison, the returned value seems to always compare false, even when it's nonsensical for it to do so.

Here's a paraphrased code snippet and the behavior exhibited:

Code:
enActiveQuest = (QuestID)file.ReadUInt16(); // QuestID is an enum type, this line reads from save

Debug.LogExtra["rl_aq1"] = enActiveQuest; // Outputs to 'None' as can be seen in the logs

if (enActiveQuest != QuestID.None) // This returns true even though enActiveQuest was set to None just one line ago
                    { [...load quests] } // This code should not run, but it does, resulting in improper reads from the save file

I don't have enough insight into Wine or even the native .NET interpreter to know exactly how this came to be, but I'm fairly sure that's how it played out.

How I "fixed" the bug was to access the underlying field instead of the property, since there's no scenario where the game saves or loads the replay quest anyway.
 
Top