universal-pokemon-randomizer-zx icon indicating copy to clipboard operation
universal-pokemon-randomizer-zx copied to clipboard

[Bug] Launcher not starting program

Open SpudsTheCyan opened this issue 11 months ago • 1 comments

Describe the bug Launching the Windows launcher causes the following error:

Exception in thread "AWT-EventQueue-0" 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:310)
        at com.dabomstew.pkrandom.newgui.NewRandomizerGUI.<init>(NewRandomizerGUI.java:323)
        at com.dabomstew.pkrandom.newgui.NewRandomizerGUI.lambda$main$117(NewRandomizerGUI.java:4005)
        at java.desktop/java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:318)
        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)

To Reproduce Steps to reproduce the behavior:

  1. Launch "launcher_WINDOWS.bat"
  2. See error

Expected behavior Randomizer program should launch.

System (please complete the following information):

  • Operating System: Windows 11
  • Java Version: "21" 2023-09-19 LTS
  • Randomizer Version: 4.6.0

SpudsTheCyan avatar Mar 04 '24 21:03 SpudsTheCyan

Interestingly, this seems to be a bug in the JVM. I can reproduce this with just 3 lines of Java code.

Siebje avatar Mar 26 '24 16:03 Siebje