Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-6449933

Vista:FileChooserDemo throws an exception when trying to open it in Windows L&F

    XMLWordPrintable

Details

    • b96
    • x86
    • windows_2008, windows_vista
    • Verified

    Backports

      Description

        Vista:FileChooserDemo throws an exception when trying to open it in Windows L&F.
        I was able to reproduce this on mustang b91 and could trace it back to mustang b53.
        On mustang b51 it worked fine.
        This appears on Vista b5456 Ultimate 32bit, which is the latest build we have.
        I could not reproduce this on Vista b5365 64bit and Vista b5384 32bit.

        Steps to reproduce:

        Run the FileChooserDemo and switch to Windows L&F.
        OR
        Run the FileChooserDemo with L&F set to Windows L&F as below:
        java -Dswing.defaultlaf=com.sun.java.swing.plaf.windows.WindowsLookAndFeel -jar FileChooserDemo.jar

        The following stacktrace is produced.
        ------
        ------
        z:\disk09\jdk\1.6.0\b90\binaries\win>bin\java -showversion -jar demo\jfc\FileChooserDemo\FileChooserDemo.jar
        java version "1.6.0-rc"
        Java(TM) SE Runtime Environment (build 1.6.0-rc-b90)
        Java HotSpot(TM) Client VM (build 1.6.0-rc-b90, mixed mode)

        Exception in thread "AWT-EventQueue-0" java.lang.ArrayIndexOutOfBoundsException: 3184
                at sun.awt.shell.Win32ShellFolder2.getFileChooserIcon(Win32ShellFolder2.java:797)
                at sun.awt.shell.Win32ShellFolderManager2.get(Win32ShellFolderManager2.java:274)
                at sun.awt.shell.ShellFolder.get(ShellFolder.java:218)
                at com.sun.java.swing.plaf.windows.WindowsLookAndFeel$LazyWindowsIcon.createValue(WindowsLookAndFeel.java:2040)
                at javax.swing.UIDefaults.getFromHashtable(UIDefaults.java:199)
                at javax.swing.UIDefaults.get(UIDefaults.java:144)
                at javax.swing.MultiUIDefaults.get(MultiUIDefaults.java:44)
                at javax.swing.UIDefaults.getIcon(UIDefaults.java:426)
                at javax.swing.UIManager.getIcon(UIManager.java:615)
                at javax.swing.plaf.basic.BasicFileChooserUI.installIcons(BasicFileChooserUI.java:237)
                at javax.swing.plaf.basic.BasicFileChooserUI.installDefaults(BasicFileChooserUI.java:219)
                at javax.swing.plaf.basic.BasicFileChooserUI.installUI(BasicFileChooserUI.java:135)
                at com.sun.java.swing.plaf.windows.WindowsFileChooserUI.installUI(WindowsFileChooserUI.java:127)
                at javax.swing.JComponent.setUI(JComponent.java:648)
                at javax.swing.JFileChooser.updateUI(JFileChooser.java:1756)
                at javax.swing.SwingUtilities.updateComponentTreeUI0(SwingUtilities.java:1206)
                at javax.swing.SwingUtilities.updateComponentTreeUI(SwingUtilities.java:1197)
                at FileChooserDemo$OptionListener.actionPerformed(FileChooserDemo.java:657)
                at javax.swing.JComboBox.fireActionEvent(JComboBox.java:1237)
                at javax.swing.JComboBox.setSelectedItem(JComboBox.java:564)
                at javax.swing.JComboBox.setSelectedIndex(JComboBox.java:600)
                at javax.swing.plaf.basic.BasicComboPopup$Handler.mouseReleased(BasicComboPopup.java:813)
                at java.awt.AWTEventMulticaster.mouseReleased(AWTEventMulticaster.java:232)
                at java.awt.Component.processMouseEvent(Component.java:5999)
                at javax.swing.JComponent.processMouseEvent(JComponent.java:3240)
                at javax.swing.plaf.basic.BasicComboPopup$1.processMouseEvent(BasicComboPopup.java:480)
                at java.awt.Component.processEvent(Component.java:5764)
                at java.awt.Container.processEvent(Container.java:1984)
                at java.awt.Component.dispatchEventImpl(Component.java:4407)
                at java.awt.Container.dispatchEventImpl(Container.java:2042)
                at java.awt.Component.dispatchEvent(Component.java:4237)
                at java.awt.LightweightDispatcher.retargetMouseEvent(Container.java:4248)
                at java.awt.LightweightDispatcher.processMouseEvent(Container.java:3912)
                at java.awt.LightweightDispatcher.dispatchEvent(Container.java:3842)
                at java.awt.Container.dispatchEventImpl(Container.java:2028)
                at java.awt.Window.dispatchEventImpl(Window.java:2411)
                at java.awt.Component.dispatchEvent(Component.java:4237)
                at java.awt.EventQueue.dispatchEvent(EventQueue.java:600)
                at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:273)
                at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:183)
                at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:173)
                at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:168)
                at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:160)
                at java.awt.EventDispatchThread.run(EventDispatchThread.java:121)
        ------
        ------

        Attachments

          Issue Links

            Activity

              People

                loneid Leonid Popov (Inactive)
                smandalisunw Srinivas Mandalika (Inactive)
                Votes:
                0 Vote for this issue
                Watchers:
                1 Start watching this issue

                Dates

                  Created:
                  Updated:
                  Resolved:
                  Imported:
                  Indexed: