-
Bug
-
Resolution: Cannot Reproduce
-
P3
-
1.4.0
-
x86
-
windows_2000
Name: sv35042 Date: 10/18/2002
FULL PRODUCT VERSION :
java version "1.4.0"
Java(TM) 2 Runtime Environment, Standard Edition (build 1.4.0-b92)
Java HotSpot(TM) Client VM (build 1.4.0-b92, mixed mode)
FULL OPERATING SYSTEM VERSION :
Microsoft Windows 2000 [Version 5.00.2195]
A DESCRIPTION OF THE PROBLEM :
A bug was logged by someone else under: 4710880. But they
did not provide the symptoms that the following stack trace
occurs under the bug was logged under a different
functionality group and was closed with a
comment "Hopefully will be fixed in 1.4.1" When the
following key in the windows registry is set to a network
path and the machine is disconnected from the network the
Null Ptr occurs.
HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersionExplorer\User Shell Folders\Personal
If the machine is connected to the network then Null Ptr
doesn't occur.
The key maps the location of "My Documents" to the path
specified. In my case it is Z:\ (in typical installations
it is a local drive such as C:\My Documents so the error
does not occur)
Below is just an example (The application can be downloaded
at http://developer.openwave.com/download/wappush.html). I
have had it crash in other java applications aswell.
at java.io.File.<init>(File.java:180)
at sun.awt.shell.Win32ShellFolder.listFiles
(Win32ShellFolder.java:517)
at sun.awt.shell.Win32ShellFolderManager.get
(Win32ShellFolderManager.java:152)
at sun.awt.shell.ShellFolder.get
(ShellFolder.java:208)
at
com.sun.java.swing.plaf.windows.WindowsFileChooserUI.install
Components(WindowsFileChooserUI.java:3
at
javax.swing.plaf.basic.BasicFileChooserUI.installUI
(BasicFileChooserUI.java:130)
at
com.sun.java.swing.plaf.windows.WindowsFileChooserUI.install
UI(WindowsFileChooserUI.java:175)
at javax.swing.JComponent.setUI(JComponent.java:445)
at javax.swing.JFileChooser.updateUI
(JFileChooser.java:1701)
at javax.swing.JFileChooser.setup
(JFileChooser.java:345)
at javax.swing.JFileChooser.<init>
(JFileChooser.java:320)
at javax.swing.JFileChooser.<init>
(JFileChooser.java:273)
at PushIT.FileHandler.setupFileHandler
(FileHandler.java:97)
at PushIT.FileHandler.<init>(FileHandler.java:83)
at PushIT.ClientCertificatePnl.initComponents
(ClientCertificatePnl.java:130)
at PushIT.ClientCertificatePnl.<init>
(ClientCertificatePnl.java:42)
at PushIT.OptionsDlg.setupConnectionTab
(OptionsDlg.java:184)
at PushIT.OptionsDlg.setupTabbedPane
(OptionsDlg.java:255)
at PushIT.OptionsDlg.initComponents
(OptionsDlg.java:155)
at PushIT.OptionsDlg.<init>(OptionsDlg.java:116)
at PushIT.MainMenu.<init>(MainMenu.java:168)
at PushIT.PushIT.main(PushIT.java:916)
at PushInitTool.main(PushInitTool.java:29)
REGRESSION. Last worked in version 1.4
STEPS TO FOLLOW TO REPRODUCE THE PROBLEM :
1. Map "My Documents" to a network path
2. Create a JFileChooser
3. Run App with JFileChooser
4. NPE occurs
EXPECTED VERSUS ACTUAL BEHAVIOR :
No Null Ptr should occur.
ERROR MESSAGES/STACK TRACES THAT OCCUR :
at java.io.File.<init>(File.java:180)
at sun.awt.shell.Win32ShellFolder.listFiles(Win32ShellFolder.java:517)
at sun.awt.shell.Win32ShellFolderManager.get
(Win32ShellFolderManager.java:152)
at sun.awt.shell.ShellFolder.get(ShellFolder.java:208)
at
com.sun.java.swing.plaf.windows.WindowsFileChooserUI.installComponents
(WindowsFileChooserUI.java:3
at javax.swing.plaf.basic.BasicFileChooserUI.installUI
(BasicFileChooserUI.java:130)
at com.sun.java.swing.plaf.windows.WindowsFileChooserUI.installUI
(WindowsFileChooserUI.java:175)
at javax.swing.JComponent.setUI(JComponent.java:445)
at javax.swing.JFileChooser.updateUI(JFileChooser.java:1701)
at javax.swing.JFileChooser.setup(JFileChooser.java:345)
at javax.swing.JFileChooser.<init>(JFileChooser.java:320)
at javax.swing.JFileChooser.<init>(JFileChooser.java:273)
at PushIT.FileHandler.setupFileHandler(FileHandler.java:97)
at PushIT.FileHandler.<init>(FileHandler.java:83)
at PushIT.ClientCertificatePnl.initComponents
(ClientCertificatePnl.java:130)
at PushIT.ClientCertificatePnl.<init>(ClientCertificatePnl.java:42)
at PushIT.OptionsDlg.setupConnectionTab(OptionsDlg.java:184)
at PushIT.OptionsDlg.setupTabbedPane(OptionsDlg.java:255)
at PushIT.OptionsDlg.initComponents(OptionsDlg.java:155)
at PushIT.OptionsDlg.<init>(OptionsDlg.java:116)
at PushIT.MainMenu.<init>(MainMenu.java:168)
at PushIT.PushIT.main(PushIT.java:916)
at PushInitTool.main(PushInitTool.java:29)
REPRODUCIBILITY :
This bug can be reproduced always.
---------- BEGIN SOURCE ----------
Create a JFileChooser
---------- END SOURCE ----------
CUSTOMER WORKAROUND :
Connect to the network or change the registry key to not be
a network path before running the application.
(Review ID: 159834)
======================================================================
- relates to
-
JDK-6611987 A strange behaviour when selected folder doesn't exist
-
- Closed
-