Modify

Opened 3 months ago

Closed 3 months ago

Last modified 3 months ago

#23485 closed defect (fixed)

JOSM crashes when opening Imagery Prefrences

Reported by: btwhite92@… Owned by: team
Priority: normal Milestone: 24.02
Component: Core imagery Version:
Keywords: template_report Cc: stoecker, taylor.smock

Description

What steps will reproduce the problem?

  1. Imagery > Imagery Preferences

What is the expected result?

Display imagery preferences window

What happens instead?

JOSM crashes and must be force quit

Please provide any additional information below. Attach a screenshot if possible.

Revision:18969
Build-Date:2024-02-06 12:15:17

Identification: JOSM/1.5 (18969 en) Mac OS X 13.4.1
OS Build number: macOS 13.4.1 (22F770820d)
Memory Usage: 417 MB / 2048 MB (141 MB allocated, but free)
Java version: 17.0.10+7-LTS, Azul Systems, Inc., OpenJDK 64-Bit Server VM
Look and Feel: com.apple.laf.AquaLookAndFeel
Screen: Display 1 1440×900 (scaling 2.00×2.00) Display 2 2560×1440 (scaling 2.00×2.00)
Maximum Screen Size: 2560×1440
Best cursor sizes: 16×16→16×16, 32×32→32×32
System property file.encoding: UTF-8
System property sun.jnu.encoding: UTF-8
Locale info: en_US
Numbers with default locale: 1234567890 -> 1234567890
VM arguments: [-Djpackage.app-version=18969, --add-modules=java.scripting,java.sql,javafx.controls,javafx.media,javafx.swing,javafx.web, --add-exports=java.base/sun.security.action=ALL-UNNAMED, --add-exports=java.desktop/com.apple.eawt=ALL-UNNAMED, --add-exports=java.desktop/com.sun.imageio.plugins.jpeg=ALL-UNNAMED, --add-exports=java.desktop/com.sun.imageio.spi=ALL-UNNAMED, --add-opens=java.base/java.lang=ALL-UNNAMED, --add-opens=java.base/java.nio=ALL-UNNAMED, --add-opens=java.base/jdk.internal.loader=ALL-UNNAMED, --add-opens=java.base/jdk.internal.ref=ALL-UNNAMED, --add-opens=java.desktop/javax.imageio.spi=ALL-UNNAMED, --add-opens=java.desktop/javax.swing.text.html=ALL-UNNAMED, --add-opens=java.prefs/java.util.prefs=ALL-UNNAMED, -Djpackage.app-path=/Applications/JOSM.app/Contents/MacOS/JOSM]

Plugins:
+ PicLayer (1.0.3)
+ apache-commons (36176)
+ ejml (36176)
+ geotools (36176)
+ jackson (36176)
+ jaxb (36118)
+ jts (36004)
+ measurement (36200)
+ opendata (36200)
+ utilsplugin2 (36200)

Map paint styles:
- https://josm.openstreetmap.de/josmfile?page=Styles/ColourTag&zip=1
+ ${HOME}/Documents/piste.mapcss

Last errors/warnings:
- 00043.704 E: Handled by bug report queue: java.lang.NullPointerException: Cannot invoke "org.openstreetmap.josm.data.imagery.ImageryInfo$ImageryType.getTypeString()" because "this.sourceType" is null



=== REPORTED CRASH DATA ===
BugReportExceptionHandler#handleException:
No data collected.

Warning issued by: BugReportExceptionHandler#handleException

