bbradson / Performance-Fish

Performance Mod for RimWorld
Mozilla Public License 2.0
423 stars 34 forks source link

I'm not sure the error I had is related to performance fish, because I have a lot of mods, but I noticed PerformanceFish in the error log. #43

Closed liyifanlimeng closed 2 months ago

liyifanlimeng commented 2 months ago

Soyuz caught this error. Please don't report this to the RocketMan team unless you're certain RocketMan caused this error. with error System.InvalidOperationException: Failed to find parent index in FishTable<PerformanceFish.GroupThingPair, System.Int32> for key: 'GroupThingPair { ThingRequestGroup = Everything, ThingIDNumber = 23147 }', hashCode: '33577579', value: '11', count: '26', bucket array length: '128', total tailing entries count: '1', known chain of tails: { index: '9' key: 'GroupThingPair { ThingRequestGroup = BuildingArtificial, ThingIDNumber = 39517 }', hashCode: '167811677', value: '0 } { index: '10' key: 'GroupThingPair { ThingRequestGroup = 127, ThingIDNumber = 8355711 }', hashCode: '2139062143', value: '0 (empty) } [Ref 468CD6BD] at FisheryLib.Collections.FishTable2+ThrowHelper[TKey,TValue].ThrowFailedToFindParentInvalidOperationException (FisheryLib.Collections.FishTable2[TKey,TValue] fishTable, System.Int32 childBucketIndex) [0x001ae] in :0 at FisheryLib.Collections.FishTable2[TKey,TValue].GetParentBucketIndex (System.Int32 childBucketIndex, System.Boolean throwOnFailure) [0x0001f] in <a3e8b53a325844e98f60ef692520ce62>:0 at FisheryLib.Collections.FishTable2[TKey,TValue].InsertAsTail (FisheryLib.Collections.FishTable2+Entry[TKey,TValue]& entry, System.Int32 bucketIndex) [0x0002c] in <a3e8b53a325844e98f60ef692520ce62>:0 at FisheryLib.Collections.FishTable2[TKey,TValue].InsertEntryInternal (FisheryLib.Collections.FishTable2+Entry[TKey,TValue]& entry, FisheryLib.Collections.FishTable2+ReplaceBehaviour[TKey,TValue] replaceBehaviour) [0x000b5] in :0 at FisheryLib.Collections.FishTable2[TKey,TValue].InsertEntry (FisheryLib.Collections.FishTable2+Entry[TKey,TValue]& entry, FisheryLib.Collections.FishTable2+ReplaceBehaviour[TKey,TValue] replaceBehaviour, System.Boolean shifting) [0x00000] in <a3e8b53a325844e98f60ef692520ce62>:0 at FisheryLib.Collections.FishTable2[TKey,TValue].InsertEntry (TKey key, TValue value, FisheryLib.Collections.FishTable2+ReplaceBehaviour[TKey,TValue] replaceBehaviour, System.Boolean shifting) [0x00008] in <a3e8b53a325844e98f60ef692520ce62>:0 at FisheryLib.Collections.FishTable2[TKey,TValue].set_Item (TKey key, TValue value) [0x00000] in :0 at PerformanceFish.Listers.ThingsPrepatches.AddToGroupList (Verse.ListerThings lister, Verse.Thing thing, Verse.ThingRequestGroup thingRequestGroup) [0x0004f] in :0 at Verse.ListerThings.Add (Verse.Thing t) [0x00060] in <957a20e0be784a65bc32cf449445b937>:0 at Verse.RegionListersUpdater.RegisterInRegions (Verse.Thing thing, Verse.Map map) [0x0003a] in <957a20e0be784a65bc32cf449445b937>:0 at Verse.Thing.set_Position (Verse.IntVec3 value) [0x000b2] in <957a20e0be784a65bc32cf449445b937>:0 at Verse.AI.Pawn_PathFollower.TryEnterNextPathCell () [0x0014f] in <957a20e0be784a65bc32cf449445b937>:0

