#23340 closed defect (othersoftware)
NPE: Cannot invoke "java.awt.Image.getWidth(java.awt.image.ImageObserver)" because "retVal" is null
Reported by: | KevinOs | Owned by: | team |
---|---|---|---|
Priority: | normal | Milestone: | |
Component: | Core | Version: | latest |
Keywords: | template_report, windows, javabug | Cc: |
Description
What steps will reproduce the problem?
- working on a map edit attempting to save
- Clicking on save icon, Save or Save As in context menu result in unexpected exception
- Trying to save the session, or save session as also raises the unexpected exception
- new instance also reproduces same result
What is the expected result?
should bring up the save menu allowing saving of the current data layer to a file
What happens instead?
nothing, an unexpected exception is raised, everything else appears to be okay
Please provide any additional information below. Attach a screenshot if possible.
i updated the install to latest java via Web and JOSM yesterday prior to working today and encountering this error. Hope this is a help for someone on the coding team.
Relative:URL: ^/trunk Repository:UUID: 0c6e7542-c601-0410-84e7-c038aed88b3b Last:Changed Date: 2023-12-05 19:02:00 +0100 (Tue, 05 Dec 2023) Revision:18906 Build-Date:2023-12-05 18:34:37 URL:https://josm.openstreetmap.de/svn/trunk Identification: JOSM/1.5 (18906 en) Windows 10 64-Bit OS Build number: Windows 10 Pro N 2009 (19045) Memory Usage: 722 MB / 4068 MB (392 MB allocated, but free) Java version: 21.0.1+12-LTS, Azul Systems, Inc., OpenJDK 64-Bit Server VM Look and Feel: com.sun.java.swing.plaf.windows.WindowsLookAndFeel Screen: \Display0 1920×1080 (scaling 1.00×1.00) \Display1 1680×1050 (scaling 1.00×1.00) Maximum Screen Size: 1920×1080 Best cursor sizes: 16×16→32×32, 32×32→32×32 System property file.encoding: UTF-8 System property sun.jnu.encoding: Cp1252 Locale info: en_US Numbers with default locale: 1234567890 -> 1234567890 VM arguments: [-Dicedtea-web.bin.location=%UserProfile%\AppData\Local\Programs\OpenWebStart\javaws, -Djava.util.Arrays.useLegacyMergeSort=true, --add-exports=jdk.deploy/com.sun.deploy.config=ALL-UNNAMED, --add-opens=java.desktop/javax.swing.text.html=ALL-UNNAMED, --add-reads=java.naming=ALL-UNNAMED,java.desktop, --add-exports=java.base/sun.security.action=ALL-UNNAMED,java.desktop, --add-reads=java.base=ALL-UNNAMED,java.desktop, --add-exports=java.naming/com.sun.jndi.toolkit.url=ALL-UNNAMED,java.desktop, --add-opens=java.base/jdk.internal.loader=ALL-UNNAMED, --add-exports=java.desktop/com.apple.eawt=ALL-UNNAMED, --add-exports=java.desktop/sun.awt=ALL-UNNAMED,java.desktop, --add-opens=java.base/jdk.internal.ref=ALL-UNNAMED, --add-exports=java.base/sun.security.validator=ALL-UNNAMED,java.desktop, --add-exports=java.desktop/com.sun.imageio.plugins.jpeg=ALL-UNNAMED, --add-exports=java.base/sun.net.www.protocol.jar=ALL-UNNAMED,java.desktop, --add-exports=java.base/jdk.internal.util.jar=ALL-UNNAMED,java.desktop, --add-opens=java.prefs/java.util.prefs=ALL-UNNAMED, --add-exports=java.base/com.sun.net.ssl.internal.ssl=ALL-UNNAMED,java.desktop, --add-exports=javafx.graphics/com.sun.javafx.application=ALL-UNNAMED, --add-modules=java.scripting,java.sql,javafx.controls,javafx.media,javafx.swing,javafx.web, --add-exports=java.desktop/sun.awt.X11=ALL-UNNAMED,java.desktop, --add-exports=java.desktop/sun.applet=ALL-UNNAMED,java.desktop,jdk.jsobject, --add-exports=java.base/sun.net.www.protocol.http=ALL-UNNAMED,java.desktop, --add-opens=java.base/java.lang=ALL-UNNAMED, --add-exports=java.base/sun.security.util=ALL-UNNAMED,java.desktop, --add-exports=java.desktop/com.sun.imageio.spi=ALL-UNNAMED, --add-reads=java.desktop=ALL-UNNAMED,java.naming, --add-opens=java.base/java.nio=ALL-UNNAMED, --add-exports=java.base/sun.security.x509=ALL-UNNAMED,java.desktop, --add-opens=java.desktop/javax.imageio.spi=ALL-UNNAMED, --add-exports=java.desktop/javax.jnlp=ALL-UNNAMED,java.desktop, --add-exports=java.base/sun.security.provider=ALL-UNNAMED,java.desktop, -Djava.security.manager=allow] Dataset consistency test: No problems found Plugins: + FastDraw (36126) + HouseNumberTaggingTool (36178) + ImportImagePlugin (36184) + alignways (36178) + apache-commons (36176) + apache-http (36176) + buildings_tools (36178) + ejml (36176) + geotools (36176) + imagery_offset_db (36126) + jackson (36176) + jaxb (36118) + jna (36176) + jts (36004) + opendata (36186) + pmtiles (36156) + reltoolbox (36178) + terracer (36181) + turnlanes (36126) + utilsplugin2 (36178) + wikipedia (605) Tagging presets: + https://josm.openstreetmap.de/josmfile?page=Presets/MtbSingletrack&zip=1 + https://josm.openstreetmap.de/josmfile?page=Presets/Golf_Course&zip=1 + https://josm.openstreetmap.de/josmfile?page=Presets/SkiingTrail&zip=1 Map paint styles: - https://josm.openstreetmap.de/josmfile?page=Styles/Enhanced_Lane_and_Road_Attributes&zip=1 - https://josm.openstreetmap.de/josmfile?page=Styles/Lane_and_Road_Attributes&zip=1 - https://josm.openstreetmap.de/josmfile?page=Styles/Surface&zip=1 - https://josm.openstreetmap.de/josmfile?page=Styles/Maxspeed&zip=1 - https://josm.openstreetmap.de/josmfile?page=Styles/SidewalksPlus&zip=1 - https://josm.openstreetmap.de/josmfile?page=Styles/CyclewaysStylingBNA&zip=1 - https://josm.openstreetmap.de/josmfile?page=Styles/FixmeAndNote&zip=1 - https://josm.openstreetmap.de/josmfile?page=Styles/AddressValidator&zip=1 Last errors/warnings: - 00000.649 W: extended font config - overriding 'filename.Malgun_Gothic=malgun.ttf' with 'MALGUN.TTF' - 00000.651 W: extended font config - overriding 'filename.Myanmar_Text=mmrtext.ttf' with 'MMRTEXT.TTF' - 00000.652 W: extended font config - overriding 'filename.Mongolian_Baiti=monbaiti.ttf' with 'MONBAITI.TTF' - 00005.085 W: Unable to request certificate of https://roottest-g3.pkioverheid.nl - 00005.524 W: Unable to request certificate of https://roottest-g3.pkioverheid.nl - 00010.931 W: Update plugins - You updated your JOSM software. To prevent problems the plugins should be updated as well. Update plugins now? - 79217.302 E: Handled by bug report queue: java.lang.NullPointerException: Cannot invoke "java.awt.Image.getWidth(java.awt.image.ImageObserver)" because "retVal" is null === REPORTED CRASH DATA === BugReportExceptionHandler#handleException: No data collected. Warning issued by: BugReportExceptionHandler#handleException === STACK TRACE === Thread: AWT-EventQueue-1 (60) of JOSM java.lang.NullPointerException: Cannot invoke "java.awt.Image.getWidth(java.awt.image.ImageObserver)" because "retVal" is null at java.desktop/sun.awt.shell.Win32ShellFolder2$MultiResolutionIconImage.getResolutionVariant(Win32ShellFolder2.java:1459) at java.desktop/sun.awt.shell.Win32ShellFolder2$MultiResolutionIconImage.getBaseImage(Win32ShellFolder2.java:1438) at java.desktop/java.awt.image.AbstractMultiResolutionImage.getProperty(AbstractMultiResolutionImage.java:140) at java.desktop/javax.swing.ImageIcon.<init>(ImageIcon.java:255) at java.desktop/javax.swing.ImageIcon.<init>(ImageIcon.java:241) at java.desktop/javax.swing.filechooser.FileSystemView.getSystemIcon(FileSystemView.java:252) at java.desktop/com.sun.java.swing.plaf.windows.WindowsFileChooserUI$WindowsFileView.getIcon(WindowsFileChooserUI.java:1352) at java.desktop/javax.swing.JFileChooser.getIcon(JFileChooser.java:1613) at java.desktop/com.sun.java.swing.plaf.windows.WindowsFileChooserUI$DirectoryComboBoxRenderer.getListCellRendererComponent(WindowsFileChooserUI.java:1047) at java.desktop/javax.swing.plaf.basic.BasicListUI.updateLayoutState(BasicListUI.java:1444) at java.desktop/javax.swing.plaf.basic.BasicListUI.maybeUpdateLayoutState(BasicListUI.java:1394) at java.desktop/javax.swing.plaf.basic.BasicListUI$Handler.valueChanged(BasicListUI.java:2815) at java.desktop/javax.swing.DefaultListSelectionModel.fireValueChanged(DefaultListSelectionModel.java:231) at java.desktop/javax.swing.DefaultListSelectionModel.fireValueChanged(DefaultListSelectionModel.java:206) at java.desktop/javax.swing.DefaultListSelectionModel.fireValueChanged(DefaultListSelectionModel.java:258) at java.desktop/javax.swing.DefaultListSelectionModel.changeSelection(DefaultListSelectionModel.java:459) at java.desktop/javax.swing.DefaultListSelectionModel.changeSelection(DefaultListSelectionModel.java:469) at java.desktop/javax.swing.DefaultListSelectionModel.setSelectionInterval(DefaultListSelectionModel.java:513) at java.desktop/javax.swing.JList.setSelectedIndex(JList.java:2232) at java.desktop/javax.swing.plaf.basic.BasicComboPopup.setListSelection(BasicComboPopup.java:1281) at java.desktop/javax.swing.plaf.basic.BasicComboPopup$Handler.itemStateChanged(BasicComboPopup.java:1097) at java.desktop/javax.swing.JComboBox.fireItemStateChanged(JComboBox.java:1257) at java.desktop/javax.swing.JComboBox.selectedItemChanged(JComboBox.java:1318) at java.desktop/javax.swing.JComboBox.contentsChanged(JComboBox.java:1365) at java.desktop/javax.swing.AbstractListModel.fireContentsChanged(AbstractListModel.java:127) at java.desktop/com.sun.java.swing.plaf.windows.WindowsFileChooserUI$DirectoryComboBoxModel.setSelectedItem(WindowsFileChooserUI.java:1190) at java.desktop/com.sun.java.swing.plaf.windows.WindowsFileChooserUI$DirectoryComboBoxModel.addItem(WindowsFileChooserUI.java:1161) at java.desktop/com.sun.java.swing.plaf.windows.WindowsFileChooserUI.doDirectoryChanged(WindowsFileChooserUI.java:777) at java.desktop/com.sun.java.swing.plaf.windows.WindowsFileChooserUI$11.propertyChange(WindowsFileChooserUI.java:868) at java.desktop/java.beans.PropertyChangeSupport.fire(PropertyChangeSupport.java:343) at java.desktop/java.beans.PropertyChangeSupport.firePropertyChange(PropertyChangeSupport.java:335) at java.desktop/java.beans.PropertyChangeSupport.firePropertyChange(PropertyChangeSupport.java:268) at java.desktop/java.awt.Component.firePropertyChange(Component.java:8717) at java.desktop/javax.swing.JFileChooser.setCurrentDirectory(JFileChooser.java:610) at java.desktop/javax.swing.JFileChooser.<init>(JFileChooser.java:364) at java.desktop/javax.swing.JFileChooser.<init>(JFileChooser.java:340) at org.openstreetmap.josm.gui.widgets.SwingFileChooser.<init>(SwingFileChooser.java:25) at org.openstreetmap.josm.gui.widgets.FileChooserManager.doCreateFileChooser(FileChooserManager.java:311) at org.openstreetmap.josm.gui.widgets.FileChooserManager.openFileChooser(FileChooserManager.java:366) at org.openstreetmap.josm.gui.widgets.FileChooserManager.openFileChooser(FileChooserManager.java:351) at org.openstreetmap.josm.gui.widgets.FileChooserManager.getFileForSave(FileChooserManager.java:395) at org.openstreetmap.josm.gui.layer.OsmDataLayer.createAndOpenSaveFileChooser(OsmDataLayer.java:1270) at org.openstreetmap.josm.actions.SaveAction.getFile(SaveAction.java:138) at org.openstreetmap.josm.actions.SaveActionBase.doSave(SaveActionBase.java:113) at org.openstreetmap.josm.actions.SaveActionBase.doSave(SaveActionBase.java:89) at org.openstreetmap.josm.actions.SaveActionBase.actionPerformed(SaveActionBase.java:69) 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.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 (0)
Change History (30)
follow-up: 8 comment:1 by , 11 months ago
Keywords: | windows javabug added |
---|---|
Resolution: | → othersoftware |
Status: | new → closed |
Summary: | Attempting to Save data or session results in unexpected exception → NPE: Cannot invoke "java.awt.Image.getWidth(java.awt.image.ImageObserver)" because "retVal" is null |
comment:8 by , 9 months ago
Replying to taylor.smock:
This is a javabug. See https://bugs.openjdk.org/browse/JDK-8293862 .
The javabug seems to indicate it should be fixed in Java 21 (which is what you are running). Maybe Azul hasn't picked up that change yet?
Is there a bug tracker for Azul to report it? As the upstream bug was closed a year ago the fix might be incomplete.
comment:13 by , 6 months ago
It looks like there are a variety of similar problems. See JDK-8293862 (look towards the bottom, 2023-01-16).
I think this may be fixed in Java 22. I may look into using Java 22 for the Windows installers.
For those running into this issue, do things work properly if you install one of the Java 22 versions from the GH latest release page?
comment:14 by , 6 months ago
There was a regression of JDK-8293862, see JDK-8320692 which was just back-ported a few days ago. So 17.0.13-oracle
, 21.0.5-oracle
and 22.0.2
should be fine.
comment:19 by , 5 months ago
I do not know how fast Azul is updating but it would be nice if the Windows installer would include 21.0.4 b5
or higher, see also #23618.
Edit:
Copied from 23618#comment:18:
Replying to taylor.smock:
Upstream ticket: JDK-8325924
The bug has been fixed as a duplicate of JDK-8325203 and it has been fixed upstream.
22.0.1 was released on 2024-04-16.
17.0.12 and 21.0.4 are planned for 2024-07-16.
This is a javabug. See https://bugs.openjdk.org/browse/JDK-8293862 .
The javabug seems to indicate it should be fixed in Java 21 (which is what you are running). Maybe Azul hasn't picked up that change yet?
FTR: All we do is call
new JFileChooser(file)
.