=== STACK TRACE ===
Thread: AWT-EventQueue-0 (23) of main
java.lang.NullPointerException: Cannot invoke "org.openstreetmap.josm.data.imagery.ImageryInfo$ImageryType.getTypeString()" because "this.sourceType" is null
	at org.openstreetmap.josm.data.imagery.ImageryInfo.getExtendedUrl(ImageryInfo.java:776)
	at org.openstreetmap.josm.gui.preferences.imagery.ImageryProvidersPanel$ImageryURLTableCellRenderer.lambda$getTableCellRendererComponent$0(ImageryProvidersPanel.java:133)
	at java.base/java.util.stream.MatchOps$1MatchSink.accept(Unknown Source)
	at java.base/java.util.ArrayList$ArrayListSpliterator.tryAdvance(Unknown Source)
	at java.base/java.util.stream.ReferencePipeline.forEachWithCancel(Unknown Source)
	at java.base/java.util.stream.AbstractPipeline.copyIntoWithCancel(Unknown Source)
	at java.base/java.util.stream.AbstractPipeline.copyInto(Unknown Source)
	at java.base/java.util.stream.AbstractPipeline.wrapAndCopyInto(Unknown Source)
	at java.base/java.util.stream.MatchOps$MatchOp.evaluateSequential(Unknown Source)
	at java.base/java.util.stream.MatchOps$MatchOp.evaluateSequential(Unknown Source)
	at java.base/java.util.stream.AbstractPipeline.evaluate(Unknown Source)
	at java.base/java.util.stream.ReferencePipeline.anyMatch(Unknown Source)
	at org.openstreetmap.josm.gui.preferences.imagery.ImageryProvidersPanel$ImageryURLTableCellRenderer.getTableCellRendererComponent(ImageryProvidersPanel.java:133)
	at java.desktop/javax.swing.JTable.prepareRenderer(Unknown Source)
	at java.desktop/javax.swing.plaf.basic.BasicTableUI.paintCell(Unknown Source)
	at java.desktop/javax.swing.plaf.basic.BasicTableUI.paintCells(Unknown Source)
	at java.desktop/javax.swing.plaf.basic.BasicTableUI.paint(Unknown Source)
	at java.desktop/javax.swing.plaf.ComponentUI.update(Unknown Source)
	at java.desktop/javax.swing.JComponent.paintComponent(Unknown Source)
	at java.desktop/javax.swing.JComponent.paint(Unknown Source)
	at java.desktop/javax.swing.JComponent.paintChildren(Unknown Source)
	at java.desktop/javax.swing.JComponent.paint(Unknown Source)
	at java.desktop/javax.swing.JViewport.paint(Unknown Source)
	at java.desktop/javax.swing.JComponent.paintChildren(Unknown Source)
	at java.desktop/javax.swing.JComponent.paint(Unknown Source)
	at java.desktop/javax.swing.JComponent.paintChildren(Unknown Source)
	at java.desktop/javax.swing.JComponent.paint(Unknown Source)
	at java.desktop/javax.swing.JComponent.paintChildren(Unknown Source)
	at java.desktop/javax.swing.JComponent.paint(Unknown Source)
	at java.desktop/javax.swing.JComponent.paintChildren(Unknown Source)
	at java.desktop/javax.swing.JComponent.paint(Unknown Source)
	at java.desktop/javax.swing.JComponent.paintChildren(Unknown Source)
	at java.desktop/javax.swing.JComponent.paint(Unknown Source)
	at java.desktop/javax.swing.JComponent.paintChildren(Unknown Source)
	at java.desktop/javax.swing.JComponent.paint(Unknown Source)
	at java.desktop/javax.swing.JComponent.paintChildren(Unknown Source)
	at java.desktop/javax.swing.JComponent.paint(Unknown Source)
	at java.desktop/javax.swing.JComponent.paintChildren(Unknown Source)
	at java.desktop/javax.swing.JComponent.paint(Unknown Source)
	at java.desktop/javax.swing.JLayeredPane.paint(Unknown Source)
	at java.desktop/javax.swing.JComponent.paintChildren(Unknown Source)
	at java.desktop/javax.swing.JComponent.paintToOffscreen(Unknown Source)
	at java.desktop/javax.swing.RepaintManager$PaintManager.paintDoubleBufferedImpl(Unknown Source)
	at java.desktop/javax.swing.RepaintManager$PaintManager.paintDoubleBuffered(Unknown Source)
	at java.desktop/javax.swing.RepaintManager$PaintManager.paint(Unknown Source)
	at java.desktop/javax.swing.RepaintManager.paint(Unknown Source)
	at java.desktop/javax.swing.JComponent.paint(Unknown Source)
	at java.desktop/java.awt.GraphicsCallback$PaintCallback.run(Unknown Source)
	at java.desktop/sun.awt.SunGraphicsCallback.runOneComponent(Unknown Source)
	at java.desktop/sun.awt.SunGraphicsCallback.runComponents(Unknown Source)
	at java.desktop/java.awt.Container.paint(Unknown Source)
	at java.desktop/java.awt.Window.paint(Unknown Source)
	at java.desktop/javax.swing.RepaintManager$4.run(Unknown Source)
	at java.desktop/javax.swing.RepaintManager$4.run(Unknown Source)
	at java.base/java.security.AccessController.doPrivileged(Unknown Source)
	at java.base/java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(Unknown Source)
	at java.desktop/javax.swing.RepaintManager.paintDirtyRegions(Unknown Source)
	at java.desktop/javax.swing.RepaintManager.paintDirtyRegions(Unknown Source)
	at java.desktop/javax.swing.RepaintManager.prePaintDirtyRegions(Unknown Source)
	at java.desktop/javax.swing.RepaintManager$ProcessingRunnable.run(Unknown Source)
	at java.desktop/java.awt.event.InvocationEvent.dispatch(Unknown Source)
	at java.desktop/java.awt.EventQueue.dispatchEventImpl(Unknown Source)
	at java.desktop/java.awt.EventQueue$4.run(Unknown Source)
	at java.desktop/java.awt.EventQueue$4.run(Unknown Source)
	at java.base/java.security.AccessController.doPrivileged(Unknown Source)
	at java.base/java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(Unknown Source)
	at java.desktop/java.awt.EventQueue.dispatchEvent(Unknown Source)
	at java.desktop/java.awt.EventDispatchThread.pumpOneEventForFilters(Unknown Source)
	at java.desktop/java.awt.EventDispatchThread.pumpEventsForFilter(Unknown Source)
	at java.desktop/java.awt.EventDispatchThread.pumpEventsForFilter(Unknown Source)
	at java.desktop/java.awt.WaitDispatchSupport$2.run(Unknown Source)
	at java.desktop/java.awt.WaitDispatchSupport$4.run(Unknown Source)
	at java.desktop/java.awt.WaitDispatchSupport$4.run(Unknown Source)
	at java.base/java.security.AccessController.doPrivileged(Unknown Source)
	at java.desktop/java.awt.WaitDispatchSupport.enter(Unknown Source)
	at java.desktop/java.awt.Dialog.show(Unknown Source)
	at java.desktop/java.awt.Component.show(Unknown Source)
	at java.desktop/java.awt.Component.setVisible(Unknown Source)
	at java.desktop/java.awt.Window.setVisible(Unknown Source)
	at java.desktop/java.awt.Dialog.setVisible(Unknown Source)
	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.AbstractButton.fireActionPerformed(Unknown Source)
	at java.desktop/javax.swing.AbstractButton$Handler.actionPerformed(Unknown Source)
	at java.desktop/javax.swing.DefaultButtonModel.fireActionPerformed(Unknown Source)
	at java.desktop/javax.swing.DefaultButtonModel.setPressed(Unknown Source)
	at java.desktop/javax.swing.AbstractButton.doClick(Unknown Source)
	at java.desktop/com.apple.laf.ScreenMenuItem.actionPerformed(Unknown Source)
	at java.desktop/java.awt.MenuItem.processActionEvent(Unknown Source)
	at java.desktop/java.awt.MenuItem.processEvent(Unknown Source)
	at java.desktop/java.awt.MenuComponent.dispatchEventImpl(Unknown Source)
	at java.desktop/java.awt.MenuComponent.dispatchEvent(Unknown Source)
	at java.desktop/java.awt.EventQueue.dispatchEventImpl(Unknown Source)
	at java.desktop/java.awt.EventQueue$4.run(Unknown Source)
	at java.desktop/java.awt.EventQueue$4.run(Unknown Source)
	at java.base/java.security.AccessController.doPrivileged(Unknown Source)
	at java.base/java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(Unknown Source)
	at java.base/java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(Unknown Source)
	at java.desktop/java.awt.EventQueue$5.run(Unknown Source)
	at java.desktop/java.awt.EventQueue$5.run(Unknown Source)
	at java.base/java.security.AccessController.doPrivileged(Unknown Source)
	at java.base/java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(Unknown Source)
	at java.desktop/java.awt.EventQueue.dispatchEvent(Unknown Source)
	at java.desktop/java.awt.EventDispatchThread.pumpOneEventForFilters(Unknown Source)
	at java.desktop/java.awt.EventDispatchThread.pumpEventsForFilter(Unknown Source)
	at java.desktop/java.awt.EventDispatchThread.pumpEventsForHierarchy(Unknown Source)
	at java.desktop/java.awt.EventDispatchThread.pumpEvents(Unknown Source)
	at java.desktop/java.awt.EventDispatchThread.pumpEvents(Unknown Source)
	at java.desktop/java.awt.EventDispatchThread.run(Unknown Source)

