NPE on config initialization - can't load saved marker file, if id contains a slash
See original GitHub issueIssue Description: Dynmap saves configuration just fine, but it might fail to load it and throw NPE. It looks like the culprit is here: https://github.com/webbukkit/dynmap/blob/v3.0/DynmapCore/src/main/java/org/dynmap/markers/impl/MarkerSetImpl.java#L469
for(String id : areamarkernode.keySet()) {
AreaMarkerImpl marker = new AreaMarkerImpl(id, this); /* Make and load marker */
if(marker.loadPersistentData(areamarkernode.getNode(id))) { // BUG: .getNode(id) returns null
In my case it was cause by the area ID containing a /
character.
- Dynmap Version: dynmap v3.1-beta3a-409
- Server Version: Paper 1.16.2 build 185
- Pastebin of crashlogs or other relevant logs: Are marker:
[10:14:53] [Server thread/INFO]: [dynmap] Enabling dynmap v3.1-beta3a-409*
[10:14:53] [Server thread/INFO]: [dynmap] Added 4 custom biome mappings
[10:14:53] [Server thread/INFO]: [dynmap] Using LuckPerms 5.1.66 for access control
[10:14:53] [Server thread/ERROR]: Error occurred while enabling dynmap v3.1-beta3a-409 (Is it up to date?)
java.lang.NullPointerException: null
at org.dynmap.markers.impl.AreaMarkerImpl.loadPersistentData(AreaMarkerImpl.java:122) ~[?:?]
at org.dynmap.markers.impl.MarkerSetImpl.loadPersistentData(MarkerSetImpl.java:471) ~[?:?]
at org.dynmap.markers.impl.MarkerAPIImpl.loadMarkers(MarkerAPIImpl.java:717) ~[?:?]
at org.dynmap.markers.impl.MarkerAPIImpl.initializeMarkerAPI(MarkerAPIImpl.java:384) ~[?:?]
at org.dynmap.DynmapCore.initConfiguration(DynmapCore.java:410) ~[?:?]
at org.dynmap.bukkit.DynmapPlugin.onEnable(DynmapPlugin.java:905) ~[?:?]
at org.bukkit.plugin.java.JavaPlugin.setEnabled(JavaPlugin.java:263) ~[patched_1.16.2.jar:git-Paper-185]
at org.bukkit.plugin.java.JavaPluginLoader.enablePlugin(JavaPluginLoader.java:380) ~[patched_1.16.2.jar:git-Paper-185]
at org.bukkit.plugin.SimplePluginManager.enablePlugin(SimplePluginManager.java:483) ~[patched_1.16.2.jar:git-Paper-185]
at org.bukkit.craftbukkit.v1_16_R2.CraftServer.enablePlugin(CraftServer.java:499) ~[patched_1.16.2.jar:git-Paper-185]
at org.bukkit.craftbukkit.v1_16_R2.CraftServer.enablePlugins(CraftServer.java:413) ~[patched_1.16.2.jar:git-Paper-185]
at net.minecraft.server.v1_16_R2.MinecraftServer.loadWorld(MinecraftServer.java:468) ~[patched_1.16.2.jar:git-Paper-185]
at net.minecraft.server.v1_16_R2.DedicatedServer.init(DedicatedServer.java:241) ~[patched_1.16.2.jar:git-Paper-185]
at net.minecraft.server.v1_16_R2.MinecraftServer.w(MinecraftServer.java:939) ~[patched_1.16.2.jar:git-Paper-185]
at net.minecraft.server.v1_16_R2.MinecraftServer.lambda$a$0(MinecraftServer.java:177) ~[patched_1.16.2.jar:git-Paper-185]
at java.lang.Thread.run(Unknown Source) [?:?]
Circle:
[15:08:36 INFO]: [dynmap] Enabling dynmap v3.1-beta3a-409*
[15:08:37 INFO]: [dynmap] Added 4 custom biome mappings
[15:08:37 INFO]: [dynmap] Using Bukkit Permissions (superperms) for access control
[15:08:37 INFO]: [dynmap] Web interface permissions only available for online users
[15:08:38 ERROR]: Error occurred while enabling dynmap v3.1-beta3a-409 (Is it up to date?)
java.lang.NullPointerException: null
at org.dynmap.markers.impl.CircleMarkerImpl.loadPersistentData(CircleMarkerImpl.java:104) ~[?:?]
at org.dynmap.markers.impl.MarkerSetImpl.loadPersistentData(MarkerSetImpl.java:509) ~[?:?]
at org.dynmap.markers.impl.MarkerAPIImpl.loadMarkers(MarkerAPIImpl.java:717) ~[?:?]
at org.dynmap.markers.impl.MarkerAPIImpl.initializeMarkerAPI(MarkerAPIImpl.java:384) ~[?:?]
at org.dynmap.DynmapCore.initConfiguration(DynmapCore.java:410) ~[?:?]
at org.dynmap.bukkit.DynmapPlugin.onEnable(DynmapPlugin.java:905) ~[?:?]
at org.bukkit.plugin.java.JavaPlugin.setEnabled(JavaPlugin.java:263) ~[patched_1.16.2.jar:git-Paper-185]
at org.bukkit.plugin.java.JavaPluginLoader.enablePlugin(JavaPluginLoader.java:380) ~[patched_1.16.2.jar:git-Paper-185]
at org.bukkit.plugin.SimplePluginManager.enablePlugin(SimplePluginManager.java:483) ~[patched_1.16.2.jar:git-Paper-185]
at org.bukkit.craftbukkit.v1_16_R2.CraftServer.enablePlugin(CraftServer.java:499) ~[patched_1.16.2.jar:git-Paper-185]
at org.bukkit.craftbukkit.v1_16_R2.CraftServer.enablePlugins(CraftServer.java:413) ~[patched_1.16.2.jar:git-Paper-185]
at net.minecraft.server.v1_16_R2.MinecraftServer.loadWorld(MinecraftServer.java:468) ~[patched_1.16.2.jar:git-Paper-185]
at net.minecraft.server.v1_16_R2.DedicatedServer.init(DedicatedServer.java:241) ~[patched_1.16.2.jar:git-Paper-185]
at net.minecraft.server.v1_16_R2.MinecraftServer.w(MinecraftServer.java:939) ~[patched_1.16.2.jar:git-Paper-185]
at net.minecraft.server.v1_16_R2.MinecraftServer.lambda$a$0(MinecraftServer.java:177) ~[patched_1.16.2.jar:git-Paper-185]
at java.lang.Thread.run(Thread.java:748) [?:1.8.0_262]
- Other Relevant Data/Screenshots: Nothing
- Steps to Replicate:
- Start fresh server, with new dynmap.
- Run:
/dmarker addcircle id:prof/bloodstone
- Stop the server
- Start the server and observer errors being thrown in dynmap onEnable
[X] I have looked at all other issues and this is not a duplicate
[X] I have been able to replicate this
Issue Analytics
- State:
- Created 3 years ago
- Comments:5
Top Results From Across the Web
Chapter 3. Beans, BeanFactory and the ApplicationContext
The BeanFactory is created and initialized with a configuration which describes all the beans. Most Spring users use a BeanFactory or ApplicationContext variant ......
Read more >Known Issues - JFrog - JFrog Documentation
For JFrog Artifactory issues, click the issue ID for the details in JIRA. Known issues are based on the following criteria: Severity 1...
Read more >Fix list for IBM WebSphere Application Server V8.5
IBM WebSphere Application Server provides periodic fixes for the base and Network Deployment editions of release V8.5. The following is a complete listing ......
Read more >Release Notes 5.2 - Apache Tapestry
To upgrade from 5.1 to 5.2, most users will be able to just update the Maven dependency in their POM file (or download...
Read more >Changelog Archive - Jenkins
Globally configured build discarders may delete old builds if a project has been configured with a more aggressive build discarder configuration since the...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Just kidding. Its fixed on 3.3beta3 at least:
No errors in console
And the marker does show up on the map:
I’ll re-mark this as fixed and close. Nice catch @JurgenKuyper
This can still be replicated in the most recent versions