#24121 closed defect (fixed)
Attempt to save preferences throws NPE
| Reported by: | galen8183 | Owned by: | galen8183 |
|---|---|---|---|
| Priority: | normal | Milestone: | 25.02 |
| Component: | Core | Version: | |
| Keywords: | Cc: |
Description (last modified by )
Any attempt to save preferences (with or without modification) fails, see attachment below
Relative:URL: ^/trunk
Repository:UUID: 0c6e7542-c601-0410-84e7-c038aed88b3b
Last:Changed Date: 2025-02-03 20:59:54 +0100 (Mon, 03 Feb 2025)
Revision:19307
Build-Date:2025-02-04 02:30:32
URL:https://josm.openstreetmap.de/svn/trunk
Identification: JOSM/1.5 (19307 en) Linux Void Linux
Memory Usage: 858 MB / 3972 MB (91 MB allocated, but free)
Java version: 21.0.6+1-void-r1, Void, OpenJDK 64-Bit Server VM
Look and Feel: com.formdev.flatlaf.FlatDarculaLaf
Screen: :0.0 1920x1080x[Multi depth]@60Hz (scaling 1.00×1.00) :0.1 1920x1080x[Multi depth]@[Unknown refresh rate] (scaling 1.00×1.00)
Maximum Screen Size: 1920×1080
Best cursor sizes: 16×16→16×16, 32×32→32×32
Environment variable LANG: en_CA.UTF-8
System property file.encoding: UTF-8
System property sun.jnu.encoding: UTF-8
Locale info: en_CA
Numbers with default locale: 1234567890 -> 1234567890
VM arguments: [--module-path=/usr/local/lib/javafx-sdk-23.0.1/lib, --add-modules=ALL-MODULE-PATH, --add-exports=java.base/sun.security.action=ALL-UNNAMED, --add-exports=java.desktop/com.sun.imageio.plugins.jpeg=ALL-UNNAMED, --add-exports=java.desktop/com.sun.imageio.spi=ALL-UNNAMED, -Djava.util.prefs.userRoot=${HOME}/.local/share/java]
Program arguments: [--]
Plugins:
+ DirectDownload (36379)
+ FastDraw (36379)
+ HouseNumberTaggingTool (36379)
+ KartaView (545)
+ Mapillary (1792)
+ MicrosoftStreetside (36379)
+ alignways (36379)
+ apache-commons (36379)
+ buildings_tools (36382)
+ changeset-viewer (1738240062)
+ conflation (259)
+ contourmerge (v0.2.2)
+ ejml (36379)
+ flatlaf (36379)
+ geotools (36379)
+ gridify (1738594923)
+ imagery_offset_db (36379)
+ intersection (0.0.7)
+ jackson (36379)
+ javafx (36379)
+ jaxb (36379)
+ jogl (1.2.3)
+ jts (36379)
+ opendata (36379)
+ pbf (36379)
+ pmtiles (36379)
+ pt_assistant (646)
+ reverter (36379)
+ routing2 (8)
+ sidewalks (71)
+ turnrestrictions (36379)
+ undelete (36379)
+ utilsplugin2 (36379)
+ wikipedia (428)
Tagging presets:
+ https://josm.openstreetmap.de/josmfile?page=Presets/LaneAttributes&zip=1
+ https://josm.openstreetmap.de/josmfile?page=Presets/MappingAccessibility&zip=1
+ https://josm.openstreetmap.de/josmfile?page=Presets/PublicTransportGtfs&zip=1
+ https://josm.openstreetmap.de/josmfile?page=Presets/PublicTransportOneClick&zip=1
+ https://raw.githubusercontent.com/yopaseopor/traffic_signs_preset_JOSM/master/CA.zip
+ https://josm.openstreetmap.de/josmfile?page=Presets/Wikidata&zip=1
+ <josm.pref>/presets/general.xml
Map paint styles:
- https://josm.openstreetmap.de/josmfile?page=Styles/Lane_and_Road_Attributes&zip=1
- https://josm.openstreetmap.de/josmfile?page=Styles/PublicTransport&zip=1
- https://josm.openstreetmap.de/josmfile?page=Styles/Modified&zip=1
- https://raw.githubusercontent.com/species/josm-preset-traffic_sign_direction/master/direction.mapcss
+ https://josm.openstreetmap.de/josmfile?page=Styles/SidewalksAndFootways&zip=1
+ https://josm.openstreetmap.de/josmfile?page=Styles/ParkingLanes&zip=1
+ https://josm.openstreetmap.de/josmfile?page=Styles/light_source&zip=1
+ https://josm.openstreetmap.de/josmfile?page=Styles/Direction&zip=1
Validator rules:
+ https://josm.openstreetmap.de/josmfile?page=Rules/KeepRight&zip=1
+ https://josm.openstreetmap.de/josmfile?page=Rules/PublicTransportGtfs&zip=1
+ https://josm.openstreetmap.de/josmfile?page=Rules/QAToolInspiredValidations&zip=1
+ https://josm.openstreetmap.de/josmfile?page=Rules/InvalidWebsiteProtocol&zip=1
+ https://josm.openstreetmap.de/josmfile?page=Rules/Runways&zip=1
+ https://josm.openstreetmap.de/josmfile?page=Rules/DuplicateAttributes&zip=1
Last errors/warnings:
- 00013.758 W: Failed to handle zip file 'site-josm.openstreetmap.de-_browser_osm_applications_editors_josm_plugins_opendata_modules-icons.zip'. Exception was: java.util.zip.ZipException: zip END header not found: java.util.zip.ZipException: zip END header not found
- 00013.759 E: Failed to locate image 'fr.datagouvfr.jar/images/fr24.png'
- 00013.760 W: Failed to handle zip file 'site-josm.openstreetmap.de-_browser_osm_applications_editors_josm_plugins_opendata_modules-icons.zip'. Exception was: java.util.zip.ZipException: zip END header not found: java.util.zip.ZipException: zip END header not found
- 00013.760 E: Failed to locate image 'fr.toulouse.jar/images/data.fr.toulouse_24.png'
- 00013.761 W: Failed to handle zip file 'site-josm.openstreetmap.de-_browser_osm_applications_editors_josm_plugins_opendata_modules-icons.zip'. Exception was: java.util.zip.ZipException: zip END header not found: java.util.zip.ZipException: zip END header not found
- 00013.761 E: Failed to locate image 'fr.paris.jar/images/data.fr.paris_24.png'
- 00027.959 E: Handled by bug report queue: java.lang.NullPointerException: Cannot invoke "String.equals(Object)" because the return value of "org.openstreetmap.gui.jmapviewer.interfaces.TileSource.getId()" is null
=== REPORTED CRASH DATA ===
BugReportExceptionHandler#handleException:
No data collected.
Warning issued by: BugReportExceptionHandler#handleException
=== STACK TRACE ===
Thread: AWT-EventQueue-0 (35) of main
java.lang.NullPointerException: Cannot invoke "String.equals(Object)" because the return value of "org.openstreetmap.gui.jmapviewer.interfaces.TileSource.getId()" is null
at org.openstreetmap.josm.gui.bbox.SourceButton.generatePopupMenu(SourceButton.java:84)
at org.openstreetmap.josm.gui.bbox.SourceButton.setSources(SourceButton.java:110)
at org.openstreetmap.josm.gui.bbox.SlippyMapBBoxChooser.refreshTileSources(SlippyMapBBoxChooser.java:375)
at org.openstreetmap.josm.gui.download.SlippyMapChooser.refreshTileSources(SlippyMapChooser.java:87)
at org.openstreetmap.josm.gui.download.DownloadDialog.refreshTileSources(DownloadDialog.java:430)
at org.openstreetmap.josm.gui.preferences.imagery.ImageryPreference.ok(ImageryPreference.java:142)
at org.openstreetmap.josm.gui.preferences.PreferenceTabbedPane$PluginDownloadAfterTask.run(PreferenceTabbedPane.java:104)
at org.openstreetmap.josm.gui.preferences.PreferenceTabbedPane.savePreferences(PreferenceTabbedPane.java:455)
at org.openstreetmap.josm.gui.preferences.PreferenceDialog$OKAction.actionPerformed(PreferenceDialog.java:217)
at java.desktop/javax.swing.AbstractButton.fireActionPerformed(AbstractButton.java:1972)
at java.desktop/javax.swing.AbstractButton$Handler.actionPerformed(AbstractButton.java:2314)
at java.desktop/javax.swing.DefaultButtonModel.fireActionPerformed(DefaultButtonModel.java:407)
at java.desktop/javax.swing.DefaultButtonModel.setPressed(DefaultButtonModel.java:262)
at java.desktop/javax.swing.plaf.basic.BasicButtonListener.mouseReleased(BasicButtonListener.java:279)
at java.desktop/java.awt.AWTEventMulticaster.mouseReleased(AWTEventMulticaster.java:297)
at java.desktop/java.awt.Component.processMouseEvent(Component.java:6621)
at java.desktop/javax.swing.JComponent.processMouseEvent(JComponent.java:3398)
at java.desktop/java.awt.Component.processEvent(Component.java:6386)
at java.desktop/java.awt.Container.processEvent(Container.java:2266)
at java.desktop/java.awt.Component.dispatchEventImpl(Component.java:4996)
at java.desktop/java.awt.Container.dispatchEventImpl(Container.java:2324)
at java.desktop/java.awt.Component.dispatchEvent(Component.java:4828)
at java.desktop/java.awt.LightweightDispatcher.retargetMouseEvent(Container.java:4948)
at java.desktop/java.awt.LightweightDispatcher.processMouseEvent(Container.java:4575)
at java.desktop/java.awt.LightweightDispatcher.dispatchEvent(Container.java:4516)
at java.desktop/java.awt.Container.dispatchEventImpl(Container.java:2310)
at java.desktop/java.awt.Window.dispatchEventImpl(Window.java:2780)
at java.desktop/java.awt.Component.dispatchEvent(Component.java:4828)
at java.desktop/java.awt.EventQueue.dispatchEventImpl(EventQueue.java:775)
at java.desktop/java.awt.EventQueue$4.run(EventQueue.java:720)
at java.desktop/java.awt.EventQueue$4.run(EventQueue.java:714)
at java.base/java.security.AccessController.doPrivileged(AccessController.java:400)
at java.base/java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:87)
at java.base/java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:98)
at java.desktop/java.awt.EventQueue$5.run(EventQueue.java:747)
at java.desktop/java.awt.EventQueue$5.run(EventQueue.java:745)
at java.base/java.security.AccessController.doPrivileged(AccessController.java:400)
at java.base/java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:87)
at java.desktop/java.awt.EventQueue.dispatchEvent(EventQueue.java:744)
at java.desktop/java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:203)
at java.desktop/java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:124)
at java.desktop/java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:117)
at java.desktop/java.awt.WaitDispatchSupport$2.run(WaitDispatchSupport.java:191)
at java.desktop/java.awt.WaitDispatchSupport$4.run(WaitDispatchSupport.java:236)
at java.desktop/java.awt.WaitDispatchSupport$4.run(WaitDispatchSupport.java:234)
at java.base/java.security.AccessController.doPrivileged(AccessController.java:319)
at java.desktop/java.awt.WaitDispatchSupport.enter(WaitDispatchSupport.java:234)
at java.desktop/java.awt.Dialog.show(Dialog.java:1079)
at java.desktop/java.awt.Component.show(Component.java:1728)
at java.desktop/java.awt.Component.setVisible(Component.java:1675)
at java.desktop/java.awt.Window.setVisible(Window.java:1036)
at java.desktop/java.awt.Dialog.setVisible(Dialog.java:1015)
at org.openstreetmap.josm.gui.preferences.PreferenceDialog.setVisible(PreferenceDialog.java:145)
at org.openstreetmap.josm.actions.PreferencesAction.run(PreferencesAction.java:119)
at org.openstreetmap.josm.actions.PreferencesAction.actionPerformed(PreferencesAction.java:104)
at java.desktop/javax.swing.SwingUtilities.notifyAction(SwingUtilities.java:1810)
at java.desktop/javax.swing.JComponent.processKeyBinding(JComponent.java:2956)
at java.desktop/javax.swing.KeyboardManager.fireBinding(KeyboardManager.java:309)
at java.desktop/javax.swing.KeyboardManager.fireKeyboardAction(KeyboardManager.java:251)
at java.desktop/javax.swing.JComponent.processKeyBindingsForAllComponents(JComponent.java:3049)
at java.desktop/javax.swing.JComponent.processKeyBindings(JComponent.java:3041)
at java.desktop/javax.swing.JComponent.processKeyEvent(JComponent.java:2918)
at java.desktop/java.awt.Component.processEvent(Component.java:6398)
at java.desktop/java.awt.Container.processEvent(Container.java:2266)
at java.desktop/java.awt.Component.dispatchEventImpl(Component.java:4996)
at java.desktop/java.awt.Container.dispatchEventImpl(Container.java:2324)
at java.desktop/java.awt.Component.dispatchEvent(Component.java:4828)
at java.desktop/java.awt.KeyboardFocusManager.redispatchEvent(KeyboardFocusManager.java:1952)
at java.desktop/java.awt.DefaultKeyboardFocusManager.dispatchKeyEvent(DefaultKeyboardFocusManager.java:883)
at java.desktop/java.awt.DefaultKeyboardFocusManager.preDispatchKeyEvent(DefaultKeyboardFocusManager.java:1146)
at java.desktop/java.awt.DefaultKeyboardFocusManager.typeAheadAssertions(DefaultKeyboardFocusManager.java:1020)
at java.desktop/java.awt.DefaultKeyboardFocusManager.dispatchEvent(DefaultKeyboardFocusManager.java:848)
at java.desktop/java.awt.Component.dispatchEventImpl(Component.java:4877)
at java.desktop/java.awt.Container.dispatchEventImpl(Container.java:2324)
at java.desktop/java.awt.Window.dispatchEventImpl(Window.java:2780)
at java.desktop/java.awt.Component.dispatchEvent(Component.java:4828)
at java.desktop/java.awt.EventQueue.dispatchEventImpl(EventQueue.java:775)
at java.desktop/java.awt.EventQueue$4.run(EventQueue.java:720)
at java.desktop/java.awt.EventQueue$4.run(EventQueue.java:714)
at java.base/java.security.AccessController.doPrivileged(AccessController.java:400)
at java.base/java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:87)
at java.base/java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:98)
at java.desktop/java.awt.EventQueue$5.run(EventQueue.java:747)
at java.desktop/java.awt.EventQueue$5.run(EventQueue.java:745)
at java.base/java.security.AccessController.doPrivileged(AccessController.java:400)
at java.base/java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:87)
at java.desktop/java.awt.EventQueue.dispatchEvent(EventQueue.java:744)
at java.desktop/java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:203)
at java.desktop/java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:124)
at java.desktop/java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:113)
at java.desktop/java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:109)
at java.desktop/java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:101)
at java.desktop/java.awt.EventDispatchThread.run(EventDispatchThread.java:90)
Attachments (1)
Change History (15)
comment:1 by , 9 months ago
by , 9 months ago
| Attachment: | 2025-02-06T135805.webm added |
|---|
failure parsing WMS layer list with no modification
comment:2 by , 9 months ago
| Description: | modified (diff) |
|---|---|
| Summary: | Attempt to add WMS layer throws NPE → Attempt to save preferences throws NPE |
comment:3 by , 9 months ago
| Description: | modified (diff) |
|---|
comment:4 by , 9 months ago
past two edits were removing irrelevant info, I'm getting the same error after removing cache and all imagery preferences from preferences.xml
comment:5 by , 9 months ago
| Owner: | changed from to |
|---|---|
| Status: | new → needinfo |
Well. That's a bit strange. Especially your last comment. I'd expect this to be related to either the imagery prefs or the cache. Would it be possible for you to send me your cache/config by mail (see https://www.dstoecker.eu/ for one possible address, do NOT upload it here!)?
Otherwise can you create a minimal example to reproduce?
comment:6 by , 9 months ago
Sorry, I shouldn't have said "all imagery preferences", I only removed non-default layers. Somehow the OSM Carto layer had it's ID tag removed in imagery.entries?
comment:8 by , 9 months ago
| Component: | Core imagery → Core |
|---|---|
| Milestone: | → 25.02 |
Tomorrows latest should fix the issue. Would be nice if you could test it with your preferences.
comment:10 by , 9 months ago
I already manually added back the default tag <tag key="id" value="standard"/> to the OSM Carto entry, it works again without issue
comment:12 by , 8 months ago
I'm a bit confused. I opened ticket #24159. That ticket was closed as being duplicate of this ticket.
This ticket is closed as being a solved problem.
Strange question: so why did I have the problem, if it was solved?



May be unrelated to those layers, removing them and attempting to save imagery preferences is failing every time now...
Existing activated imagery layers are still loading as expected, but opening preferences and only clicking "OK" throws the same error.