Skip to content

Crashinging editor when no "tool" mods are installed #116

@Aperion

Description

@Aperion

I get a crash when I open the editot with the following exception:

NullReferenceException: Object reference not set to an instance of an object
  at Timberborn.BlueprintSystem.SpecService+<GetSpecs>d__10`1[T].MoveNext () [0x00039] in <3cc32c74353c4bdc9a9a2bec41ada3e4>:0 
  at System.Linq.Enumerable+WhereSelectEnumerableIterator`2[TSource,TResult].MoveNext () [0x00059] in <41d1bd92f95542f4aa33290b7e44d57e>:0 
  at System.Collections.Immutable.ImmutableDictionary`2[TKey,TValue].AddRange (System.Collections.Generic.IEnumerable`1[T] items, System.Collections.Immutable.ImmutableDictionary`2+MutationInput[TKey,TValue] origin, System.Collections.Immutable.ImmutableDictionary`2+KeyCollisionBehavior[TKey,TValue] collisionBehavior) [0x00098] in <6bb08d37de124a778ca2954872cc5e3e>:0 
  at System.Collections.Immutable.ImmutableDictionary`2[TKey,TValue].AddRange (System.Collections.Generic.IEnumerable`1[T] pairs, System.Boolean avoidToHashMap) [0x0003a] in <6bb08d37de124a778ca2954872cc5e3e>:0 
  at System.Collections.Immutable.ImmutableDictionary`2[TKey,TValue].AddRange (System.Collections.Generic.IEnumerable`1[T] pairs) [0x0000b] in <6bb08d37de124a778ca2954872cc5e3e>:0 
  at System.Collections.Immutable.ImmutableDictionary.ToImmutableDictionary[TSource,TKey,TValue] (System.Collections.Generic.IEnumerable`1[T] source, System.Func`2[T,TResult] keySelector, System.Func`2[T,TResult] elementSelector, System.Collections.Generic.IEqualityComparer`1[T] keyComparer, System.Collections.Generic.IEqualityComparer`1[T] valueComparer) [0x0005e] in <6bb08d37de124a778ca2954872cc5e3e>:0 
  at System.Collections.Immutable.ImmutableDictionary.ToImmutableDictionary[TSource,TKey] (System.Collections.Generic.IEnumerable`1[T] source, System.Func`2[T,TResult] keySelector) [0x00000] in <6bb08d37de124a778ca2954872cc5e3e>:0 
  at TimberApi.Tools.ToolSystem.ToolSpecService.Load () [0x00031] in <226f21d0a2bf409595632106f280afb2>:0 
  at (wrapper dynamic-method) MonoMod.Utils.DynamicMethodDefinition.Timberborn.SingletonSystem.SingletonLifecycleService.LoadSingletons_Patch2(Timberborn.SingletonSystem.SingletonLifecycleService)
  at (wrapper dynamic-method) MonoMod.Utils.DynamicMethodDefinition.Timberborn.SingletonSystem.SingletonLifecycleService.LoadAll_Patch1(Timberborn.SingletonSystem.SingletonLifecycleService)
  at Timberborn.SingletonSystem.SingletonLifecycleUnityAdapter.Start () [0x00000] in <27955be1784e41afaeed629fb147a2a9>:0 

the following mods are loaded:

- 1x1x2Storage (v2.3.8)
- Harmony (v2.3.3)
- FreeFlow (v0.1.1.2)
- Ladder (v3.0.3)
- Mod Manager (v3.0.4)
- Mod Settings (v0.7.0.1)
- Goods Statistics (v0.7.1.0)
- Platform Over Large Waterwheel Shaft (v0.1)
- SmartPower (v1.13.1)
- TimberApi (v0.7.11.0)
- TimberApi UIBuilder (v1.0.0.1)

I did further testing and the crash doesn't happen when I install and enable other modes like CutterTool, ForestTool, or Delete That Thing. If both are disabled or removed the crash returns. I tried another tool like Pipette Tool but that made no difference. Possibly tools that make use of the area selection mechanic?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions