JDK-8293862 : javax/swing/JFileChooser/8046391/bug8046391.java failed with 'Cannot invoke "java.awt.Image.getWidth(java.awt.image.ImageObserver)" because "retVal" is null'
  • Type: Bug
  • Component: client-libs
  • Sub-Component: javax.swing
  • Affected Version: 20
  • Priority: P4
  • Status: Resolved
  • Resolution: Fixed
  • OS: windows
  • CPU: x86_64
  • Submitted: 2022-09-15
  • Updated: 2024-08-09
  • Resolved: 2023-01-19
The Version table provides details related to the release that this issue/RFE will be addressed.

Unresolved : Release in which this issue/RFE will be addressed.
Resolved: Release in which this issue/RFE has been resolved.
Fixed : Release in which this issue/RFE has been fixed. The release containing this fix may be available for download as an Early Access Release or a General Availability Release.

To download the current JDK release, click here.
JDK 17 JDK 21
17.0.13-oracleFixed 21 b07Fixed
Related Reports
Duplicate :  
Relates :  
Relates :  
Relates :  
Relates :  
Relates :  
Relates :  
Sub Tasks
JDK-8297529 :  
JDK-8298402 :  
Description
The following test failed in the JDK20 CI:

javax/swing/JFileChooser/8046391/bug8046391.java

Here's a snippet from the log file:

----------System.out:(1/26)----------
Creating JFileChooser...
----------System.err:(65/5775)----------
java.lang.reflect.InvocationTargetException
	at java.desktop/java.awt.EventQueue.invokeAndWait(EventQueue.java:1371)
	at java.desktop/java.awt.EventQueue.invokeAndWait(EventQueue.java:1346)
	at java.desktop/javax.swing.SwingUtilities.invokeAndWait(SwingUtilities.java:1480)
	at bug8046391.main(bug8046391.java:52)
	at java.base/jdk.internal.reflect.DirectMethodHandleAccessor.invoke(DirectMethodHandleAccessor.java:104)
	at java.base/java.lang.reflect.Method.invoke(Method.java:578)
	at com.sun.javatest.regtest.agent.MainWrapper$MainThread.run(MainWrapper.java:125)
	at java.base/java.lang.Thread.run(Thread.java:1589)
Caused by: 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:1440)
	at java.desktop/sun.awt.shell.Win32ShellFolder2$MultiResolutionIconImage.getBaseImage(Win32ShellFolder2.java:1419)
	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:229)
	at java.desktop/javax.swing.DefaultListSelectionModel.fireValueChanged(DefaultListSelectionModel.java:204)
	at java.desktop/javax.swing.DefaultListSelectionModel.fireValueChanged(DefaultListSelectionModel.java:256)
	at java.desktop/javax.swing.DefaultListSelectionModel.changeSelection(DefaultListSelectionModel.java:453)
	at java.desktop/javax.swing.DefaultListSelectionModel.changeSelection(DefaultListSelectionModel.java:463)
	at java.desktop/javax.swing.DefaultListSelectionModel.setSelectionInterval(DefaultListSelectionModel.java:507)
	at java.desktop/javax.swing.JList.setSelectedIndex(JList.java:2232)
	at java.desktop/javax.swing.plaf.basic.BasicComboPopup.setListSelection(BasicComboPopup.java:1273)
	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:8716)
	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:310)
	at bug8046391.lambda$main$0(bug8046391.java:59)
	at java.desktop/java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:308)
	at java.desktop/java.awt.EventQueue.dispatchEventImpl(EventQueue.java:773)
	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.desktop/java.awt.EventQueue.dispatchEvent(EventQueue.java:742)
	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)

JavaTest Message: Test threw exception: java.lang.reflect.InvocationTargetException
JavaTest Message: shutting down test

