NPE in task: Cannot invoke "SkillHolder.hasTimerSkills()" because "holder" is null
Summary
I just noticed the error in my server log file:
[20:36:55] [Craft Scheduler Thread - 529 - MythicMobs/ERROR]: [MythicMobs] [31m[SCHEDULER] Exception thrown whilst executing task[37m
[20:36:55] [Craft Scheduler Thread - 529 - MythicMobs/WARN]: java.lang.NullPointerException: Cannot invoke "io.lumine.mythiccrucible.items.SkillHolder.hasTimerSkills()" because "holder" is null
[20:36:55] [Craft Scheduler Thread - 529 - MythicMobs/WARN]: at MythicCrucible-1.5.0-SNAPSHOT.jar//io.lumine.mythiccrucible.profiles.Profile.lambda$runTimerSkills$0(Profile.java:247)
[20:36:55] [Craft Scheduler Thread - 529 - MythicMobs/WARN]: at java.base/java.util.ArrayList.forEach(ArrayList.java:1511)
[20:36:55] [Craft Scheduler Thread - 529 - MythicMobs/WARN]: at MythicCrucible-1.5.0-SNAPSHOT.jar//io.lumine.mythiccrucible.profiles.Profile.runTimerSkills(Profile.java:246)
[20:36:55] [Craft Scheduler Thread - 529 - MythicMobs/WARN]: at MythicCrucible-1.5.0-SNAPSHOT.jar//io.lumine.mythiccrucible.profiles.ProfileManager.lambda$runTimerSkills$22(ProfileManager.java:214)
[20:36:55] [Craft Scheduler Thread - 529 - MythicMobs/WARN]: at java.base/java.util.concurrent.ConcurrentHashMap$ValueSpliterator.forEachRemaining(ConcurrentHashMap.java:3612)
[20:36:55] [Craft Scheduler Thread - 529 - MythicMobs/WARN]: at java.base/java.util.stream.ReferencePipeline$Head.forEach(ReferencePipeline.java:762)
[20:36:55] [Craft Scheduler Thread - 529 - MythicMobs/WARN]: at MythicCrucible-1.5.0-SNAPSHOT.jar//io.lumine.mythiccrucible.profiles.ProfileManager.runTimerSkills(ProfileManager.java:210)
[20:36:55] [Craft Scheduler Thread - 529 - MythicMobs/WARN]: at MythicCrucible-1.5.0-SNAPSHOT.jar//io.lumine.mythiccrucible.clocks.MythicArtifactsAsyncClock.run(MythicArtifactsAsyncClock.java:14)
[20:36:55] [Craft Scheduler Thread - 529 - MythicMobs/WARN]: at MythicMobs-5.2.0-SNAPSHOT(Premium).jar//io.lumine.mythic.bukkit.utils.Delegates$RunnableToConsumer.accept(Delegates.java:93)
[20:36:55] [Craft Scheduler Thread - 529 - MythicMobs/WARN]: at MythicMobs-5.2.0-SNAPSHOT(Premium).jar//io.lumine.mythic.bukkit.utils.Schedulers$LumineTask.run(Schedulers.java:162)
[20:36:55] [Craft Scheduler Thread - 529 - MythicMobs/WARN]: at org.bukkit.craftbukkit.v1_17_R1.scheduler.CraftTask.run(CraftTask.java:101)
[20:36:55] [Craft Scheduler Thread - 529 - MythicMobs/WARN]: at org.bukkit.craftbukkit.v1_17_R1.scheduler.CraftAsyncTask.run(CraftAsyncTask.java:57)
[20:36:55] [Craft Scheduler Thread - 529 - MythicMobs/WARN]: at com.destroystokyo.paper.ServerSchedulerReportingWrapper.run(ServerSchedulerReportingWrapper.java:22)
[20:36:55] [Craft Scheduler Thread - 529 - MythicMobs/WARN]: at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1136)
[20:36:55] [Craft Scheduler Thread - 529 - MythicMobs/WARN]: at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:635)
[20:36:55] [Craft Scheduler Thread - 529 - MythicMobs/WARN]: at java.base/java.lang.Thread.run(Thread.java:840)
Steps to reproduce
I don't know what the user did to produce this error. If further info is needed I can try to reproduce it.
Current behavior
The error occours.
Intended correct behavior
The error should not occour.
Server log file
Skipped due to privacy. Please tell me, if you need any info.
Debug log snippet
See above.
Proposed fixes
I thinks it's just a missing null check?