Attachments (2)

Capture.PNG (232.1 KB ) - added by anonymous 3 months ago.
23485.patch (7.3 KB ) - added by taylor.smock 3 months ago.
Check for required elements in ELI SyncEditorLayerIndex since XSD syntax does not allow us to validate the desired XML format

Download all attachments as: .zip

Change History (34)

by anonymous, 3 months ago

Attachment: Capture.PNG added

comment:1 by anonymous, 3 months ago

Confirming this is an issue for a coworker and me today as well. We are using slightly different versions of Windows 10, Java, and JOSM.

Could this possibly be related to one of the individual imagery providers and their service/URL causing the error? This could explain how this issue could have occurred suddenly for multiple users worldwide running different versions.

Revision:18969
Build-Date:2024-02-06 12:12:39

Identification: JOSM/1.5 (18969 en) Windows 10 64-Bit
OS Build number: Windows 10 Pro 2009 (19045)
Memory Usage: 868 MB / 3930 MB (196 MB allocated, but free)
Java version: 17.0.10+7-LTS, Azul Systems, Inc., OpenJDK 64-Bit Server VM
Look and Feel: com.sun.java.swing.plaf.windows.WindowsLookAndFeel
Screen: \Display0 1920×1200 (scaling 1.50×1.50)
Maximum Screen Size: 1920×1200
Best cursor sizes: 16×16→48×48, 32×32→48×48
System property file.encoding: Cp1252
System property sun.jnu.encoding: Cp1252
Locale info: en_US
Numbers with default locale: 1234567890 -> 1234567890
VM arguments: [-Djpackage.app-version=1.5.18969, --add-modules=java.scripting,java.sql,javafx.controls,javafx.media,javafx.swing,javafx.web, --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, --add-opens=java.base/java.lang=ALL-UNNAMED, --add-opens=java.base/java.nio=ALL-UNNAMED, --add-opens=java.base/jdk.internal.loader=ALL-UNNAMED, --add-opens=java.base/jdk.internal.ref=ALL-UNNAMED, --add-opens=java.desktop/javax.imageio.spi=ALL-UNNAMED, --add-opens=java.desktop/javax.swing.text.html=ALL-UNNAMED, --add-opens=java.prefs/java.util.prefs=ALL-UNNAMED, -Djpackage.app-path=%UserProfile%\AppData\Local\JOSM\JOSM.exe]