STATUS:Failed.`main' threw exception: java.lang.reflect.InvocationTargetException
----------rerun:(41/5073)*----------
Comments
A pull request was submitted for review. Branch: master URL: https://git.openjdk.org/jdk17u-dev/pull/2570 Date: 2024-06-12 06:03:03 +0000
08-08-2024

[jdk17u-fix-request] Approval Request from Amos "Backporting for parity with 17.0.13-oracle. Clean backport. Test passes on 2024-06-27”
27-06-2024

Root cause: The icon extraction code compares the returned handle to zero: if (hIcon <= 0). On 64-bit systems, a valid handle can be negative. For example: getIcon : Desktop 16(16) GetIconLocation(uFlags=0x22, flags=0x4, index=-110) SUCCESS - szBuf=C:\Windows\system32\imageres.dll Extract - hres: 0, hIcon=0000000019B200F9, hIconSmall=FFFFFFFFF98C00EB, size=16(0x100020) SUCCEEDED !!! hIcon(0xfffffffff98c00eb) <= 0 : Desktop 16(16) The icon was extracted successfully but its handle was interpreted as an error. The same problem exists in the fallback code. Then when fallback code is executed, another problem occurs: GetIconLocation(uFlags=0x40, flags=0x1a3, index=-675088752) SUCCESS - szBuf= Extract - hres: 80004005, hIcon=0000000000000000, hIconSmall=000001A3D7C2F83A, size=16(100020) NOT SUCCEEDED hIcon = 0x1a3d7c2f83a : Desktop 16(16) The error code 0x80004005 is E_FAIL. Since the icon handle is seemingly valid, it continues to extracting the icon bits: native getIconBits - fn_GetIconInfo returned false Error code: 0x57a - Invalid cursor handle. makeIcon: iconBits = null It's not a surprise. After all, the Extract method returned an error, which means neither icon handle is valid. In the end, the MultiResolutionIcon contains null: 16 -> null 32 -> BufferedImage@59e735d 24 -> BufferedImage@60b2faf0 This problem has existed since JDK-8182043, yet it went unnoticed because getResolutionVariant just returned a null. However, after JDK-8282526 was integrated, the result is used, which results in NullPointerException. The fix: Handle the errors. Add assert statements to MultiResolutionIconImage for null-checks.
15-02-2023

Changeset: 2e4a3c47 Author: Alexey Ivanov <aivanov@openjdk.org> Date: 2023-01-19 13:00:09 +0000 URL: https://git.openjdk.org/jdk/commit/2e4a3c47e262f91a7f881d9d990eb81a929d1627
19-01-2023

A pull request was submitted for review. URL: https://git.openjdk.org/jdk/pull/12010 Date: 2023-01-16 14:19:52 +0000
16-01-2023

PR is against mainline, hence targeted to 21
03-01-2023

Moved here from JDK-8227257: dcubed Daniel Daugherty added a comment - 2022-10-27 13:40 Here's a log file snippet for the jdk-20+21-1547-tier3 sighting: javax/swing/JFileChooser/4847375/bug4847375.java #section:main ----------messages:(7/429)---------- command: main bug4847375 reason: Assumed action based on file name: run main bug4847375 started: Thu Oct 27 16:54:14 UTC 2022 Mode: othervm Additional options from @modules: --add-modules java.desktop --add-exports java.desktop/sun.awt=ALL-UNNAMED --add-exports java.desktop/sun.awt.shell=ALL-UNNAMED --add-opens java.desktop/sun.awt.shell=ALL-UNNAMED finished: Thu Oct 27 16:54:16 UTC 2022 elapsed time (seconds): 1.427 ----------configuration:(6/223)---------- Boot Layer add modules: java.desktop add exports: java.desktop/sun.awt ALL-UNNAMED java.desktop/sun.awt.shell ALL-UNNAMED add opens: java.desktop/sun.awt.shell ALL-UNNAMED ----------System.out:(0/0)---------- ----------System.err:(66/5810)---------- java.lang.reflect.InvocationTargetException at java.desktop/java.awt.EventQueue.invokeAndWait(EventQueue.java:1371) at java.desktop/java.awt.EventQueue.invokeAndWait(EventQueue.java:1346) at java.desktop/javax.swing.SwingUtilities.invokeAndWait(SwingUtilities.java:1480) at bug4847375.main(bug4847375.java:53) at java.base/jdk.internal.reflect.DirectMethodHandleAccessor.invoke(DirectMethodHandleAccessor.java:104) at java.base/java.lang.reflect.Method.invoke(Method.java:578) at com.sun.javatest.regtest.agent.MainWrapper$MainThread.run(MainWrapper.java:125) at java.base/java.lang.Thread.run(Thread.java:1591) Caused by: 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:1440) at java.desktop/sun.awt.shell.Win32ShellFolder2$MultiResolutionIconImage.getBaseImage(Win32ShellFolder2.java:1419) 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:229) at java.desktop/javax.swing.DefaultListSelectionModel.fireValueChanged(DefaultListSelectionModel.java:204) at java.desktop/javax.swing.DefaultListSelectionModel.fireValueChanged(DefaultListSelectionModel.java:256) at java.desktop/javax.swing.DefaultListSelectionModel.changeSelection(DefaultListSelectionModel.java:453) at java.desktop/javax.swing.DefaultListSelectionModel.changeSelection(DefaultListSelectionModel.java:463) at java.desktop/javax.swing.DefaultListSelectionModel.setSelectionInterval(DefaultListSelectionModel.java:507) at java.desktop/javax.swing.JList.setSelectedIndex(JList.java:2232) at java.desktop/javax.swing.plaf.basic.BasicComboPopup.setListSelection(BasicComboPopup.java:1273) 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:8716) 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:310) at bug4847375.<init>(bug4847375.java:79) at bug4847375$1.run(bug4847375.java:55) at java.desktop/java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:308) at java.desktop/java.awt.EventQueue.dispatchEventImpl(EventQueue.java:773) 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.desktop/java.awt.EventQueue.dispatchEvent(EventQueue.java:742) 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) JavaTest Message: Test threw exception: java.lang.reflect.InvocationTargetException JavaTest Message: shutting down test STATUS:Failed.`main' threw exception: java.lang.reflect.InvocationTargetException ----------rerun:(43/4796)*----------
08-12-2022

