FelixReuthlinger / AutoMapPins

GNU Lesser General Public License v3.0
5 stars 3 forks source link

Error On Load #23

Closed Deadmano closed 2 months ago

Deadmano commented 3 months ago

I've installed the latest version (v1.3.1) yet on game load I get the following error:

[Error  : Unity Log] NullReferenceException: Object reference not set to an instance of an object
Stack trace:
AutoMapPins.Model.PinComponent.Create (UnityEngine.GameObject gameObject) (at <e4974bcf9cb843ac96edc9ba84b49441>:0)
AutoMapPins.Patches.CommonPatchLogic.Patch (UnityEngine.GameObject gameObject) (at <e4974bcf9cb843ac96edc9ba84b49441>:0)
AutoMapPins.Patches.ContainerPatch.Postfix (Container& __instance) (at <e4974bcf9cb843ac96edc9ba84b49441>:0)
(wrapper dynamic-method) Container.DMD<Container::Awake>(Container)
UnityEngine.GameObject:AddComponent()
AdventureBackpacks.Patches.PlayerAwakePatch:Postfix(Player)
Player:DMD<Player::Awake>(Player)
UnityEngine.Object:Instantiate(GameObject, Vector3, Quaternion)
FejdStartup:SetupCharacterPreview(PlayerProfile)
FejdStartup:DMD<FejdStartup::UpdateCharacterList>(FejdStartup)
FejdStartup:SetSelectedProfile(String)
FejdStartup:DMD<FejdStartup::Start>(FejdStartup)
FelixReuthlinger commented 2 months ago

Are you using any other mods that touch the Map / Minimap? I have never seen this behavior, also not when using the mod with around 60 other mods. Potentially the issue could be that during game load the minimap is not initialized.

Deadmano commented 2 months ago

Are you using any other mods that touch the Map / Minimap? I have never seen this behavior, also not when using the mod with around 60 other mods. Potentially the issue could be that during game load the minimap is not initialized.

I am, yeah, such as REBUILT AMPED AutoMapPinsEnhanced with most options unchecked and a config in place just to get the nice colour/picture location pins and HUDCompass.

FelixReuthlinger commented 2 months ago

well, I would guess that those mods will not work together, since doing the same / quite similar things.

Deadmano commented 2 months ago

well, I would guess that those mods will not work together, since doing the same / quite similar things.

They actually do work alongside each other, I just disable the conflicting elements and only use it to mark locations that I have backlisted in yours (since it uses the colour icons nicely for a select few). The error actually occurred without that mod, but I have quite a large mod list so trying to track it down can be a headache. Can you not possibly add a null check in the place the error is occurring? I can confirm it still works regardless of the error.

FelixReuthlinger commented 2 months ago

There is only 1 location, where I can add this check, but I cannot guarantee compatibility with many other mods doing map things, easily.

FelixReuthlinger commented 2 months ago

The 2.0 version should hopefully resolve this