[#bugs] Encountered massive exception spam while placing villages and generating dynamic...

Issue #12284 resolved
Freehold Games Bot Account created an issue

Marked for crossposting by: kernel

Message (jump):

<kernel> Encountered massive exception spam while placing villages and generating dynamic village quests that caused my procgen starting village not to generate correctly and dropped me into a plain canyons zone.

Comments (7)

  1. kernelmethod
    INFO - Placing lairs
    INFO - Placing villages
    Placing villages: System.ArgumentException: An item with the same key has already been added. Key: Toughness:base
      at System.Collections.Generic.Dictionary`2[TKey,TValue].TryInsert (TKey key, TValue value, System.Collections.Generic.InsertionBehavior behavior) [0x0015a] in <e3b07672ffb
    d43c1838e1ebbe94cbdf5>:0 
      at System.Collections.Generic.Dictionary`2[TKey,TValue].Add (TKey key, TValue value) [0x00000] in <e3b07672ffbd43c1838e1ebbe94cbdf5>:0 
      at MonoMod.Utils.Extensions.AddRange[K,V] (System.Collections.Generic.Dictionary`2[TKey,TValue] dict, System.Collections.Generic.Dictionary`2[TKey,TValue] other) [0x00020]
     in <0020ee40255b4dc7a0eb8b2a76225b38>:0 
      at XRL.World.GameObject.DeepCopy (System.Boolean CopyEffects, System.Boolean CopyID, System.Func`2[T,TResult] MapInv) [0x005fd] in <a6ac20efe70c4a28b24171c8231c20c4>:0 
      at XRL.World.ZoneManager.GetCachedObjects (System.String ID) [0x0006a] in <a6ac20efe70c4a28b24171c8231c20c4>:0 
      at XRL.World.WorldBuilders.JoppaWorldBuilder.AddVillages () [0x0030e] in <a6ac20efe70c4a28b24171c8231c20c4>:0 
      at XRL.World.WorldBuilders.JoppaWorldBuilder.BuildStep (System.String Context, System.Action Action) [0x00006] in <a6ac20efe70c4a28b24171c8231c20c4>:0 
    INFO - Placing secrets
    INFO - Generating dynamic quests
    ERROR  - Error parsing spans for ZoneID 'unknown': PX = , PY = , ZX = , ZY = 
    DynamicVillageQuestFab: System.NullReferenceException: Object reference not set to an instance of an object
      at XRL.World.WorldBuilders.WorldInfo+<>c__DisplayClass30_0.<ResolveDeliveryTargetForVillage>b__4 (XRL.World.WorldBuilders.GeneratedLocationInfo l) [0x00013] in <a6ac20efe70c4a28b24171c8231c20c4>:0 
      at System.Linq.Enumerable+WhereListIterator`1[TSource].GetCount (System.Boolean onlyIfCheap) [0x00018] in <94826c4e3a844599a6c0fa362c656532>:0 
      at System.Linq.Enumerable.Count[TSource] (System.Collections.Generic.IEnumerable`1[T] source) [0x00029] in <94826c4e3a844599a6c0fa362c656532>:0 
      at Extensions.GetRandomElement[T] (System.Collections.Generic.IEnumerable`1[T] enumerable, System.Random R) [0x00000] in <a6ac20efe70c4a28b24171c8231c20c4>:0 
      at XRL.World.WorldBuilders.WorldInfo.ResolveDeliveryTargetForVillage (HistoryKit.HistoricEntitySnapshot village, System.Int32 minDistanceInclusive, System.Int32 maxDistanceInclusive, System.Int32 tierBroaden, System.Predicate`1[T] isLocationVaild) [0x0039c] in <a6ac20efe70c4a28b24171c8231c20c4>:0 
      at XRL.World.VillageDynamicQuestContext.getQuestDeliveryTarget () [0x0001c] in <a6ac20efe70c4a28b24171c8231c20c4>:0 
      at XRL.World.InteractWithAnObjectDynamicQuestTemplate.init (XRL.World.DynamicQuestContext context) [0x0011e] in <a6ac20efe70c4a28b24171c8231c20c4>:0 
      at XRL.World.DynamicQuestFactory.fabricateQuestTemplate (System.Type type, XRL.World.DynamicQuestContext context) [0x0001f] in <a6ac20efe70c4a28b24171c8231c20c4>:0 
      at XRL.World.DynamicQuestFactory.fabricateQuestTemplate (System.String type, XRL.World.DynamicQuestContext context) [0x00010] in <a6ac20efe70c4a28b24171c8231c20c4>:0 
      at XRL.World.WorldBuilders.JoppaWorldBuilder.BuildDynamicQuests (System.String WorldID) [0x0005f] in <a6ac20efe70c4a28b24171c8231c20c4>:0 
    

    followed by a bunch more null reference exceptions like that.

  2. kernelmethod

    encountering what appear to be related errors in just random zonebuilders in a separate save, too, so this probably isn’t just a worldgen issue

    Executing builder 'AddObjectBuilder' for Zone 'JoppaWorld.10.21.1.2.13': System.Reflection.TargetInvocationException: Exception has been thrown by the target of an invocatio
    n. ---> System.ArgumentException: An item with the same key has already been added. Key: Strength:base
      at System.Collections.Generic.Dictionary`2[TKey,TValue].TryInsert (TKey key, TValue value, System.Collections.Generic.InsertionBehavior behavior) [0x0015a] in <e3b07672ffbd43c1838e1ebbe94cbdf5>:0 
      at System.Collections.Generic.Dictionary`2[TKey,TValue].Add (TKey key, TValue value) [0x00000] in <e3b07672ffbd43c1838e1ebbe94cbdf5>:0 
      at MonoMod.Utils.Extensions.AddRange[K,V] (System.Collections.Generic.Dictionary`2[TKey,TValue] dict, System.Collections.Generic.Dictionary`2[TKey,TValue] other) [0x00020] in <0020ee40255b4dc7a0eb8b2a76225b38>:0 
      at XRL.World.GameObject.DeepCopy (System.Boolean CopyEffects, System.Boolean CopyID, System.Func`2[T,TResult] MapInv) [0x005fd] in <a6ac20efe70c4a28b24171c8231c20c4>:0 
      at XRL.World.ZoneManager.GetCachedObjects (System.String ID) [0x0006a] in <a6ac20efe70c4a28b24171c8231c20c4>:0 
      at XRL.World.ZoneBuilders.AddObjectBuilder.BuildZone (XRL.World.Zone Z) [0x0005b] in <a6ac20efe70c4a28b24171c8231c20c4>:0 
      at (wrapper managed-to-native) System.Reflection.RuntimeMethodInfo.InternalInvoke(System.Reflection.RuntimeMethodInfo,object,object[],System.Exception&)
      at System.Reflection.RuntimeMethodInfo.Invoke (System.Object obj, System.Reflection.BindingFlags invokeAttr, System.Reflection.Binder binder, System.Object[] parameters, System.Globalization.CultureInfo culture) [0x0006a] in <e3b07672ffbd43c1838e1ebbe94cbdf5>:0 
       --- End of inner exception stack trace ---
      at System.Reflection.RuntimeMethodInfo.Invoke (System.Object obj, System.Reflection.BindingFlags invokeAttr, System.Reflection.Binder binder, System.Object[] parameters, System.Globalization.CultureInfo culture) [0x00083] in <e3b07672ffbd43c1838e1ebbe94cbdf5>:0 
      at System.Reflection.MethodBase.Invoke (System.Object obj, System.Object[] parameters) [0x00000] in <e3b07672ffbd43c1838e1ebbe94cbdf5>:0 
      at XRL.World.ZoneBuilderBlueprint.ApplyTo (XRL.World.Zone Zone) [0x000b7] in <a6ac20efe70c4a28b24171c8231c20c4>:0 
    ERROR  - Builder failed: ZoneBuilder<AddObjectBuilder>
    

  3. kernelmethod

    This is also currently breaking entombment in Resheph’s tomb.

    ArgumentException: An item with the same key has already been added. Key: DV
      at System.Collections.Generic.Dictionary`2[TKey,TValue].TryInsert (TKey key, TValue value, System.Collections.Generic.InsertionBehavior behavior) [0x0015a] in <e3b07672ffb
    d43c1838e1ebbe94cbdf5>:0 
      at System.Collections.Generic.Dictionary`2[TKey,TValue].Add (TKey key, TValue value) [0x00000] in <e3b07672ffbd43c1838e1ebbe94cbdf5>:0 
      at MonoMod.Utils.Extensions.AddRange[K,V] (System.Collections.Generic.Dictionary`2[TKey,TValue] dict, System.Collections.Generic.Dictionary`2[TKey,TValue] other) [0x00020]
     in <0020ee40255b4dc7a0eb8b2a76225b38>:0 
      at XRL.World.GameObject.DeepCopy (System.Boolean CopyEffects, System.Boolean CopyID, System.Func`2[T,TResult] MapInv) [0x005fd] in <a6ac20efe70c4a28b24171c8231c20c4>:0 
      at XRL.World.Parts.ThinWorld.TransitToThinWorld (XRL.World.GameObject sender, System.Boolean express) [0x000e7] in <a6ac20efe70c4a28b24171c8231c20c4>:0 
      at XRL.World.Capabilities.Wishing.HandleWish (XRL.World.GameObject who, System.String Wish) [0x09357] in <a6ac20efe70c4a28b24171c8231c20c4>:0 
      at XRL.Core.XRLCore.PlayerTurn () [0x03423] in <a6ac20efe70c4a28b24171c8231c20c4>:0 
    

  4. Log in to comment