larsvansoest / emote-clue-items

A RuneLite plugin which highlights items that are required for emote clue steps.
BSD 2-Clause "Simplified" License
7 stars 14 forks source link

Switching Profiles Possibly Crashes the Plugin #95

Closed larsvansoest closed 1 year ago

larsvansoest commented 1 year ago

Discord report:

Looking through the client logs it seems like I found it. I switch to my settingsMERCHANT profile, the plugin "Emote Clue Items" throw a few errors, then I see that I force close the client, open it again and it loads the same profile on startup without issue. I don't have the plugin "Emote Clue Items" activated on my settingsMERCHANT profile, but I do have it activated on my ironman's profile that I am trying to switch from. So it seems like the issue is that it crashes when trying to unload? Here is a short snippet from the log:

2023-05-26 20:59:11 CEST [pool-3-thread-1] INFO  n.r.client.config.ConfigManager - Switching profile to: settingsMERCHANT
2023-05-26 20:59:11 CEST [pool-3-thread-1] WARN  n.runelite.client.eventbus.EventBus - Uncaught exception in event subscriber
java.lang.NullPointerException: null
    at com.larsvansoest.runelite.clueitems.EmoteClueItemsPlugin.onConfigChanged(EmoteClueItemsPlugin.java:353)
    at net.runelite.client.eventbus.EventBus$Subscriber.invoke(EventBus.java:70)
    at net.runelite.client.eventbus.EventBus.post(EventBus.java:223)
    at net.runelite.client.config.ConfigManager.switchProfile(ConfigManager.java:234)
    at net.runelite.client.plugins.config.ProfilePanel.lambda$switchToProfile$7(ProfilePanel.java:666)
    at net.runelite.client.util.RunnableExceptionLogger.run(RunnableExceptionLogger.java:41)
    at java.base/java.util.concurrent.Executors$RunnableAdapter.call(Unknown Source)
    at java.base/java.util.concurrent.FutureTask.run(Unknown Source)
    at java.base/java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(Unknown Source)
    at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
    at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
    at java.base/java.lang.Thread.run(Unknown Source)
[16:08]
It throws multiple of the same error depending on how fast I force close Runelite. Starting up Runelite and it loading the settingMERCHANT profile after force closing it is never a issue (probably because then it doesn't have to unload the Emote Clue Items plugin?)

Thinking back on it I have noticed that very rarely it won't freeze, but that is probably because I sometimes login to another account that also don't have that plugin activated.
larsvansoest commented 1 year ago

This issue should be resolved in the next patch. The patch is currently under review.

Please consider the following link to view its status: https://github.com/runelite/plugin-hub/pull/4466