Last errors/warnings:
- 00000.227 W: extended font config - overriding 'filename.Myanmar_Text=mmrtext.ttf' with 'MMRTEXT.TTF'
- 00000.229 W: extended font config - overriding 'filename.Mongolian_Baiti=monbaiti.ttf' with 'MONBAITI.TTF'
- 00000.646 E: java.security.KeyStoreException: Windows-ROOT not found. Cause: java.security.NoSuchAlgorithmException: Windows-ROOT KeyStore not available
- 00080.319 W: java.net.SocketTimeoutException: Read timed out. Cause: java.net.SocketTimeoutException: Read timed out
- 00080.422 E: Failed to locate image 'https://www.fs.usda.gov/sites/all/themes/fs_hq/images/usfslogo.png'
- 00266.568 E: Handled by bug report queue: java.lang.NullPointerException: Cannot invoke "org.openstreetmap.josm.data.imagery.ImageryInfo$ImageryType.getTypeString()" because "this.sourceType" is null



=== REPORTED CRASH DATA ===
BugReportExceptionHandler#handleException:
No data collected.

Warning issued by: BugReportExceptionHandler#handleException

=== STACK TRACE ===
Thread: AWT-EventQueue-0 (24) of main
java.lang.NullPointerException: Cannot invoke "org.openstreetmap.josm.data.imagery.ImageryInfo$ImageryType.getTypeString()" because "this.sourceType" is null
	at org.openstreetmap.josm.data.imagery.ImageryInfo.getExtendedUrl(ImageryInfo.java:776)
	at org.openstreetmap.josm.gui.preferences.imagery.ImageryProvidersPanel$ImageryURLTableCellRenderer.lambda$getTableCellRendererComponent$0(ImageryProvidersPanel.java:133)
	at java.base/java.util.stream.MatchOps$1MatchSink.accept(Unknown Source)
	at java.base/java.util.ArrayList$ArrayListSpliterator.tryAdvance(Unknown Source)
	at java.base/java.util.stream.ReferencePipeline.forEachWithCancel(Unknown Source)
	at java.base/java.util.stream.AbstractPipeline.copyIntoWithCancel(Unknown Source)
	at java.base/java.util.stream.AbstractPipeline.copyInto(Unknown Source)
	at java.base/java.util.stream.AbstractPipeline.wrapAndCopyInto(Unknown Source)
	at java.base/java.util.stream.MatchOps$MatchOp.evaluateSequential(Unknown Source)
	at java.base/java.util.stream.MatchOps$MatchOp.evaluateSequential(Unknown Source)
	at java.base/java.util.stream.AbstractPipeline.evaluate(Unknown Source)
	at java.base/java.util.stream.ReferencePipeline.anyMatch(Unknown Source)
	at org.openstreetmap.josm.gui.preferences.imagery.ImageryProvidersPanel$ImageryURLTableCellRenderer.getTableCellRendererComponent(ImageryProvidersPanel.java:133)
	at java.desktop/javax.swing.JTable.prepareRenderer(Unknown Source)
	at java.desktop/javax.swing.plaf.basic.BasicTableUI.paintCell(Unknown Source)
	at java.desktop/javax.swing.plaf.basic.BasicTableUI.paintCells(Unknown Source)
	at java.desktop/javax.swing.plaf.basic.BasicTableUI.paint(Unknown Source)
	at java.desktop/javax.swing.plaf.ComponentUI.update(Unknown Source)
	at java.desktop/javax.swing.JComponent.paintComponent(Unknown Source)
	at java.desktop/javax.swing.JComponent.paint(Unknown Source)
	at java.desktop/javax.swing.JComponent.paintChildren(Unknown Source)
	at java.desktop/javax.swing.JComponent.paint(Unknown Source)
	at java.desktop/javax.swing.JViewport.paint(Unknown Source)
	at java.desktop/javax.swing.JComponent.paintChildren(Unknown Source)
	at java.desktop/javax.swing.JComponent.paint(Unknown Source)
	at java.desktop/javax.swing.JComponent.paintToOffscreen(Unknown Source)
	at java.desktop/javax.swing.RepaintManager$PaintManager.paintDoubleBufferedFPScales(Unknown Source)
	at java.desktop/javax.swing.RepaintManager$PaintManager.paintDoubleBuffered(Unknown Source)
	at java.desktop/javax.swing.RepaintManager$PaintManager.paint(Unknown Source)
	at java.desktop/javax.swing.RepaintManager.paint(Unknown Source)
	at java.desktop/javax.swing.JComponent._paintImmediately(Unknown Source)
	at java.desktop/javax.swing.JComponent.paintImmediately(Unknown Source)
	at java.desktop/javax.swing.RepaintManager$4.run(Unknown Source)
	at java.desktop/javax.swing.RepaintManager$4.run(Unknown Source)
	at java.base/java.security.AccessController.doPrivileged(Unknown Source)
	at java.base/java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(Unknown Source)
	at java.desktop/javax.swing.RepaintManager.paintDirtyRegions(Unknown Source)
	at java.desktop/javax.swing.RepaintManager.paintDirtyRegions(Unknown Source)
	at java.desktop/javax.swing.RepaintManager.prePaintDirtyRegions(Unknown Source)
	at java.desktop/javax.swing.RepaintManager$ProcessingRunnable.run(Unknown Source)
	at java.desktop/java.awt.event.InvocationEvent.dispatch(Unknown Source)
	at java.desktop/java.awt.EventQueue.dispatchEventImpl(Unknown Source)
	at java.desktop/java.awt.EventQueue$4.run(Unknown Source)
	at java.desktop/java.awt.EventQueue$4.run(Unknown Source)
	at java.base/java.security.AccessController.doPrivileged(Unknown Source)
	at java.base/java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(Unknown Source)
	at java.desktop/java.awt.EventQueue.dispatchEvent(Unknown Source)
	at java.desktop/java.awt.EventDispatchThread.pumpOneEventForFilters(Unknown Source)
	at java.desktop/java.awt.EventDispatchThread.pumpEventsForFilter(Unknown Source)
	at java.desktop/java.awt.EventDispatchThread.pumpEventsForFilter(Unknown Source)
	at java.desktop/java.awt.WaitDispatchSupport$2.run(Unknown Source)
	at java.desktop/java.awt.WaitDispatchSupport$4.run(Unknown Source)
	at java.desktop/java.awt.WaitDispatchSupport$4.run(Unknown Source)
	at java.base/java.security.AccessController.doPrivileged(Unknown Source)
	at java.desktop/java.awt.WaitDispatchSupport.enter(Unknown Source)
	at java.desktop/java.awt.Dialog.show(Unknown Source)
	at java.desktop/java.awt.Component.show(Unknown Source)
	at java.desktop/java.awt.Component.setVisible(Unknown Source)
	at java.desktop/java.awt.Window.setVisible(Unknown Source)
	at java.desktop/java.awt.Dialog.setVisible(Unknown Source)
	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.AbstractButton.fireActionPerformed(Unknown Source)
	at java.desktop/javax.swing.AbstractButton$Handler.actionPerformed(Unknown Source)
	at java.desktop/javax.swing.DefaultButtonModel.fireActionPerformed(Unknown Source)
	at java.desktop/javax.swing.DefaultButtonModel.setPressed(Unknown Source)
	at java.desktop/javax.swing.AbstractButton.doClick(Unknown Source)
	at java.desktop/javax.swing.plaf.basic.BasicMenuItemUI.doClick(Unknown Source)
	at java.desktop/javax.swing.plaf.basic.BasicMenuItemUI$Handler.mouseReleased(Unknown Source)
	at java.desktop/java.awt.AWTEventMulticaster.mouseReleased(Unknown Source)
	at java.desktop/java.awt.Component.processMouseEvent(Unknown Source)
	at java.desktop/javax.swing.JComponent.processMouseEvent(Unknown Source)
	at java.desktop/java.awt.Component.processEvent(Unknown Source)
	at java.desktop/java.awt.Container.processEvent(Unknown Source)
	at java.desktop/java.awt.Component.dispatchEventImpl(Unknown Source)
	at java.desktop/java.awt.Container.dispatchEventImpl(Unknown Source)
	at java.desktop/java.awt.Component.dispatchEvent(Unknown Source)
	at java.desktop/java.awt.LightweightDispatcher.retargetMouseEvent(Unknown Source)
	at java.desktop/java.awt.LightweightDispatcher.processMouseEvent(Unknown Source)
	at java.desktop/java.awt.LightweightDispatcher.dispatchEvent(Unknown Source)
	at java.desktop/java.awt.Container.dispatchEventImpl(Unknown Source)
	at java.desktop/java.awt.Window.dispatchEventImpl(Unknown Source)
	at java.desktop/java.awt.Component.dispatchEvent(Unknown Source)
	at java.desktop/java.awt.EventQueue.dispatchEventImpl(Unknown Source)
	at java.desktop/java.awt.EventQueue$4.run(Unknown Source)
	at java.desktop/java.awt.EventQueue$4.run(Unknown Source)
	at java.base/java.security.AccessController.doPrivileged(Unknown Source)
	at java.base/java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(Unknown Source)
	at java.base/java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(Unknown Source)
	at java.desktop/java.awt.EventQueue$5.run(Unknown Source)
	at java.desktop/java.awt.EventQueue$5.run(Unknown Source)
	at java.base/java.security.AccessController.doPrivileged(Unknown Source)
	at java.base/java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(Unknown Source)
	at java.desktop/java.awt.EventQueue.dispatchEvent(Unknown Source)
	at java.desktop/java.awt.EventDispatchThread.pumpOneEventForFilters(Unknown Source)
	at java.desktop/java.awt.EventDispatchThread.pumpEventsForFilter(Unknown Source)
	at java.desktop/java.awt.EventDispatchThread.pumpEventsForHierarchy(Unknown Source)
	at java.desktop/java.awt.EventDispatchThread.pumpEvents(Unknown Source)
	at java.desktop/java.awt.EventDispatchThread.pumpEvents(Unknown Source)
	at java.desktop/java.awt.EventDispatchThread.run(Unknown Source)

