#1564 closed defect (worksforme)
JOSM und Plugin Measurement
Reported by: | Owned by: | framm | |
---|---|---|---|
Priority: | major | Milestone: | |
Component: | Plugin | Version: | latest |
Keywords: | measurement, NullPointerException | Cc: |
Description
Nach Aktivierung des "Measurement mode" (click auf das entsprechende Icon im Toolbar) führt ein Click in den Datalayer (Anfangspunkt einer Messung) sofort zu unten aufgeführter Exception.
Path: trunk
URL: http://josm.openstreetmap.de/svn/trunk
Repository Root: http://josm.openstreetmap.de/svn
Repository UUID: 0c6e7542-c601-0410-84e7-c038aed88b3b
Revision: 970
Node Kind: directory
Last Changed Author: ulfl
Last Changed Rev: 970
Last Changed Date: 2008-09-16 00:04:08 +0200 (Tue, 16 Sep 2008)
java.lang.NullPointerException
at org.openstreetmap.josm.plugins.measurement.MeasurementMode.mouseClicked(MeasurementMode.java:53)
at java.awt.AWTEventMulticaster.mouseClicked(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 (10)
comment:1 by , 16 years ago
comment:2 by , 16 years ago
Resolution: | → worksforme |
---|---|
Status: | new → closed |
can't see this behavior here in any of the following JOSM revision
- 716
- 1073
- 1075 (latest to date)
running on two different Debian GNU/Linux systems
@reporter: please re-open with more details, if still valid for you
comment:3 by , 16 years ago
Resolution: | worksforme |
---|---|
Status: | closed → reopened |
have tried it as well.Unfortunately the following happens
Open Josm (tried 1067 and 1078)
open a gpx file
open "measurement" plug-in
click a point where the measurement should start
following error message (probably from JOSM):
An unexpected execption occurred that may have come from the 'measurement' plug-in.
Try to update before reporting a bug. Should the plug-in be disabled?
I run measurement plug-in 10440 and JOSM 1078
Windows XP with SP 3
Java Platform SE6 U7
then upgraded SE U10, same problems
find this a handy tool, so would appreciate if it works again,
comment:4 by , 16 years ago
Keywords: | measurement NullPointerException added; JOSM PLUGIN MEASUREMENT removed |
---|---|
Version: | release → latest |
more testing at my system, now I second problem with measurement plugin, since it doesn't crash JSOM here on Debian GNU/Linux but throws an NullPointerException at JOSM startup
Path: trunk URL: http://josm.openstreetmap.de/svn/trunk Repository Root: http://josm.openstreetmap.de/svn Repository UUID: 0c6e7542-c601-0410-84e7-c038aed88b3b Revision: 1082 Node Kind: directory Last Changed Author: framm Last Changed Rev: 1082 Last Changed Date: 2008-11-18 08:40:49 +0100 (Tue, 18 Nov 2008) java.lang.NullPointerException at org.openstreetmap.josm.gui.dialogs.ToggleDialog$1.actionPerformed(ToggleDialog.java:93) at org.openstreetmap.josm.gui.dialogs.ToggleDialog$2.run(ToggleDialog.java:140) at java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:209) at java.awt.EventQueue.dispatchEvent(EventQueue.java:597) at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:269) at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:184) at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:174) at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:169) at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:161) at java.awt.EventDispatchThread.run(EventDispatchThread.java:122)
for details on my latest plugin checking session see also #1734 (marked that ticked as duplicate myself)
comment:5 by , 16 years ago
still valid for JSOM revision 1096 (latest to date) and measurement plugin 10440 (still unchanged since my earlier tests)
comment:7 by , 16 years ago
Resolution: | fixed |
---|---|
Status: | closed → reopened |
Sorry, I don't trace the SVN content by now. At with point is/was this fix incorporated to the released revisions? At my workstation I still get this:
Path: trunk URL: http://josm.openstreetmap.de/svn/trunk Repository Root: http://josm.openstreetmap.de/svn Repository UUID: 0c6e7542-c601-0410-84e7-c038aed88b3b Revision: 1198 Node Kind: directory Last Changed Author: stoecker Last Changed Rev: 1198 Last Changed Date: 2008-12-31 17:19:31 +0100 (Wed, 31 Dec 2008) Plugins: measurement;namefinder;openstreetbugs;slippy_map_chooser;usertools;utilsplugin;validator;wmsplugin Plugin measurement Version: 12598 Plugin namefinder Version: 12598 Plugin openstreetbugs Version: 12590 Plugin slippy_map_chooser Version: 12598 Plugin utilsplugin Version: 12677 Plugin validator Version: 12676 Plugin wmsplugin Version: 12609 java.lang.NullPointerException at org.openstreetmap.josm.gui.dialogs.ToggleDialog$1.actionPerformed(ToggleDialog.java:86) at org.openstreetmap.josm.gui.dialogs.ToggleDialog$2.run(ToggleDialog.java:133) at java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:209) at java.awt.EventQueue.dispatchEvent(EventQueue.java:597) at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:269) at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:184) at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:174) at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:169) at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:161) at java.awt.EventDispatchThread.run(EventDispatchThread.java:122)
comment:8 by , 16 years ago
Resolution: | → worksforme |
---|---|
Status: | reopened → closed |
I'd rather say this is a variant of #1883. Try disabling usertools.
comment:9 by , 16 years ago
Resolution: | worksforme |
---|---|
Status: | closed → reopened |
First, don't close this with worksforme as anonymous user, please - bad move.
Second, no, it's not a variant of #1883. What made you think it is? The issues are in fact completely unrelated since the problem and error description here existed unchanged (up to the java code line number) long before the code switch referenced over there.
Third, what do you expect to happen after disabling usertools? I no longer get an error on JOSM startup. I'm not impressed, since usertools doesn't work either way as does explicit re-loading on re-activation of the plugin improve anything. Again, here it's not about an issue introduced lately, not about usertools plugin.
comment:10 by , 16 years ago
Resolution: | → worksforme |
---|---|
Status: | reopened → closed |
Because I wrote the code and I know that activated old plugins cause exactly that type of error.
The original report fails in MeasurementMode.java, your report fails in ToggleDialog.java. First one is in measurement plugin. Your code is in JOSM core.
When usertools is disabled it will no longer call functions wrong and thus it will not produce errors like that above.
If the problem still exists after your disabled usertools and all other plugins are updated and you restarted JOSm, then open a new bugreport with a helpful description.
Something has been changed at some point, which requires that you always select the Measurement layer before any clicks for the measurement plugin to work. That is, until the plugin is fixed.