jrossignol / Strategia

MIT License
8 stars 16 forks source link

NullReferenceException on right-clicking administration building #87

Open dbtrnl opened 4 years ago

dbtrnl commented 4 years ago

My KSP suddenly got very slow and crashed, right after i right-clicked the administration building. Other times, the same error popped in the console, but the game didn't crash. Now apparently the game entered a loop and crashed.

I'm using 1.9.1

The error stack ``` [LOG 20:41:17.222] [MessageSystem] Save Messages [LOG 20:41:17.583] Game State Saved to saves/default/persistent [LOG 20:41:17.588] Administration (KSP.UI.UICanvasPrefab) [LOG 20:41:17.589] [UIMasterController] RemoveCanvas:Administration [ERR 20:41:22.454] Exception handling event onFacilityContextMenuSpawn in class StrategyNotifier:System.NullReferenceException at (wrapper managed-to-native) UnityEngine.MonoBehaviour.IsObjectMonoBehaviour(UnityEngine.Object) at UnityEngine.MonoBehaviour.StartCoroutine (System.Collections.IEnumerator routine) [0x00012] in <7d9ec060e791409ab3eb85c61e312ed6>:0 at Strategia.StrategyNotifier.OnFacilityContextMenuSpawn (KSP.UI.Screens.KSCFacilityContextMenu menu) [0x00024] in :0 at EventData`1[T].Fire (T data) [0x000b0] in :0 [EXC 20:41:23.401] NullReferenceException UnityEngine.MonoBehaviour.StartCoroutine (System.Collections.IEnumerator routine) (at <7d9ec060e791409ab3eb85c61e312ed6>:0) Strategia.StrategyNotifier.OnFacilityContextMenuSpawn (KSP.UI.Screens.KSCFacilityContextMenu menu) (at :0) EventData`1[T].Fire (T data) (at :0) UnityEngine.DebugLogHandler:LogException(Exception, Object) ModuleManager.UnityLogHandle.InterceptLogHandler:LogException(Exception, Object) UnityEngine.Debug:LogException(Exception) EventData`1:Fire(KSCFacilityContextMenu) KSP.UI.Screens.KSCFacilityContextMenu:Create(SpaceCenterBuilding, Callback`1) SpaceCenterBuilding:OnContextMenuSpawn() SpaceCenterBuilding:OnRightClick() d__49:MoveNext() UnityEngine.SetupCoroutine:InvokeMoveNext(IEnumerator, IntPtr) ``` [Many iterations of the same error later] ``` [ERR 20:41:34.576] Exception handling event onFacilityContextMenuSpawn in class StrategyNotifier:System.NullReferenceException at (wrapper managed-to-native) UnityEngine.MonoBehaviour.IsObjectMonoBehaviour(UnityEngine.Object) at UnityEngine.MonoBehaviour.StartCoroutine (System.Collections.IEnumerator routine) [0x00012] in <7d9ec060e791409ab3eb85c61e312ed6>:0 at Strategia.StrategyNotifier.OnFacilityContextMenuSpawn (KSP.UI.Screens.KSCFacilityContextMenu menu) [0x00024] in :0 at EventData`1[T].Fire (T data) [0x000b0] in :0 [EXC 20:41:35.618] NullReferenceException UnityEngine.MonoBehaviour.StartCoroutine (System.Collections.IEnumerator routine) (at <7d9ec060e791409ab3eb85c61e312ed6>:0) Strategia.StrategyNotifier.OnFacilityContextMenuSpawn (KSP.UI.Screens.KSCFacilityContextMenu menu) (at :0) EventData`1[T].Fire (T data) (at :0) UnityEngine.DebugLogHandler:LogException(Exception, Object) ModuleManager.UnityLogHandle.InterceptLogHandler:LogException(Exception, Object) UnityEngine.Debug:LogException(Exception) EventData`1:Fire(KSCFacilityContextMenu) KSP.UI.Screens.KSCFacilityContextMenu:Create(SpaceCenterBuilding, Callback`1) SpaceCenterBuilding:OnContextMenuSpawn() SpaceCenterBuilding:OnRightClick() d__49:MoveNext() UnityEngine.SetupCoroutine:InvokeMoveNext(IEnumerator, IntPtr) ```

I'm using various mods, if necessary i'll post the complete list here

jrossignol commented 3 years ago

I've seen this reported elsewhere, but I haven't been able to reproduce it. Could you provide the mod list (or just a KSP.log file would probably be better)?

dbtrnl commented 3 years ago
My modlist - B9 Aerospace Procedural Wings - Fork (B9-PWings-Fork 1:v0.93) - Breaking Ground (BreakingGround-DLC 1.4.1) - Chatterer (Chatterer 0.9.99) - Chatterer Extended (ChattererExtended 0.6.2) - ClickThrough Blocker (ClickThroughBlocker 1:0.1.10.11) - CommNet Antennas Consumptor (CommNetAntennasConsumptor 3.0.2) - CommNet Antennas Extension (CommNetAntennasExtension 2.1.3) - CommNet Relays (ContractConfigurator-CommNetRelays v2.1.0) - Community Parts Titles (CommunityPartsTitles 0.6.4) - Community Resource Pack (CommunityResourcePack 1.3.0.0) - Contract Configurator (ContractConfigurator 1.29.0) - Contract Pack: Bases and Stations Reborn (ContractConfigurator-KerbinSpaceStation 2:3.7.2.2) - Contract Pack: Clever Sats (ContractConfigurator-CleverSats 1.4) - Contract Pack: Exploration Plus (ContractConfigurator-ExplorationPlus 2.0.1) - Contract Pack: Field Research (ContractConfigurator-FieldResearch 1.2.1) - Contract Pack: Kerbal Academy (ContractConfigurator-KerbalAcademy 1.1.10) - Contract Pack: Tourism Plus (ContractConfigurator-Tourism 1.5.2) - Crowd Sourced Science (CrowdSourcedScience v6.0) - Custom Barn Kit (CustomBarnKit 1.1.21.0) - Distant Object Enhancement Continued (DistantObject v2.0.0.2) - Distant Object Enhancement Continued default config (DistantObject-default v2.0.0.2) - Kerbal Changelog (KerbalChangelog v1.3.0) - Kerbal Engineer Redux (KerbalEngineerRedux 1.1.7.2) - Kerbalism (Kerbalism 3.11) - Kerbalism - Default Config (Kerbalism-Config-Default 3.11) - kOS: Scriptable Autopilot System (kOS 1:1.2.1.0) - Making History (MakingHistory-DLC 1.9.1) - Modular Rocket Systems (ModularRocketSystem 1.13.2) - Module Manager (ModuleManager 4.1.4) - Procedural Parts (ProceduralParts v2.1.0) - Real Plume (RealPlume 2:v13.3.1) - Real Plume - Stock Configs (RealPlume-StockConfigs v4.0.1) - Reentry Particle Effect Renewed (ReentryParticleEffect 1.9.1.1) - RemoteTech Redev Antennas (RemoteTechRedevAntennas 0.1.1) - ReStock (ReStock 1.1.2) - ReStock Extra - Rigid Legs (RestockRigidLegs 1.1.2) - ReStock+ (ReStockPlus 1.1.2) - SmokeScreen - Extended FX Plugin (SmokeScreen 2.8.14.0) - Strategia (Strategia 1.8.0) - Surface Mounted Lights (surfacelights 1.16) - Textures Unlimited (TexturesUnlimited 1.5.10.25) - Toolbar Controller (ToolbarController 1:0.1.9.4) - Waypoint Manager (WaypointManager 2.8.2.6) - Zero MiniAVC (ZeroMiniAVC 1:1.1.0.1)

Principia is also installed (Gallai release, i believe). Also, i was using Ubuntu 20.04. The lagginess also happened in apparently random moments when flying rockets or airplanes, so i suspect other mods.

Actually i already gave up on trying to play KSP on Linux, cause i don't see any way to debug the random lagginess (i would appreciate if you know any tools besides the game debug console). Almost every time i have to REISUB (can't even xkill). I suspect some bizarre memory leak/lack of code optimization for Linux, but i don't know where to start. This Exception was the only big error shown (besides the many warnings). I could keep digging though.

I've been playing with a similar modlist on Win10 and encountered no problems with Strategia or KSP in general (despite the 15 minutes load times on my old computer).

dbtrnl commented 3 years ago

My KSP.log. There were actually tons of errors, so i'm sorry if any of them are known. I'll check later if those tons of errors also appear on Win10.

KSP.log