comment:2 by GerdP, 3 months ago

You can try to rename the cached file JOSM/cache/mirror_https___josm.openstreetmap.de_maps
If that solves the problem this was a temporary bad version.

Last edited 3 months ago by GerdP (previous) (diff)

comment:3 by skyper, 3 months ago

Ticket #23487 has been marked as a duplicate of this ticket.

comment:4 by skyper, 3 months ago

Component: CoreCore imagery

comment:5 by GerdP, 3 months ago

I can reproduce the crash when I try to enter 'e' in the search field for the available default entries. Also when I scroll up or down in the list without any search argument. So there must be one or more entries which cause trouble. A#23486 mentions ES GRAFCAN ORTOEXPRESS
so I guess that could be the culprit. As far as I know this has to be fixed in the wiki, but JOSM should be made more robust as well.

comment:6 by GerdP, 3 months ago

Could this change be the reason?
https://josm.openstreetmap.de/wiki/Maps/Switzerland?action=diff&version=331
It removed a <type> entry and I think that causes the crash.

Last edited 3 months ago by GerdP (previous) (diff)

comment:7 by GerdP, 3 months ago

I've added the entry again with
https://josm.openstreetmap.de/wiki/Maps/Switzerland?action=diff&version=332
and this fixes the problem.
Users have to "Update the default entries"

