OwendB1 / SE-Ship_Class_System

Blue's SE Ship Class Mod
2 stars 1 forks source link

Occasional crash to desktop when changing grid class #18

Open skiittz opened 1 week ago

skiittz commented 1 week ago

I selected one grid class, realized the grid didnt meet the requirements, changed to another: 2024-06-23 13:42:00.322 - Thread: 1 -> Exception: System.NullReferenceException: Object reference not set to an instance of an object. at ShipClassSystem.Utils.GetBlockTypeId(IMyCubeBlock block) at ShipClassSystem.CubeGridLogic.<>cDisplayClass26_0.b__0(MyCubeBlock b) at System.Linq.Enumerable.WhereSelectEnumerableIterator2.MoveNext() at System.Collections.Generic.List1.InsertRange(Int32 index, IEnumerable1 collection) at ShipClassSystem.CubeGridLogic.GridClassHasChanged() at ShipClassSystem.CubeGridLogic.set_GridClassId(Int64 value) at ShipClassSystem.CockpitGUI.SetGridClass(IMyTerminalBlock block, Int64 key) at Sandbox.Game.Screens.Terminal.Controls.MyTerminalValueControl2.SetValue(TBlock block, TValue value) at Sandbox.Game.Gui.MyTerminalControlCombobox1.SetValue(TBlock block, Int64 value) at Sandbox.Game.Gui.MyTerminalControlCombobox1.OnItemSelected() at Sandbox.Graphics.GUI.MyGuiControlCombobox.SelectItemByKey(Int64 key, Boolean sendEvent) at Sandbox.Graphics.GUI.MyGuiControlCombobox.HandleInput() at Sandbox.Graphics.GUI.MyGuiScreenBase.HandleControlsInput(Boolean receivedFocusInThisUpdate) at Sandbox.Graphics.GUI.MyGuiScreenBase.HandleInput(Boolean receivedFocusInThisUpdate) at Sandbox.Game.Gui.MyGuiScreenTerminal.HandleInput(Boolean receivedFocusInThisUpdate) at Sandbox.Graphics.GUI.MyScreenManager.HandleInput() at Sandbox.Graphics.GUI.MyDX9Gui.HandleInput() at Sandbox.MySandboxGame.Update() at Sandbox.Engine.Platform.Game.UpdateInternal() at Sandbox.Engine.Platform.Game.RunSingleFrame() at Sandbox.Engine.Platform.FixedLoop.<>cDisplayClass11_0.b0() at Sandbox.Engine.Platform.GenericLoop.Run(VoidAction tickCallback) at Sandbox.Engine.Platform.Game.RunLoop() at Sandbox.MySandboxGame.Run(Boolean customRenderLoop, Action disposeSplashScreen) at SpaceEngineers.MyProgram.Main(String[] args) 2024-06-23 13:42:00.335 - Thread: 1 -> Exception occurred: System.NullReferenceException: Object reference not set to an instance of an object. at ShipClassSystem.Utils.GetBlockTypeId(IMyCubeBlock block) at ShipClassSystem.CubeGridLogic.<>cDisplayClass26_0.b0(MyCubeBlock b) at System.Linq.Enumerable.WhereSelectEnumerableIterator2.MoveNext() at System.Collections.Generic.List1.InsertRange(Int32 index, IEnumerable1 collection) at ShipClassSystem.CubeGridLogic.GridClassHasChanged() at ShipClassSystem.CubeGridLogic.set_GridClassId(Int64 value) at ShipClassSystem.CockpitGUI.SetGridClass(IMyTerminalBlock block, Int64 key) at Sandbox.Game.Screens.Terminal.Controls.MyTerminalValueControl2.SetValue(TBlock block, TValue value) at Sandbox.Game.Gui.MyTerminalControlCombobox1.SetValue(TBlock block, Int64 value) at Sandbox.Game.Gui.MyTerminalControlCombobox1.OnItemSelected() at Sandbox.Graphics.GUI.MyGuiControlCombobox.SelectItemByKey(Int64 key, Boolean sendEvent) at Sandbox.Graphics.GUI.MyGuiControlCombobox.HandleInput() at Sandbox.Graphics.GUI.MyGuiScreenBase.HandleControlsInput(Boolean receivedFocusInThisUpdate) at Sandbox.Graphics.GUI.MyGuiScreenBase.HandleInput(Boolean receivedFocusInThisUpdate) at Sandbox.Game.Gui.MyGuiScreenTerminal.HandleInput(Boolean receivedFocusInThisUpdate) at Sandbox.Graphics.GUI.MyScreenManager.HandleInput() at Sandbox.Graphics.GUI.MyDX9Gui.HandleInput() at Sandbox.MySandboxGame.Update() at Sandbox.Engine.Platform.Game.UpdateInternal() at Sandbox.Engine.Platform.Game.RunSingleFrame() at Sandbox.Engine.Platform.FixedLoop.<>c__DisplayClass11_0.b0() at Sandbox.Engine.Platform.GenericLoop.Run(VoidAction tickCallback) at Sandbox.Engine.Platform.Game.RunLoop() at Sandbox.MySandboxGame.Run(Boolean customRenderLoop, Action disposeSplashScreen) at SpaceEngineers.MyProgram.Main(String[] args) at avaness.SpaceEngineersLauncher.Program.StartSpaceEngineers(String[] args) at avaness.SpaceEngineersLauncher.Program.Main(String[] args) 2024-06-23 13:42:00.335 - Thread: 1 -> Showing message 2024-06-23 13:42:00.336 - Thread: 1 -> MyInitializer.OnCrash 2024-06-23 13:42:00.336 - Thread: 1 -> var exception = System.NullReferenceException: Object reference not set to an instance of an object. at ShipClassSystem.Utils.GetBlockTypeId(IMyCubeBlock block) at ShipClassSystem.CubeGridLogic.<>cDisplayClass26_0.b__0(MyCubeBlock b) at System.Linq.Enumerable.WhereSelectEnumerableIterator2.MoveNext() at System.Collections.Generic.List1.InsertRange(Int32 index, IEnumerable1 collection) at ShipClassSystem.CubeGridLogic.GridClassHasChanged() at ShipClassSystem.CubeGridLogic.set_GridClassId(Int64 value) at ShipClassSystem.CockpitGUI.SetGridClass(IMyTerminalBlock block, Int64 key) at Sandbox.Game.Screens.Terminal.Controls.MyTerminalValueControl2.SetValue(TBlock block, TValue value) at Sandbox.Game.Gui.MyTerminalControlCombobox1.SetValue(TBlock block, Int64 value) at Sandbox.Game.Gui.MyTerminalControlCombobox1.OnItemSelected() at Sandbox.Graphics.GUI.MyGuiControlCombobox.SelectItemByKey(Int64 key, Boolean sendEvent) at Sandbox.Graphics.GUI.MyGuiControlCombobox.HandleInput() at Sandbox.Graphics.GUI.MyGuiScreenBase.HandleControlsInput(Boolean receivedFocusInThisUpdate) at Sandbox.Graphics.GUI.MyGuiScreenBase.HandleInput(Boolean receivedFocusInThisUpdate) at Sandbox.Game.Gui.MyGuiScreenTerminal.HandleInput(Boolean receivedFocusInThisUpdate) at Sandbox.Graphics.GUI.MyScreenManager.HandleInput() at Sandbox.Graphics.GUI.MyDX9Gui.HandleInput() at Sandbox.MySandboxGame.Update() at Sandbox.Engine.Platform.Game.UpdateInternal() at Sandbox.Engine.Platform.Game.RunSingleFrame() at Sandbox.Engine.Platform.FixedLoop.<>cDisplayClass11_0.b__0() at Sandbox.Engine.Platform.GenericLoop.Run(VoidAction tickCallback) at Sandbox.Engine.Platform.Game.RunLoop() at Sandbox.MySandboxGame.Run(Boolean customRenderLoop, Action disposeSplashScreen) at SpaceEngineers.MyProgram.Main(String[] args) at avaness.SpaceEngineersLauncher.Program.StartSpaceEngineers(String[] args) at avaness.SpaceEngineersLauncher.Program.Main(String[] args)

Blues-Hailfire commented 6 days ago

Thank you! I'm looking into this now!

Blues-Hailfire commented 6 days ago

I was able to recreate looking into a fix now