NanoCE / Glass_N_Lights

Adds glass and lights to rimworld.
11 stars 7 forks source link

exception with Trade Ships mod #12

Closed mvadovszki closed 3 years ago

mvadovszki commented 3 years ago

Describe the bug Occurs in combination with the Trade Ships mod https://steamcommunity.com/sharedfiles/filedetails/?id=2046222331

Occurs when a trade ship takes off

Exception ticking TraderShipsShipLeaving1039140: System.NullReferenceException: Object reference not set to an instance of an object at Verse.GridsUtility.GetThingList (Verse.IntVec3 c, Verse.Map map) [0x00000] in :0 at Glass_Lights.HarmonyInit+Patch_BuildingDestroy.Prefix (Verse.Building __instance) [0x0003c] in <627802c1bcd84349bbccf493c16aada5>:0 at (wrapper dynamic-method) Verse.Building.Verse.Building.Destroy_Patch2(Verse.Building,Verse.DestroyMode) at Verse.ThingOwner.ClearAndDestroyContents (Verse.DestroyMode mode) [0x00015] in :0 at RimWorld.Skyfaller.Destroy (Verse.DestroyMode mode) [0x00007] in :0 at RimWorld.Skyfaller.LeaveMap () [0x00000] in :0 at (wrapper dynamic-method) RimWorld.Skyfaller.RimWorld.Skyfaller.Tick_Patch1(RimWorld.Skyfaller) at (wrapper dynamic-method) Verse.TickList.Verse.TickList.Tick_Patch2(Verse.TickList) Verse.Log:Error(String, Boolean) Verse.TickList:Verse.TickList.Tick_Patch2(TickList) Verse.TickManager:Verse.TickManager.DoSingleTick_Patch0(TickManager) Verse.TickManager:TickManagerUpdate() Verse.Game:UpdatePlay() Verse.Root_Play:Verse.Root_Play.Update_Patch1(Root_Play)

To Reproduce 1) DebugMode -> Debug Actions -> Do incident (Map) -> TradeShipsArrival [NO] 2) Select the trade ship, send it away

NanoCE commented 3 years ago

This is an excellent bug report. Ill take a look at it by the end of the day. Thanks

NanoCE commented 3 years ago

I found the issue and have made changes to the code. For now, just ignore the error, it shouldn't cause any issues. Ill have the patch uploaded here and onto the workshop in a few days.

NanoCE commented 3 years ago

I believe I pushed the update to fix it please let me know if this error continues by re-opening this issue. Thank you for waiting and understanding.