Modify

Ticket #1564 (closed defect: worksforme)

Opened 3 years ago

Last modified 3 years ago

JOSM und Plugin Measurement

Reported by: rake@… Owned by: framm
Priority: major 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

Change History

comment:1 Changed 3 years ago by anonymous

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.

comment:2 Changed 3 years ago by Hasienda

  • Status changed from new to closed
  • Resolution set to worksforme

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 Changed 3 years ago by anonymous

  • Status changed from closed to reopened
  • Resolution worksforme deleted

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 Changed 3 years ago by Hasienda

  • Keywords measurement, NullPointerException added; JOSM PLUGIN MEASUREMENT removed
  • Version changed from release to 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 Changed 3 years ago by Hasienda

still valid for JSOM revision 1096 (latest to date) and measurement plugin 10440 (still unchanged since my earlier tests)

comment:6 Changed 3 years ago by anonymous

  • Status changed from reopened to closed
  • Resolution set to fixed

Fixed in SVN.

comment:7 Changed 3 years ago by Hasienda

  • Status changed from closed to reopened
  • Resolution fixed deleted

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 Changed 3 years ago by anonymous

  • Status changed from reopened to closed
  • Resolution set to worksforme

I'd rather say this is a variant of #1883. Try disabling usertools.

comment:9 Changed 3 years ago by Hasienda

  • Status changed from closed to reopened
  • Resolution worksforme deleted

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 Changed 3 years ago by stoecker

  • Status changed from reopened to closed
  • Resolution set to worksforme

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.

View

Add a comment

Modify Ticket

Change Properties
<Author field>
Action
as closed
as The resolution will be set. Next status will be 'closed'
The resolution will be deleted. Next status will be 'reopened'
Author


E-mail address and user name can be saved in the Preferences.

 
Note: See TracTickets for help on using tickets.