Jump to content

Priority Value Out Of Range: 0


trashcanhands
  • Branch: Live Branch Version: Windows Pending

Continuously receive the following error when building/supplying farm tiles:

Priority Value Out Of Range: 0

  at UnityEngine.Logger.LogFormat (UnityEngine.LogType logType, System.String format, System.Object[] args) [0x00000] in <c39a522eee05469b8171a6cfeb646c59>:0 
  at UnityEngine.Debug.LogErrorFormat (System.String format, System.Object[] args) [0x00000] in <c39a522eee05469b8171a6cfeb646c59>:0 
  at Debug.LogErrorFormat (System.String format, System.Object[] args) [0x00000] in <eeaae6bd36c2418387bac55a246d67a2>:0 
  at StandardChoreBase..ctor (ChoreType chore_type, IStateMachineTarget target, ChoreProvider chore_provider, System.Boolean run_until_complete, System.Action`1[T] on_complete, System.Action`1[T] on_begin, System.Action`1[T] on_end, PriorityScreen+PriorityClass priority_class, System.Int32 priority_value, System.Boolean is_preemptable, System.Boolean allow_in_context_menu, System.Int32 priority_mod, System.Boolean add_to_daily_report, ReportManager+ReportType report_type) [0x00000] in <c249d7c3f60846a5bd531f8cae02e382>:0 
  at Chore`1[StateMachineInstanceType]..ctor (ChoreType chore_type, IStateMachineTarget target, ChoreProvider chore_provider, System.Boolean run_until_complete, System.Action`1[T] on_complete, System.Action`1[T] on_begin, System.Action`1[T] on_end, PriorityScreen+PriorityClass master_priority_class, System.Int32 master_priority_value, System.Boolean is_preemptable, System.Boolean allow_in_context_menu, System.Int32 priority_mod, System.Boolean add_to_daily_report, ReportManager+ReportType report_type) [0x00000] in <c249d7c3f60846a5bd531f8cae02e382>:0 
  at FetchAreaChore..ctor (Chore+Precondition+Context context) [0x00000] in <c249d7c3f60846a5bd531f8cae02e382>:0 
  at FetchChore.PrepareChore (Chore+Precondition+Context& context) [0x00000] in <c249d7c3f60846a5bd531f8cae02e382>:0 
  at ChoreDriver.SetChore (Chore+Precondition+Context context) [0x00000] in <c249d7c3f60846a5bd531f8cae02e382>:0 
  at Brain.UpdateChores () [0x00000] in <c249d7c3f60846a5bd531f8cae02e382>:0 
  at Brain.UpdateBrain () [0x00000] in <c249d7c3f60846a5bd531f8cae02e382>:0 
  at MinionBrain.UpdateBrain () [0x00000] in <c249d7c3f60846a5bd531f8cae02e382>:0 
  at BrainScheduler+BrainGroup.RenderEveryTick (System.Single dt) [0x00000] in <c249d7c3f60846a5bd531f8cae02e382>:0 
  at BrainScheduler.RenderEveryTick (System.Single dt) [0x00000] in <c249d7c3f60846a5bd531f8cae02e382>:0 
  at SimAndRenderScheduler+RenderEveryTickUpdater.Update (IRenderEveryTick updater, System.Single dt) [0x00000] in <eeaae6bd36c2418387bac55a246d67a2>:0 
  at UpdateBucketWithUpdater`1[DataType].Update (System.Single dt) [0x00000] in <eeaae6bd36c2418387bac55a246d67a2>:0 
  at StateMachineUpdater+BucketGroup.AdvanceOneSubTick (System.Single dt) [0x00000] in <eeaae6bd36c2418387bac55a246d67a2>:0 
  at StateMachineUpdater.RenderEveryTick (System.Single dt) [0x00000] in <eeaae6bd36c2418387bac55a246d67a2>:0 
  at Game.LateUpdate () [0x00000] in <c249d7c3f60846a5bd531f8cae02e382>:0 
Build: U57-704096-SCRPN

 

I wrote a small mod to detect/counteract the crash and added some debug:

[PriorityFixer] Invalid FetchAreaChore priority detected: 0. Fixing to 1. Chore type: Farming Supply
[PriorityFixer] Stack trace:
  at PriorityFixerMod.FetchAreaChore_Constructor_Patch.Prefix (Chore+Precondition+Context& context) [0x00000] in <2aee8edf09fd4ce5acfb9adae56aba3d>:0 
  at FetchAreaChore.FetchAreaChore..ctor_Patch1 (FetchAreaChore , Chore+Precondition+Context ) [0x00000] in <c249d7c3f60846a5bd531f8cae02e382>:0 
  at FetchChore.PrepareChore (Chore+Precondition+Context& context) [0x00000] in <c249d7c3f60846a5bd531f8cae02e382>:0 
  at ChoreDriver.SetChore (Chore+Precondition+Context context) [0x00000] in <c249d7c3f60846a5bd531f8cae02e382>:0 
  at Brain.UpdateChores () [0x00000] in <c249d7c3f60846a5bd531f8cae02e382>:0 
  at Brain.UpdateBrain () [0x00000] in <c249d7c3f60846a5bd531f8cae02e382>:0 
  at MinionBrain.UpdateBrain () [0x00000] in <c249d7c3f60846a5bd531f8cae02e382>:0 
  at BrainScheduler+BrainGroup.RenderEveryTick (System.Single dt) [0x00000] in <c249d7c3f60846a5bd531f8cae02e382>:0 
  at BrainScheduler.RenderEveryTick (System.Single dt) [0x00000] in <c249d7c3f60846a5bd531f8cae02e382>:0 
  at SimAndRenderScheduler+RenderEveryTickUpdater.Update (IRenderEveryTick updater, System.Single dt) [0x00000] in <eeaae6bd36c2418387bac55a246d67a2>:0 
  at UpdateBucketWithUpdater`1[DataType].Update (System.Single dt) [0x00000] in <eeaae6bd36c2418387bac55a246d67a2>:0 
  at StateMachineUpdater+BucketGroup.AdvanceOneSubTick (System.Single dt) [0x00000] in <eeaae6bd36c2418387bac55a246d67a2>:0 
  at StateMachineUpdater.RenderEveryTick (System.Single dt) [0x00000] in <eeaae6bd36c2418387bac55a246d67a2>:0 
  at Game.LateUpdate () [0x00000] in <c249d7c3f60846a5bd531f8cae02e382>:0 
[PriorityFixer] SUSPECT MOD FOUND: Assembly-CSharp-firstpass - Method: RenderEveryTickUpdater.Update
[PriorityFixer] SUSPECT MOD FOUND: Assembly-CSharp-firstpass - Method: UpdateBucketWithUpdater`1.Update
[PriorityFixer] SUSPECT MOD FOUND: Assembly-CSharp-firstpass - Method: BucketGroup.AdvanceOneSubTick
[PriorityFixer] SUSPECT MOD FOUND: Assembly-CSharp-firstpass - Method: StateMachineUpdater.RenderEveryTick

Appears to be a vanilla issue, it happens without mods installed.

 

DxDiag.txt


Steps to Reproduce

Just building a mealwood farm is enough for me to get the crash. At some point during the duplicants building/supplying/planting Farm Tiles, the crash will occur.




User Feedback


I play with a number of mods, and have also been getting a similar exception - ArgumentOutOfRangeException: Index was out of range. Must be non-negative and less than the size of the collection.

Mine happens when i select a duplicant, and i have seen some farm tiles not showing any priority, while in the priority overlay, on 'All'. Managed to get it to a point where i didn't crash on selecting a dupe, while the game was paused, however it crashed again on unpausing, with a very slight different stacktrace.

Do you use 'Synchronized Building Groups' mod? I have farm tiles for the same plants linked via this mod. Just wondering if it might be impacting the priority negatively somehow...

If possible i would love to try your mod, to help fight this crash...

Edited by WolfDK
Adding more details

Share this comment


Link to comment
Share on other sites

I do not use that mod, but I actually started getting the ArgumentOutofRangeException crash as well, so I added it to my mod to handle it as well. Do you use Chain Tool? I feel like it may have something to do with that. Either way, my mod handles both errors and stops the crashes, as well as logging the errors when they happen. I can upload it to the workshop and post the link here if you'd like.

Here ya go!

Fix Recent Crashes

Edited by trashcanhands

Share this comment


Link to comment
Share on other sites

23 minutes ago, trashcanhands said:

I do not use that mod, but I actually started getting the ArgumentOutofRangeException crash as well, so I added it to my mod to handle it as well. Do you use Chain Tool? I feel like it may have something to do with that. Either way, my mod handles both errors and stops the crashes, as well as logging the errors when they happen. I can upload it to the workshop and post the link here if you'd like.

I do have Chain Tool installed, but in my attempt to fix the crash it was one of the mods i have disabled - with no change. In my attempt to solve it, i have disabled almost 10 mods, all related to the chore list, with no luck...

Would very much love to try out the mod, if you'd be open to sharing it.

Share this comment


Link to comment
Share on other sites

I edited my last comment with the link! I honestly think the crashes are vanilla ONI related as I get them with 0 mods installed.

Share this comment


Link to comment
Share on other sites

4 minutes ago, trashcanhands said:

I edited my last comment with the link! I honestly think the crashes are vanilla ONI related as I get them with 0 mods installed.

Oh you went all the way to 0 mods? I play with too many to want to go so far.

Then it indeed sounds like a vanilla bug.

Will try out your mod after eating - hopefully it does the trick :)

Share this comment


Link to comment
Share on other sites

Yeah, I have 72, and went through enabled each 1 by 1. It was a nightmare and yielded no results lol

 

Edited by trashcanhands

Share this comment


Link to comment
Share on other sites

2 hours ago, trashcanhands said:

Yeah, I have 72, and went through enabled each 1 by 1. It was a nightmare and yielded no results lol

 

I have just shy of 150, so not going through that...

Good news your mod solves my crash, even though the exception i get and trigger are not exactly the same as what you initially described.

Share this comment


Link to comment
Share on other sites

Good deal! I updated the mod to cover the crash error you mentioned, as I did get it from time to time as well.

If you have time and don't care to, can you upvote it and maybe leave a comment saying it works on the workshop page so people know? That'd be awesome, hopefully it can help some others.

Just saw you did already leave a comment. Much appreciated, brother.

Edited by trashcanhands

Share this comment


Link to comment
Share on other sites

Hi just began getting this issue myself, same exact story priority gets lost on mealwood farm tiles specifically. The link to your fix seems to have broken, can you post another please?

Share this comment


Link to comment
Share on other sites



Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×
  • Create New...