Moved here from JDK-8227257: dcubed Daniel Daugherty added a comment - 2022-10-19 09:18 Here's a log file snippet from the jdk-20+20-1456-tier3 sighting: javax/swing/JFileChooser/4847375/bug4847375.java ----------System.err:(66/5810)---------- java.lang.reflect.InvocationTargetException at java.desktop/java.awt.EventQueue.invokeAndWait(EventQueue.java:1371) at java.desktop/java.awt.EventQueue.invokeAndWait(EventQueue.java:1346) at java.desktop/javax.swing.SwingUtilities.invokeAndWait(SwingUtilities.java:1480) at bug4847375.main(bug4847375.java:53) at java.base/jdk.internal.reflect.DirectMethodHandleAccessor.invoke(DirectMethodHandleAccessor.java:104) at java.base/java.lang.reflect.Method.invoke(Method.java:578) at com.sun.javatest.regtest.agent.MainWrapper$MainThread.run(MainWrapper.java:125) at java.base/java.lang.Thread.run(Thread.java:1591) Caused by: 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:1440) at java.desktop/sun.awt.shell.Win32ShellFolder2$MultiResolutionIconImage.getBaseImage(Win32ShellFolder2.java:1419) 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:229) at java.desktop/javax.swing.DefaultListSelectionModel.fireValueChanged(DefaultListSelectionModel.java:204) at java.desktop/javax.swing.DefaultListSelectionModel.fireValueChanged(DefaultListSelectionModel.java:256) at java.desktop/javax.swing.DefaultListSelectionModel.changeSelection(DefaultListSelectionModel.java:453) at java.desktop/javax.swing.DefaultListSelectionModel.changeSelection(DefaultListSelectionModel.java:463) at java.desktop/javax.swing.DefaultListSelectionModel.setSelectionInterval(DefaultListSelectionModel.java:507) at java.desktop/javax.swing.JList.setSelectedIndex(JList.java:2232) at java.desktop/javax.swing.plaf.basic.BasicComboPopup.setListSelection(BasicComboPopup.java:1273) 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:8716) 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:310) at bug4847375.<init>(bug4847375.java:79) at bug4847375$1.run(bug4847375.java:55) at java.desktop/java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:308) at java.desktop/java.awt.EventQueue.dispatchEventImpl(EventQueue.java:773) 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.desktop/java.awt.EventQueue.dispatchEvent(EventQueue.java:742) 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) JavaTest Message: Test threw exception: java.lang.reflect.InvocationTargetException JavaTest Message: shutting down test STATUS:Failed.`main' threw exception: java.lang.reflect.InvocationTargetException ----------rerun:(43/4796)*---------- The "caused by" portion is different for this failure (and most of the recent failures that are linked to this bug): Caused by: java.lang.NullPointerException: Cannot invoke "java.awt.Image.getWidth(java.awt.image.ImageObserver)" because "retVal" is null The original "caused by" is: Caused by: java.lang.AssertionError
08-12-2022

