#3190 closed defect (invalid)
Unexpected Exception when I try to load a local gpx file
Reported by: | IrlJidel | Owned by: | team |
---|---|---|---|
Priority: | major | Milestone: | |
Component: | Core | Version: | latest |
Keywords: | gpx Uncaught Exception File Open | Cc: | hamish.mead@… |
Description
I get an Unexpected Exception when I try to load a local gpx file
To reproduce, go to File/Open and load a local gpx file
Path: trunk
URL: http://josm.openstreetmap.de/svn/trunk
Repository Root: http://josm.openstreetmap.de/svn
Repository UUID: 0c6e7542-c601-0410-84e7-c038aed88b3b
Revision: 1892
Node Kind: directory
Last Changed Author: Gubaer
Last Changed Rev: 1892
Last Changed Date: 2009-08-03 00:17:45 +0200 (Mon, 03 Aug 2009)
Memory Usage: 20 MB / 694 MB (2 MB allocated, but free)
Java version: 1.6.0_14
Plugins: AgPifoJDirectUploadbuildings_toolsdataimportremotecontrolslippymapusertoolsutilspluginvalidatorwalkingpaperswmsplugin
Plugin AgPifoJ Version: 16603
Plugin DirectUpload Version: 16583
Plugin buildings_tools Version: 20
Plugin dataimport Version: 16382
Plugin remotecontrol Version: 16624
Plugin slippymap Version: 16733
Plugin usertools Version: 14125
Plugin utilsplugin Version: 16735
Plugin validator Version: 16735
Plugin walkingpapers Version: 16571
Plugin wmsplugin Version: 16599
java.lang.NullPointerException
at org.openstreetmap.josm.gui.layer.Layer.setName(Layer.java:172)
at org.openstreetmap.josm.gui.layer.Layer.<init>(Layer.java:97)
at org.openstreetmap.josm.gui.layer.GpxLayer.<init>(GpxLayer.java:83)
at org.openstreetmap.josm.gui.layer.GpxLayer.<init>(GpxLayer.java:95)
at org.openstreetmap.josm.io.GpxImporter.importData(GpxImporter.java:48)
at org.openstreetmap.josm.actions.OpenFileAction.openFile(OpenFileAction.java:53)
at org.openstreetmap.josm.actions.OpenFileAction.actionPerformed(OpenFileAction.java:41)
at javax.swing.AbstractButton.fireActionPerformed(Unknown Source)
at javax.swing.AbstractButton$Handler.actionPerformed(Unknown Source)
at javax.swing.DefaultButtonModel.fireActionPerformed(Unknown Source)
at javax.swing.DefaultButtonModel.setPressed(Unknown Source)
at javax.swing.plaf.basic.BasicButtonListener.mouseReleased(Unknown Source)
at java.awt.AWTEventMulticaster.mouseReleased(Unknown Source)
at java.awt.Component.processMouseEvent(Unknown Source)
at javax.swing.JComponent.processMouseEvent(Unknown Source)
at java.awt.Component.processEvent(Unknown Source)
at java.awt.Container.processEvent(Unknown Source)
at java.awt.Component.dispatchEventImpl(Unknown Source)
at java.awt.Container.dispatchEventImpl(Unknown Source)
at java.awt.Component.dispatchEvent(Unknown Source)
at java.awt.LightweightDispatcher.retargetMouseEvent(Unknown Source)
at java.awt.LightweightDispatcher.processMouseEvent(Unknown Source)
at java.awt.LightweightDispatcher.dispatchEvent(Unknown Source)
at java.awt.Container.dispatchEventImpl(Unknown Source)
at java.awt.Window.dispatchEventImpl(Unknown Source)
at java.awt.Component.dispatchEvent(Unknown Source)
at java.awt.EventQueue.dispatchEvent(Unknown Source)
at java.awt.EventDispatchThread.pumpOneEventForFilters(Unknown Source)
at java.awt.EventDispatchThread.pumpEventsForFilter(Unknown Source)
at java.awt.EventDispatchThread.pumpEventsForHierarchy(Unknown Source)
at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
at java.awt.EventDispatchThread.run(Unknown Source)
Attachments (0)
Change History (7)
comment:1 by , 16 years ago
Resolution: | → fixed |
---|---|
Status: | new → closed |
comment:2 by , 16 years ago
Cc: | added |
---|---|
Keywords: | Uncaught Exception File Open added |
Resolution: | fixed |
Status: | closed → reopened |
Problem still appears to exist in release 1981 (Win EXE file) and also release 2217 (JAR file)
Problem occurred clicking File > Open. (Thereafter the 'Uncaught Exception' box pops up.)
It remains possible to open a GPX file in JOSM by double-clicking on it in Windows Explorer. (Presumably because file association was set during first WIN install of version 1981.)
REPORT FROM RELEASE 1981
Path: trunk
URL: http://josm.openstreetmap.de/svn/trunk
Repository Root: http://josm.openstreetmap.de/svn
Repository UUID: 0c6e7542-c601-0410-84e7-c038aed88b3b
Revision: 1981
Node Kind: directory
Last Changed Author: stoecker
Last Changed Rev: 1981
Last Changed Date: 2009-08-18 15:21:37 +0200 (Tue, 18 Aug 2009)
Memory Usage: 21 MB / 254 MB (2 MB allocated, but free)
Java version: 1.6.0_15
Plugins: AgPifoJopenstreetbugsremotecontrolvalidatorwmsplugin
Plugin AgPifoJ Version: 16941
Plugin openstreetbugs Version: 17035
Plugin remotecontrol Version: 16965
Plugin validator Version: 16970
Plugin wmsplugin Version: 16872
java.lang.RuntimeException: java.io.IOException: Could not get shell folder ID list
at sun.awt.shell.Win32ShellFolderManager2$ComInvoker.invoke(Unknown Source)
at sun.awt.shell.Win32ShellFolder2.getFileSystemPath(Unknown Source)
at sun.awt.shell.Win32ShellFolder2.composePathForCsidl(Unknown Source)
at sun.awt.shell.Win32ShellFolder2.<init>(Unknown Source)
at sun.awt.shell.Win32ShellFolderManager2.get(Unknown Source)
at sun.awt.shell.ShellFolder.get(Unknown Source)
at sun.swing.WindowsPlacesBar.<init>(Unknown Source)
at com.sun.java.swing.plaf.windows.WindowsFileChooserUI.updateUseShellFolder(Unknown Source)
at com.sun.java.swing.plaf.windows.WindowsFileChooserUI.installComponents(Unknown Source)
at javax.swing.plaf.basic.BasicFileChooserUI.installUI(Unknown Source)
at com.sun.java.swing.plaf.windows.WindowsFileChooserUI.installUI(Unknown Source)
at javax.swing.JComponent.setUI(Unknown Source)
at javax.swing.JFileChooser.updateUI(Unknown Source)
at javax.swing.JFileChooser.setup(Unknown Source)
at javax.swing.JFileChooser.<init>(Unknown Source)
at javax.swing.JFileChooser.<init>(Unknown Source)
at org.openstreetmap.josm.actions.DiskAccessAction.createAndOpenFileChooser(DiskAccessAction.java:30)
at org.openstreetmap.josm.actions.OpenFileAction.actionPerformed(OpenFileAction.java:36)
at javax.swing.AbstractButton.fireActionPerformed(Unknown Source)
at javax.swing.AbstractButton$Handler.actionPerformed(Unknown Source)
at javax.swing.DefaultButtonModel.fireActionPerformed(Unknown Source)
at javax.swing.DefaultButtonModel.setPressed(Unknown Source)
at javax.swing.plaf.basic.BasicButtonListener.mouseReleased(Unknown Source)
at java.awt.AWTEventMulticaster.mouseReleased(Unknown Source)
at java.awt.Component.processMouseEvent(Unknown Source)
at javax.swing.JComponent.processMouseEvent(Unknown Source)
at java.awt.Component.processEvent(Unknown Source)
at java.awt.Container.processEvent(Unknown Source)
at java.awt.Component.dispatchEventImpl(Unknown Source)
at java.awt.Container.dispatchEventImpl(Unknown Source)
at java.awt.Component.dispatchEvent(Unknown Source)
at java.awt.LightweightDispatcher.retargetMouseEvent(Unknown Source)
at java.awt.LightweightDispatcher.processMouseEvent(Unknown Source)
at java.awt.LightweightDispatcher.dispatchEvent(Unknown Source)
at java.awt.Container.dispatchEventImpl(Unknown Source)
at java.awt.Window.dispatchEventImpl(Unknown Source)
at java.awt.Component.dispatchEvent(Unknown Source)
at java.awt.EventQueue.dispatchEvent(Unknown Source)
at java.awt.EventDispatchThread.pumpOneEventForFilters(Unknown Source)
at java.awt.EventDispatchThread.pumpEventsForFilter(Unknown Source)
at java.awt.EventDispatchThread.pumpEventsForHierarchy(Unknown Source)
at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
at java.awt.EventDispatchThread.run(Unknown Source)
Caused by: java.io.IOException: Could not get shell folder ID list
at sun.awt.shell.Win32ShellFolder2.getFileSystemPath0(Native Method)
at sun.awt.shell.Win32ShellFolder2.access$900(Unknown Source)
at sun.awt.shell.Win32ShellFolder2$8.call(Unknown Source)
at sun.awt.shell.Win32ShellFolder2$8.call(Unknown Source)
at java.util.concurrent.FutureTask$Sync.innerRun(Unknown Source)
at java.util.concurrent.FutureTask.run(Unknown Source)
at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(Unknown Source)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
at sun.awt.shell.Win32ShellFolderManager2$ComInvoker$3.run(Unknown Source)
at java.lang.Thread.run(Unknown Source)
REPORT FROM RELEASE 2217
Path: trunk
URL: http://josm.openstreetmap.de/svn/trunk
Repository Root: http://josm.openstreetmap.de/svn
Repository UUID: 0c6e7542-c601-0410-84e7-c038aed88b3b
Revision: 2217
Node Kind: directory
Last Changed Author: xeen
Last Changed Rev: 2217
Last Changed Date: 2009-09-30 01:21:34 +0200 (Wed, 30 Sep 2009)
Memory Usage: 17 MB / 63 MB (6 MB allocated, but free)
Java version: 1.6.0_15
Plugins: remotecontrol
Plugin remotecontrol Version: 16965
java.lang.RuntimeException: java.io.IOException: Could not get shell folder ID list
at sun.awt.shell.Win32ShellFolderManager2$ComInvoker.invoke(Unknown Source)
at sun.awt.shell.Win32ShellFolder2.getFileSystemPath(Unknown Source)
at sun.awt.shell.Win32ShellFolder2.composePathForCsidl(Unknown Source)
at sun.awt.shell.Win32ShellFolder2.<init>(Unknown Source)
at sun.awt.shell.Win32ShellFolderManager2.get(Unknown Source)
at sun.awt.shell.ShellFolder.get(Unknown Source)
at sun.swing.WindowsPlacesBar.<init>(Unknown Source)
at com.sun.java.swing.plaf.windows.WindowsFileChooserUI.updateUseShellFolder(Unknown Source)
at com.sun.java.swing.plaf.windows.WindowsFileChooserUI.installComponents(Unknown Source)
at javax.swing.plaf.basic.BasicFileChooserUI.installUI(Unknown Source)
at com.sun.java.swing.plaf.windows.WindowsFileChooserUI.installUI(Unknown Source)
at javax.swing.JComponent.setUI(Unknown Source)
at javax.swing.JFileChooser.updateUI(Unknown Source)
at javax.swing.JFileChooser.setup(Unknown Source)
at javax.swing.JFileChooser.<init>(Unknown Source)
at javax.swing.JFileChooser.<init>(Unknown Source)
at org.openstreetmap.josm.actions.DiskAccessAction.createAndOpenFileChooser(DiskAccessAction.java:32)
at org.openstreetmap.josm.actions.DiskAccessAction.createAndOpenFileChooser(DiskAccessAction.java:24)
at org.openstreetmap.josm.actions.OpenFileAction.actionPerformed(OpenFileAction.java:41)
at javax.swing.AbstractButton.fireActionPerformed(Unknown Source)
at javax.swing.AbstractButton$Handler.actionPerformed(Unknown Source)
at javax.swing.DefaultButtonModel.fireActionPerformed(Unknown Source)
at javax.swing.DefaultButtonModel.setPressed(Unknown Source)
at javax.swing.plaf.basic.BasicButtonListener.mouseReleased(Unknown Source)
at java.awt.AWTEventMulticaster.mouseReleased(Unknown Source)
at java.awt.Component.processMouseEvent(Unknown Source)
at javax.swing.JComponent.processMouseEvent(Unknown Source)
at java.awt.Component.processEvent(Unknown Source)
at java.awt.Container.processEvent(Unknown Source)
at java.awt.Component.dispatchEventImpl(Unknown Source)
at java.awt.Container.dispatchEventImpl(Unknown Source)
at java.awt.Component.dispatchEvent(Unknown Source)
at java.awt.LightweightDispatcher.retargetMouseEvent(Unknown Source)
at java.awt.LightweightDispatcher.processMouseEvent(Unknown Source)
at java.awt.LightweightDispatcher.dispatchEvent(Unknown Source)
at java.awt.Container.dispatchEventImpl(Unknown Source)
at java.awt.Window.dispatchEventImpl(Unknown Source)
at java.awt.Component.dispatchEvent(Unknown Source)
at java.awt.EventQueue.dispatchEvent(Unknown Source)
at java.awt.EventDispatchThread.pumpOneEventForFilters(Unknown Source)
at java.awt.EventDispatchThread.pumpEventsForFilter(Unknown Source)
at java.awt.EventDispatchThread.pumpEventsForHierarchy(Unknown Source)
at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
at java.awt.EventDispatchThread.run(Unknown Source)
Caused by: java.io.IOException: Could not get shell folder ID list
at sun.awt.shell.Win32ShellFolder2.getFileSystemPath0(Native Method)
at sun.awt.shell.Win32ShellFolder2.access$900(Unknown Source)
at sun.awt.shell.Win32ShellFolder2$8.call(Unknown Source)
at sun.awt.shell.Win32ShellFolder2$8.call(Unknown Source)
at java.util.concurrent.FutureTask$Sync.innerRun(Unknown Source)
at java.util.concurrent.FutureTask.run(Unknown Source)
at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(Unknown Source)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
at sun.awt.shell.Win32ShellFolderManager2$ComInvoker$3.run(Unknown Source)
at java.lang.Thread.run(Unknown Source)
comment:3 by , 16 years ago
Resolution: | → invalid |
---|---|
Status: | reopened → closed |
This is a Java problem, see for example this thread for workarounds - http://www.minq.se/forum/message.jspa?messageID=8286
comment:4 by , 16 years ago
Thanks for the quick reply, but it hasn't helped.
AS per the suggested forum, I checked the registry entries for "HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\User Shell Folders". Against 'Personal' and 'My Pictures', I had absolute paths to the CORRECT folders on D drive. I ultimately reinstated the default location of the My Documents folder from D:\My Documents to C:\My Documents to enable me to use %USERPROFILE% in place of D:\ on those Registry entries with absolute file references.
The problem remains however. (Before physically moving the files, I modified the Registry settings and noted the changes were effective by virtue of the fact I (temporarily) lost access to My Documents folder.) I also searched all similar values in the registry.
As you believe this to be a Java issue, I can only leave this ticket closed. Feel free to suggest other things to try. I'm no Java expert.
If I find the solution however, I'll post it here.
comment:5 by , 16 years ago
Did you try to logout and login after doing changes in registry? Maybe the values there get somehow cached.
Also note that you can open gpx files by dragging them from explorer to josm window. This way you can open more than one gpx file.
comment:6 by , 16 years ago
Did you try to logout and login after doing changes in registry? Maybe the values there get somehow cached.
No. But I did restarts.
Also note that you can open gpx files by dragging them from explorer to josm window. This way you can open more than one gpx file.
Many thanks. I wanted to do exactly that - open multiple gpx files simultaneously. I can live with that as a work-around.
comment:7 by , 16 years ago
It appears that some of us with some Micro$0£7 OSs and some versions of Java are always going to suffer this. No amount of registry fiddling is guaranteed to solve the problem.
After a little more googling, a coding solution does appear possible. Perhaps you could review the suggested code, (link below) as suggested by the following forum:
http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=6544857
Here's an excerpt from that forum:
Submitted On 02-JUL-2009 mrsteve We successfully implemented a full workaround by: - always extending JFileChooser, overriding setup(), and first thing, disabling shell folders using the client property "FileChooser.useShellFolder" before the first call to setUI - before instantiating, using reflection to replace ShellFolder.shellFolderManager (by default Win32ShellFolderManager2) with a generic instance of ShellFolderManager itself. Furthermore, we construct JFileChoosers in two attempts. The first is without the above fix; if this fails, and the exception contains the text "ShellFolder" (etc.), we activate the above fixes and try again. This means users without the problem see the proper file chooser; users with the problem see the Java 1.3 file chooser (with drive letters as roots) and no crashes. Submitted On 19-SEP-2009 cpesch The patch as suggested by http://jython.svn.sourceforge.net/viewvc/jython?view=rev&revision=4161 works fine for my http://www.routeconverter.de/ application.
Workaround code example, "A fallback file system view":
http://jython.svn.sourceforge.net/viewvc/jython/branches/Release_2_2maint/installer/src/java/org/python/util/install/RestrictedFileSystemView.java?view=markup&pathrev=4161
There's an annoying bug in r1892. Please upgrade to latest (r1893 or higher).