comment:8 by anonymous, 3 months ago

Does anyone have a solution to this issue with step by step instructions? I'm using linux.

comment:9 by GerdP, 3 months ago

If the problem still exists:

  1. Start JOSM, open Help|About and the tab "Installation details". This shows you the location of the JOSM cache directory. Click on the button to the right to open the directory.
  2. Search the file mirror_https___josm.openstreetmap.de_maps and rename or delete it. Its size is about 9.5 MB.
  3. go back to JOSM
  4. open Imagery preferences and click on the refresh source:trunk/resources/images/dialogs/refresh.svg button to download the latest version of the file

(Maybe only the last step is needed)

Last edited 3 months ago by GerdP (previous) (diff)

comment:10 by GerdP, 3 months ago

Ticket #23491 has been marked as a duplicate of this ticket.

comment:11 by GerdP, 3 months ago

Cc: taylor.smock added

Possible simply patch to skip the invalid(?) entry:

  • src/org/openstreetmap/josm/io/imagery/ImageryReader.java

     
    351351                    entry.setCustomHttpHeaders(customHttpHeaders);
    352352                    customHttpHeaders = null;
    353353
    354                     if (!skipEntry) {
     354                    if (!skipEntry && entry.getSourceType() != null) {
    355355                        entries.add(entry);
    356356                    }
    357357                    entry = null;

Or maybe the default type "wms" should be used if none is given?

Last edited 3 months ago by GerdP (previous) (diff)

comment:12 by GerdP, 3 months ago

Ticket #23493 has been marked as a duplicate of this ticket.

in reply to:  11 comment:13 by taylor.smock, 3 months ago

Replying to GerdP:

Possible simply patch to skip the invalid(?) entry:
[...]
Or maybe the default type "wms" should be used if none is given?

Skipping the invalid entry is probably a good idea. We'd probably want to report that somehow though so it can be fixed.
I don't think we want to try and guess what the wiki editor was trying to do.

comment:14 by GerdP, 3 months ago

We'd probably want to report that somehow though so it can be fixed.

I also thought so but didn't find any code for similar problems which set skipEntry to true.

comment:15 by taylor.smock, 3 months ago

I think

  • core/src/org/openstreetmap/josm/data/imagery/ImageryLayerInfo.java

    diff --git a/core/src/org/openstreetmap/josm/data/imagery/ImageryLayerInfo.java b/core/src/org/openstreetmap/josm/data/imagery/ImageryLayerInfo.java
    a b  
    166166                reader = new ImageryReader(source);
    167167                reader.setFastFail(fastFail);
    168168                Collection<ImageryInfo> result = reader.parse();
     169                // See #23485 (remove invalid source entries)
     170                result.removeIf(info -> info.getSourceType() == null);
    169171                newLayers.addAll(result);
    170172            } catch (IOException ex) {
    171173                loadError = true;
  • core/scripts/SyncEditorLayerIndex.java

    diff --git a/core/scripts/SyncEditorLayerIndex.java b/core/scripts/SyncEditorLayerIndex.java
    a b  
    499499        }
    500500
    501501        for (ImageryInfo e : josmEntries) {
     502            if (e.getSourceType() == null) {
     503                myprintln("~~~ JOSM-Entry without type: " + getDescription(e));
     504            }
    502505            if (isBlank(getUrl(e))) {
    503506                myprintln("~~~ JOSM-Entry without URL: " + getDescription(e));
    504507                continue;

would be better. This would keep SyncEditorLayerIndex working, and it would hopefully catch the missing type and report it.

comment:16 by GerdP, 3 months ago

Yes, looks better.

comment:17 by GerdP, 3 months ago

Ticket #23494 has been marked as a duplicate of this ticket.

comment:18 by taylor.smock, 3 months ago

Cc: stoecker added

@stoecker: Are we still running validation checks on edits to the backgrounds? Or did that get broken by the Trac 1.2 -> 1.6 upgrade?

comment:19 by stoecker, 3 months ago

Yes. Try entering invalid XML and it will show you an error. Thought that only validates against the XSD. The checks in the sync script are optional and don't prevent a submission. Thought a missing "type" probably should have been caught by the XSD checks...

comment:20 by taylor.smock, 3 months ago

Thought a missing "type" probably should have been caught by the XSD checks

I thought so too. I just checked with xmllint --schema resources/data/maps.xsd maps --noout, and it thought that the xml was valid.

EDIT: The maps file was modified to be invalid.

Last edited 3 months ago by taylor.smock (previous) (diff)

comment:21 by stoecker, 3 months ago

Well, XSD is a magic in itself, so maybe I only think that check is there, but in reality it isn't due to the limitations of XSD. Wouldn't be the first time that happens.

comment:22 by taylor.smock, 3 months ago

It turns out that the problem is from r8048.

                    <xs:sequence>
                        <xs:choice minOccurs="1" maxOccurs="unbounded">
                            [...xml elements...]

The problem is that so long as any valid xml element occurs and no invalid xml elements occur, the xml will be seen as "valid".

I'll check and see if there is a way to avoid the <xs:choice bit while still keeping unbounded as a maxOccurs for the elements. I'm not hopeful.

in reply to:  22 comment:23 by stoecker, 3 months ago

Replying to taylor.smock:

I'm not hopeful.

Don't waste too much time on it. ;-)

comment:24 by taylor.smock, 3 months ago

I saw a reference that XSD 1.1 would fix it, but I think the reference was wrong (see XSD 1.1 Model Groups).

In other words, it looks like the validating XSD is broken. And I don't think it can be fixed without modifying the schema.
Specifically, we would have to move the unbounded elements to subelements.

comment:25 by stoecker, 3 months ago

Jupp. Like before :-) The way we use XML and the way XSD offers don't match, so the XSD can only provide a limited check. That's why we have additional checks. I think the XSD inventors were a little single-minded.

by taylor.smock, 3 months ago

Attachment: 23485.patch added

Check for required elements in ELI SyncEditorLayerIndex since XSD syntax does not allow us to validate the desired XML format

comment:26 by taylor.smock, 3 months ago

Notes on attachment:23485.patch:

  • SyncEditorLayerIndex.java checks to see if ImageryInfo is valid; if not, it prints the missing fields and the standard description.
    • There are some additional changes to make it easier to run the script in a dev environment
  • ImageryInfo has two new methods: isValid and getMissingFields.
  • ImageryLayerInfo now removes any invalid ImageryInfo objects based off of the isValid check.

comment:27 by stoecker, 3 months ago

Are Category and ID really required or only recommended?

comment:28 by taylor.smock, 3 months ago

According to the xsd, yes, they are required (minOccurs="1").

I don't think they are strictly required by our code (to support arbitrary user backgrounds).

comment:29 by stoecker, 3 months ago

If they are required, then there is also a reason for that, even when not neceesary an obvious one ;-)

comment:30 by taylor.smock, 3 months ago

Resolution: fixed
Status: newclosed

In 18989/josm:

Fix #23485: JOSM crashes when opening Imagery Preferences

  • SyncEditorLayerIndex.java now checks to see if imagery entries are valid; if not, it prints the missing fields and the standard description.
  • ImageryInfo now has isValid and getMissingFields; the latter method should only be called in tests or SyncEditorLayerIndex.
  • ImageryLayerInfo removes invalid ImageryInfo objects after parsing the source

comment:31 by taylor.smock, 3 months ago

Milestone: 24.02

comment:32 by taylor.smock, 3 months ago

In 18992/josm:

See #23485/r18989: Fix broken tests

The tests just needed to have a category set.

Modify Ticket

Change Properties
Set your email in Preferences
Action
as closed The owner will remain team.
as The resolution will be set.
The resolution will be deleted. Next status will be 'reopened'.

Add Comment


E-mail address and name can be saved in the Preferences .
 
Note: See TracTickets for help on using tickets.