OwendB1 / SE-Ship_Class_System

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

Class Change and Just Generally Building Errors #23

Open afort111 opened 4 months ago

afort111 commented 4 months ago

Describe the bug The script provides error message in chat when changing the ship class, not consistently just every now and then. Have not been able to determine what's causing it.

And, a second separate error, when just building and removing blocks on the a ship with a class selected.

To Reproduce Will try to figure out.

Logs (Server & Client) When changing ship class log.

2024-07-15 12:56:15.142 - Thread: 1 -> [Ship Classes]: Exception message = Object reference not set to an instance of an object., Stack trace: at ShipClassSystem.Utils.GetBlockTypeId(IMyCubeBlock block) at ShipClassSystem.CubeGridLogic.<>c__DisplayClass31_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() 2024-07-15 12:56:15.155 - Thread: 1 -> Build Info error/exception: Exception during TerminalInfo.UpdateAfterSim(): System.Collections.Generic.KeyNotFoundException: The given key was not present in the dictionary. at System.ThrowHelper.ThrowKeyNotFoundException() at System.Collections.Generic.Dictionary2.get_Item(TKey key) at ShipClassSystem.CockpitInfo.AppendingCustomInfo(IMyTerminalBlock block, StringBuilder sb) at System.Action2.Invoke(T1 arg1, T2 arg2) at Sandbox.Game.Entities.Cube.MyTerminalBlock.RefreshCustomInfo() at Digi.BuildInfo.Features.Terminal.TerminalInfo.UpdateDetailInfo(Boolean force) at Digi.BuildInfo.Features.Terminal.TerminalInfo.UpdateAfterSim(Int32 tick) at Digi.ComponentLib.ModBase1.Digi.ComponentLib.IModBase.UpdateAfterSim() 2024-07-15 12:56:15.655 - Thread: 1 -> Build Info error/exception: Exception during TerminalInfo.UpdateAfterSim(): System.Collections.Generic.KeyNotFoundException: The given key was not present in the dictionary. at System.ThrowHelper.ThrowKeyNotFoundException() at System.Collections.Generic.Dictionary2.get_Item(TKey key) at ShipClassSystem.CockpitInfo.AppendingCustomInfo(IMyTerminalBlock block, StringBuilder sb) at System.Action2.Invoke(T1 arg1, T2 arg2) at Sandbox.Game.Entities.Cube.MyTerminalBlock.RefreshCustomInfo() at Digi.BuildInfo.Features.Terminal.TerminalInfo.UpdateDetailInfo(Boolean force) at Digi.BuildInfo.Features.Terminal.TerminalInfo.UpdateAfterSim(Int32 tick) at Digi.ComponentLib.ModBase`1.Digi.ComponentLib.IModBase.UpdateAfterSim()

And just just generally building error.

2024-07-15 12:52:51.759 - Thread: 1 -> [Ship Classes]: Exception message = Object reference not set to an instance of an object., Stack trace: at ShipClassSystem.Utils.GetBlockTypeId(IMyCubeBlock block) at ShipClassSystem.CubeGridLogic.<>c__DisplayClass31_0.b__0(MyCubeBlock b) at System.Linq.Enumerable.WhereSelectEnumerableIterator2.MoveNext() at System.Collections.Generic.List1.InsertRange(Int32 index, IEnumerable`1 collection) at ShipClassSystem.CubeGridLogic.GridClassHasChanged()

Timestamp 15/07/2024. or 07/15/2024 for the americans :)