Review FishTable Implementation: Take a closer look at how the FishTable collection is implemented in your code. Check if there are any issues with how parent indexes are managed or if there are any inconsistencies in the data structure. Verify Key Existence: Ensure that the key being searched for ("GroupThingPair { ThingRequestGroup = Everything, ThingIDNumber = 23147 }") actually exists in the FishTable collection. If it doesn't, investigate why it's being accessed and whether it should be present. Debugging: Debug the code where the error occurs to understand the context better. Check the values of variables involved in the operation to identify any unexpected behavior. Check Modifications: It seems there are modifications made by various patches (such as Soyuz and RocketMan) to the affected methods. Review these patches to see if they unintentionally introduce issues related to the FishTable or its usage. Consult Documentation or Source Code: If FishTable is part of a library or framework, consult its documentation or source code to understand how it's supposed to be used and if there are any specific requirements or constraints. Isolate the Issue: If possible, try to isolate the issue by creating a minimal reproducible example. This can help narrow down the problem and identify the root cause more effectively. Collaborate with Team: If you're working in a team, collaborate with other developers to troubleshoot the issue together. They might offer insights or suggestions that you haven't considered. By following these steps, you should be able to investigate and resolve the error related to the FishTable collection in your code.

Exception ticking AEXP_CatSphynx16382 (at (118, 0, 101)): System.InvalidOperationException: Failed to find parent index in FishTable<PerformanceFish.GroupThingPair, System.Int32> for key: 'GroupThingPair { ThingRequestGroup = Everything, ThingIDNumber = 23147 }', hashCode: '33577579', value: '11', count: '26', bucket array length: '128', total tailing entries count: '1', known chain of tails: { index: '9' key: 'GroupThingPair { ThingRequestGroup = BuildingArtificial, ThingIDNumber = 39517 }', hashCode: '167811677', value: '0 } { index: '10' key: 'GroupThingPair { ThingRequestGroup = 127, ThingIDNumber = 8355711 }', hashCode: '2139062143', value: '0 (empty) } [Ref 33F6BEF2] at FisheryLib.Collections.FishTable2+ThrowHelper[TKey,TValue].ThrowFailedToFindParentInvalidOperationException (FisheryLib.Collections.FishTable2[TKey,TValue] fishTable, System.Int32 childBucketIndex) [0x001ae] in :0 at FisheryLib.Collections.FishTable2[TKey,TValue].GetParentBucketIndex (System.Int32 childBucketIndex, System.Boolean throwOnFailure) [0x0001f] in <a3e8b53a325844e98f60ef692520ce62>:0 at FisheryLib.Collections.FishTable2[TKey,TValue].InsertAsTail (FisheryLib.Collections.FishTable2+Entry[TKey,TValue]& entry, System.Int32 bucketIndex) [0x0002c] in <a3e8b53a325844e98f60ef692520ce62>:0 at FisheryLib.Collections.FishTable2[TKey,TValue].InsertEntryInternal (FisheryLib.Collections.FishTable2+Entry[TKey,TValue]& entry, FisheryLib.Collections.FishTable2+ReplaceBehaviour[TKey,TValue] replaceBehaviour) [0x000b5] in :0 at FisheryLib.Collections.FishTable2[TKey,TValue].InsertEntry (FisheryLib.Collections.FishTable2+Entry[TKey,TValue]& entry, FisheryLib.Collections.FishTable2+ReplaceBehaviour[TKey,TValue] replaceBehaviour, System.Boolean shifting) [0x00000] in <a3e8b53a325844e98f60ef692520ce62>:0 at FisheryLib.Collections.FishTable2[TKey,TValue].InsertEntry (TKey key, TValue value, FisheryLib.Collections.FishTable2+ReplaceBehaviour[TKey,TValue] replaceBehaviour, System.Boolean shifting) [0x00008] in <a3e8b53a325844e98f60ef692520ce62>:0 at FisheryLib.Collections.FishTable2[TKey,TValue].set_Item (TKey key, TValue value) [0x00000] in :0 at PerformanceFish.Listers.ThingsPrepatches.AddToGroupList (Verse.ListerThings lister, Verse.Thing thing, Verse.ThingRequestGroup thingRequestGroup) [0x0004f] in :0 at Verse.ListerThings.Add (Verse.Thing t) [0x00060] in <957a20e0be784a65bc32cf449445b937>:0 at Verse.RegionListersUpdater.RegisterInRegions (Verse.Thing thing, Verse.Map map) [0x0003a] in <957a20e0be784a65bc32cf449445b937>:0 at Verse.Thing.set_Position (Verse.IntVec3 value) [0x000b2] in <957a20e0be784a65bc32cf449445b937>:0 at Verse.AI.Pawn_PathFollower.TryEnterNextPathCell () [0x0014f] in <957a20e0be784a65bc32cf449445b937>:0