Opened 16 years ago
Closed 16 years ago
#3407 closed defect (fixed)
NPE in ConflictDialog when using OpenStreetBug plugin
Reported by: | Dennis | Owned by: | team |
---|---|---|---|
Priority: | normal | Milestone: | |
Component: | Plugin | Version: | latest |
Keywords: | osb core | Cc: |
Description
Wenn JOSM einen Openstreetbug geladen hat und ich diesen rechts in der Liste anklicke, kommt folgendender Programmfehler:
Path: trunk
URL: http://josm.openstreetmap.de/svn/trunk
Repository Root: http://josm.openstreetmap.de/svn
Repository UUID: 0c6e7542-c601-0410-84e7-c038aed88b3b
Revision: 2052
Node Kind: directory
Last Changed Author: stoecker
Last Changed Rev: 2052
Last Changed Date: 2009-09-04 17:30:13 +0200 (Fri, 04 Sep 2009)
Memory Usage: 101 MB / 1016 MB (39 MB allocated, but free)
Java version: 1.6.0_15
Plugins: DirectUploadeditgpxgraphviewopenstreetbugsplastic_lafremotecontrolutilspluginvalidator
Plugin plastic_laf Version: 14016
Plugin DirectUpload Version: 17401
Plugin editgpx Version: 17369
Plugin graphview Version: 17371
Plugin openstreetbugs Version: 17404
Plugin remotecontrol Version: 16836
Plugin utilsplugin Version: 17437
Plugin validator Version: 17352
java.lang.NullPointerException
at org.openstreetmap.josm.plugins.osb.gui.OsbDialog.valueChanged(OsbDialog.java:224)
at javax.swing.JList.fireSelectionValueChanged(Unknown Source)
at javax.swing.JList$ListSelectionHandler.valueChanged(Unknown Source)
at javax.swing.DefaultListSelectionModel.fireValueChanged(Unknown Source)
at javax.swing.DefaultListSelectionModel.fireValueChanged(Unknown Source)
at javax.swing.DefaultListSelectionModel.setValueIsAdjusting(Unknown Source)
at javax.swing.JList.setValueIsAdjusting(Unknown Source)
at javax.swing.plaf.basic.BasicListUI$Handler.mouseReleased(Unknown Source)
at java.awt.AWTEventMulticaster.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 (2)
Change History (11)
by , 16 years ago
Attachment: | osb_npe_and_warnings.patch added |
---|
comment:1 by , 16 years ago
Summary: | Plugin Openstreetpugs - Programmfehler → [PATCH] Plugin Openstreetpugs - Programmfehler |
---|
- Fix NPE
- Remove deprecated calls
- Fix selection border not drawn exactly around the icon
comment:3 by , 16 years ago
Resolution: | fixed |
---|---|
Status: | closed → reopened |
Der Fehler ist in der Version 2094 von heute wieder da...
Path: trunk
URL: http://josm.openstreetmap.de/svn/trunk
Repository Root: http://josm.openstreetmap.de/svn
Repository UUID: 0c6e7542-c601-0410-84e7-c038aed88b3b
Revision: 2094
Node Kind: directory
Last Changed Author: Gubaer
Last Changed Rev: 2094
Last Changed Date: 2009-09-11 10:24:41 +0200 (Fri, 11 Sep 2009)
Memory Usage: 113 MB / 1016 MB (18 MB allocated, but free)
Java version: 1.6.0_15
Plugins: DirectUpload
editgpx
graphview
openstreetbugs
plastic_laf
remotecontrol
slippymap
utilsplugin
validator
wmsplugin
Plugin plastic_laf Version: 14016
Plugin DirectUpload Version: 17532
Plugin editgpx Version: 17530
Plugin graphview Version: 17538
Plugin openstreetbugs Version: 17534
Plugin remotecontrol Version: 17457
Plugin slippymap Version: 17433
Plugin utilsplugin Version: 17550
Plugin validator Version: 17540
Plugin wmsplugin Version: 17556
java.lang.NullPointerException
at org.openstreetmap.josm.gui.dialogs.ConflictDialog.selectionChanged(ConflictDialog.java:254)
at org.openstreetmap.josm.data.osm.DataSet.fireSelectionChanged(DataSet.java:245)
at org.openstreetmap.josm.data.osm.DataSet.setSelected(DataSet.java:193)
at org.openstreetmap.josm.plugins.osb.gui.OsbDialog.valueChanged(OsbDialog.java:230)
at javax.swing.JList.fireSelectionValueChanged(Unknown Source)
at javax.swing.JList$ListSelectionHandler.valueChanged(Unknown Source)
at javax.swing.DefaultListSelectionModel.fireValueChanged(Unknown Source)
at javax.swing.DefaultListSelectionModel.fireValueChanged(Unknown Source)
at javax.swing.DefaultListSelectionModel.fireValueChanged(Unknown Source)
at javax.swing.DefaultListSelectionModel.changeSelection(Unknown Source)
at javax.swing.DefaultListSelectionModel.changeSelection(Unknown Source)
at javax.swing.DefaultListSelectionModel.setSelectionInterval(Unknown Source)
at javax.swing.JList.setSelectionInterval(Unknown Source)
at javax.swing.plaf.basic.BasicListUI$Handler.adjustSelection(Unknown Source)
at javax.swing.plaf.basic.BasicListUI$Handler.mousePressed(Unknown Source)
at java.awt.AWTEventMulticaster.mousePressed(Unknown Source)
at java.awt.AWTEventMulticaster.mousePressed(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)
comment:4 by , 16 years ago
Keywords: | osb core added |
---|---|
Summary: | [PATCH] Plugin Openstreetpugs - Programmfehler → NPE in ConflictDialog when using OpenStreetBug plugin |
Version: | → latest |
Ist zwar wieder eine NPE, sieht vom Stacktrace her aber eher nach einem neuen Fehler aus.
comment:5 by , 16 years ago
How to reproduce? I can surely fix it by a nullcheck, but finding the source would be better.
comment:6 by , 16 years ago
The offending lines would be:
DataSet ds = Main.main.getCurrentDataSet(); if (fireSelectionChanged) { if(ds == null) ds = new DataSet(); ds.setSelected(selected); }
I have no idea why I placed the getCurrentDataSet outside the if, but it seems to me that an empty ds will cause the ConflictDialog to NPE. You can test that when the OSB layer is the only one and there is no data layer.
Offending code there is:
if (conflicts.hasConflictForMy(osm)) {
whereas osm is a member of the <selected> from above, so it's probably not null, and even if shouldn't cause any problems. Gubaer, you're more familiar with conflict-code, when is the <conflict> variable created…? It seems to me it has never been initialized…
comment:7 by , 16 years ago
You can test that when the OSB layer is the only one and there is no data layer.
Tatsache, wenn ich nur nen GPX-File lade dann tritt der Fehler auf.
Habe ich nen Datenlayer tritt der Fehler nicht mehr auf.
comment:8 by , 16 years ago
comment:9 by , 16 years ago
Resolution: | → fixed |
---|---|
Status: | reopened → closed |
It's initialized when the active layer changes to an OsmDataLayer.
I've fixed the NPE you reported - and another one which might have popped up in the future.