nevir / oni-darkness-not-excluded

Illuminate the depths of your asteroid and conquer it with the power of light!
Other
3 stars 3 forks source link

Game crash when right-clicking darkness toggle #9

Closed boure closed 1 year ago

boure commented 1 year ago

Reproductible scenario:

Modlist

  - Mod Manager // by @Ony 
  - Mod Updater
  - Bigger Camera Zoom Out
  - Build Over Plants
  - Falling Sand
  - Empty Worlds
  - DGSM  - Duplicants Generation Settings Manager // by @Ony 
  - Buildable Natural Tile
  - Pliers fixed
  - Show Building Ranges
  - Expanded Lights
  - [Vanilla + DLC] Diseases Expanded
  - Skills Master // by @Ony 
  - Fervine
  - Favorite Resources // by @Ony 
  - [Vanilla + DLC] Rooms Expanded
  - Wrangle & Carry
  - Better Info Cards
  - Darkness Not Excluded

Stacktrace

[11:52:42.108] [1] [INFO] Darkness Not Excluded's patched_method PeterHan.PLib.Options.OptionsDialog.ShowDialog matched in the stack trace, adding to referenced mods list
InvalidCastException: Specified cast is not valid.
  at (wrapper castclass) System.Object.__castclass_with_cache(object,intptr,intptr)
  at HarmonyLib.Traverse.GetValue[T] () [0x00014] in <2f5aaaa000594d07b9998f4cff1e9662>:0 
  at DarknessNotIncluded.PPanelExtensions.GetChildNamed (PeterHan.PLib.UI.PPanel panel, System.String name) [0x00015] in <ed2907f88f764f47b2fbb3073277d5eb>:0 
  at DarknessNotIncluded.OptionsEnhancements.OptionsDialogPresets+Patched_OptionsDialog_AddModInfoScreen.Postfix (System.Object __instance, PeterHan.PLib.UI.PDialog __0) [0x00013] in <ed2907f88f764f47b2fbb3073277d5eb>:0 
  at (wrapper dynamic-method) PeterHan.PLib.Options.OptionsDialog.PeterHan.PLib.Options.OptionsDialog.AddModInfoScreen_Patch1(PeterHan.PLib.Options.OptionsDialog,PeterHan.PLib.UI.PDialog)
  at (wrapper dynamic-method) PeterHan.PLib.Options.OptionsDialog.PeterHan.PLib.Options.OptionsDialog.ShowDialog_Patch1(PeterHan.PLib.Options.OptionsDialog)
  at (wrapper managed-to-native) System.Reflection.MonoMethod.InternalInvoke(System.Reflection.MonoMethod,object,object[],System.Exception&)
  at System.Reflection.MonoMethod.Invoke (System.Object obj, System.Reflection.BindingFlags invokeAttr, System.Reflection.Binder binder, System.Object[] parameters, System.Globalization.CultureInfo culture) [0x00032] in <695d1cc93cca45069c528c15c9fdd749>:0 
Rethrow as TargetInvocationException: Exception has been thrown by the target of an invocation.
  at System.Reflection.MonoMethod.Invoke (System.Object obj, System.Reflection.BindingFlags invokeAttr, System.Reflection.Binder binder, System.Object[] parameters, System.Globalization.CultureInfo culture) [0x00048] in <695d1cc93cca45069c528c15c9fdd749>:0 
  at System.Reflection.MethodBase.Invoke (System.Object obj, System.Object[] parameters) [0x00000] in <695d1cc93cca45069c528c15c9fdd749>:0 
  at HarmonyLib.Traverse.GetValue () [0x00061] in <2f5aaaa000594d07b9998f4cff1e9662>:0 
  at DarknessNotIncluded.OptionsEnhancements.OptionsDialog.Show[TConfigType] (System.Type ConfigType, System.Action`1[T] onClose) [0x00073] in <ed2907f88f764f47b2fbb3073277d5eb>:0 
  at DarknessNotIncluded.InGameConfig.DarknessToggleButton+Patched_TopLeftControlScreen_OnActivate+<>c__DisplayClass0_0.<Postfix>b__1 (KKeyCode btn) [0x0001c] in <ed2907f88f764f47b2fbb3073277d5eb>:0 
  at KButton.SignalClick (KKeyCode btn) [0x0002b] in <d35824e72985464e85149179dd14d71e>:0 
  at KButton.OnPointerClick (UnityEngine.EventSystems.PointerEventData eventData) [0x00069] in <d35824e72985464e85149179dd14d71e>:0 
  at UnityEngine.EventSystems.ExecuteEvents.Execute (UnityEngine.EventSystems.IPointerClickHandler handler, UnityEngine.EventSystems.BaseEventData eventData) [0x00007] in <e9635660f69b4d9d84c085aeda3be353>:0 
  at UnityEngine.EventSystems.ExecuteEvents.Execute[T] (UnityEngine.GameObject target, UnityEngine.EventSystems.BaseEventData eventData, UnityEngine.EventSystems.ExecuteEvents+EventFunction`1[T1] functor) [0x0006c] in <e9635660f69b4d9d84c085aeda3be353>:0 
UnityEngine.DebugLogHandler:Internal_LogException(Exception, Object)
UnityEngine.DebugLogHandler:LogException(Exception, Object)
UnityEngine.Logger:LogException(Exception, Object)
UnityEngine.Debug:LogException(Exception)
UnityEngine.EventSystems.ExecuteEvents:Execute(GameObject, BaseEventData, EventFunction`1)
UnityEngine.EventSystems.StandaloneInputModule:ReleaseMouse(PointerEventData, GameObject)
UnityEngine.EventSystems.StandaloneInputModule:ProcessMousePress(MouseButtonEventData)
UnityEngine.EventSystems.StandaloneInputModule:ProcessMouseEvent(Int32)
UnityEngine.EventSystems.StandaloneInputModule:ProcessMouseEvent()
UnityEngine.EventSystems.StandaloneInputModule:Process()
UnityEngine.EventSystems.EventSystem:Update()
nevir commented 1 year ago

Alright, I've just released v1.3.0 which fixes this!