This error also occurs when running test/jdk/javax/swing/JFileChooser/4847375/bug4847375.java ----------System.err:(66/5810)---------- java.lang.reflect.InvocationTargetException at java.desktop/java.awt.EventQueue.invokeAndWait(EventQueue.java:1371) at java.desktop/java.awt.EventQueue.invokeAndWait(EventQueue.java:1346) at java.desktop/javax.swing.SwingUtilities.invokeAndWait(SwingUtilities.java:1480) at bug4847375.main(bug4847375.java:53) at java.base/jdk.internal.reflect.DirectMethodHandleAccessor.invoke(DirectMethodHandleAccessor.java:104) at java.base/java.lang.reflect.Method.invoke(Method.java:578) at com.sun.javatest.regtest.agent.MainWrapper$MainThread.run(MainWrapper.java:125) at java.base/java.lang.Thread.run(Thread.java:1591) Caused by: 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:1440) at java.desktop/sun.awt.shell.Win32ShellFolder2$MultiResolutionIconImage.getBaseImage(Win32ShellFolder2.java:1419) 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:229) at java.desktop/javax.swing.DefaultListSelectionModel.fireValueChanged(DefaultListSelectionModel.java:204) at java.desktop/javax.swing.DefaultListSelectionModel.fireValueChanged(DefaultListSelectionModel.java:256) at java.desktop/javax.swing.DefaultListSelectionModel.changeSelection(DefaultListSelectionModel.java:453) at java.desktop/javax.swing.DefaultListSelectionModel.changeSelection(DefaultListSelectionModel.java:463) at java.desktop/javax.swing.DefaultListSelectionModel.setSelectionInterval(DefaultListSelectionModel.java:507) at java.desktop/javax.swing.JList.setSelectedIndex(JList.java:2232) at java.desktop/javax.swing.plaf.basic.BasicComboPopup.setListSelection(BasicComboPopup.java:1273) 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:8716) 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:310) at bug4847375.<init>(bug4847375.java:79) at bug4847375$1.run(bug4847375.java:55) at java.desktop/java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:308) at java.desktop/java.awt.EventQueue.dispatchEventImpl(EventQueue.java:773) 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.desktop/java.awt.EventQueue.dispatchEvent(EventQueue.java:742) 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) JavaTest Message: Test threw exception: java.lang.reflect.InvocationTargetException JavaTest Message: shutting down test STATUS:Failed.`main' threw exception: java.lang.reflect.InvocationTargetException --------------------- When this bug is fixed, the bugid should also be added to bug4847375.java.
21-11-2022

A pull request was submitted for review. URL: https://git.openjdk.org/jdk/pull/11104 Date: 2022-11-11 08:18:19 +0000
11-11-2022