Modify

Opened 11 years ago

Closed 11 years ago

Last modified 11 years ago

#9038 closed defect (fixed)

crash clicking a note

Reported by: malenki Owned by: ToeBee
Priority: blocker Milestone:
Component: Core notes Version: latest
Keywords: template_report Cc: iandees

Description (last modified by malenki)

This bug is difficult to reproduce. That's why I will append the ~/.josm/preferences.xml to which the plugins listed in there you have to install.
The easiest way (IMHO) to reproduce the bug is

  1. start without a ~/.josm directory
  2. run JOSM once so it creates the files and directories it needs
  3. replace the preferences.xml in ~/.josm with the one appended
  4. run JOSM again
  5. ignore the warning that JOSM couldn't find about the list of plugins
  6. in the preferences download the plugin list and press "update plugins"
  7. restart JOSM
  8. go to a region with some notes in it ( for example http://www.openstreetmap.org/?lat=50.97742&lon=11.97924&zoom=19 )
  9. click on the note in the note dialog

Result: JOSM reports a ~dozen errors (if you don't suppress further warnings for this session).

java version "1.7.0_25"
OpenJDK Runtime Environment (IcedTea 2.3.12) (7u25-2.3.12-4)
OpenJDK 64-Bit Server VM (build 23.7-b01, mixed mode)

I spent some hours on chasing this bug but was unable to figure out an easy way to reproduce it nor an incompatibility of certain plugins. As soon as I removed one (in a fresh ~/.josm) the bug didn't appear. Though in my usual ~/.josm with all the settings I use I can remove some plugins with the bug still showing...
Thus the notes plugin is not usable for me and so I marked this issue as blocker

Repository Root: http://josm.openstreetmap.de/svn
Build-Date: 2013-09-01 01:34:23
Last Changed Author: bastiK
Revision: 6212
Repository UUID: 0c6e7542-c601-0410-84e7-c038aed88b3b
URL: http://josm.openstreetmap.de/svn/trunk
Last Changed Date: 2013-08-31 10:50:59 +0200 (Sat, 31 Aug 2013)
Last Changed Rev: 6212

Identification: JOSM/1.5 (6212 de) Linux Debian GNU/Linux unstable (sid)
Memory Usage: 301 MB / 9777 MB (143 MB allocated, but free)
Java version: 1.7.0_25, Oracle Corporation, OpenJDK 64-Bit Server VM
Java package: openjdk-7-jre:amd64-7u25-2.3.12-4
VM arguments: [-Xmx11000M, -Dsun.java2d.opengl=false]
Program arguments: [http://www.openstreetmap.org/#map=19/50.97050/11.98155]
Dataset consistency test: No problems found

Plugin: DirectUpload (29866)
Plugin: FastDraw (29854)
Plugin: FixAddresses (29854)
Plugin: OpeningHoursEditor (29854)
Plugin: PicLayer (29854)
Plugin: buildings_tools (29854)
Plugin: conflation (0.1.6)
Plugin: contourmerge (1005)
Plugin: download_along (29854)
Plugin: ext_tools (29854)
Plugin: geochat (29851)
Plugin: geotools (29767)
Plugin: jts (29854)
Plugin: lakewalker (29854)
Plugin: log4j (29853)
Plugin: mapdust (29854)
Plugin: measurement (29854)
Plugin: mirrored_download (29854)
Plugin: notes (v0.5)
Plugin: opendata (29854)
Plugin: openstreetbugs (29854)
Plugin: openvisible (29854)
Plugin: osmarender (29639)
Plugin: reltoolbox (29854)
Plugin: reverter (29854)
Plugin: routing (29854)
Plugin: tag2link (29854)
Plugin: tageditor (29854)
Plugin: terracer (29854)
Plugin: turnrestrictions (29854)
Plugin: undelete (29854)
Plugin: utilsplugin2 (29854)
Plugin: waydownloader (29854)
Plugin: wayselector (29854)
Plugin: wikipedia (29854)

java.lang.NoSuchMethodError: org.apache.commons.lang3.ArrayUtils.clone([Ljava/lang/Object;)[Ljava/lang/Object;
	at org.apache.commons.lang3.text.translate.AggregateTranslator.<init>(AggregateTranslator.java:41)
	at org.apache.commons.lang3.text.translate.CharSequenceTranslator.with(CharSequenceTranslator.java:111)
	at org.apache.commons.lang3.StringEscapeUtils.<clinit>(StringEscapeUtils.java:52)
	at org.openstreetmap.josm.plugins.notes.NotesLayer.paint(NotesLayer.java:180)
	at org.openstreetmap.josm.gui.MapView.paintLayer(MapView.java:533)
	at org.openstreetmap.josm.gui.MapView.paint(MapView.java:628)
	at javax.swing.JComponent.paintChildren(JComponent.java:878)
	at javax.swing.JComponent.paint(JComponent.java:1054)
	at javax.swing.JComponent.paintToOffscreen(JComponent.java:5212)
	at javax.swing.BufferStrategyPaintManager.paint(BufferStrategyPaintManager.java:295)
	at javax.swing.RepaintManager.paint(RepaintManager.java:1236)
	at javax.swing.JComponent._paintImmediately(JComponent.java:5160)
	at javax.swing.JComponent.paintImmediately(JComponent.java:4971)
	at javax.swing.RepaintManager$3.run(RepaintManager.java:796)
	at javax.swing.RepaintManager$3.run(RepaintManager.java:784)
	at java.security.AccessController.doPrivileged(Native Method)
	at java.security.ProtectionDomain$1.doIntersectionPrivilege(ProtectionDomain.java:76)
	at javax.swing.RepaintManager.paintDirtyRegions(RepaintManager.java:784)
	at javax.swing.RepaintManager.paintDirtyRegions(RepaintManager.java:757)
	at javax.swing.RepaintManager.prePaintDirtyRegions(RepaintManager.java:706)
	at javax.swing.RepaintManager.access$1000(RepaintManager.java:62)
	at javax.swing.RepaintManager$ProcessingRunnable.run(RepaintManager.java:1647)
	at java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:251)
	at java.awt.EventQueue.dispatchEventImpl(EventQueue.java:733)
	at java.awt.EventQueue.access$200(EventQueue.java:103)
	at java.awt.EventQueue$3.run(EventQueue.java:694)
	at java.awt.EventQueue$3.run(EventQueue.java:692)
	at java.security.AccessController.doPrivileged(Native Method)
	at java.security.ProtectionDomain$1.doIntersectionPrivilege(ProtectionDomain.java:76)
	at java.awt.EventQueue.dispatchEvent(EventQueue.java:703)
	at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:242)
	at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:161)
	at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:150)
	at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:146)
	at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:138)
	at java.awt.EventDispatchThread.run(EventDispatchThread.java:91)

Attachments (1)

preferences.xml (22.3 KB ) - added by malenki 11 years ago.

Download all attachments as: .zip

Change History (15)

by malenki, 11 years ago

Attachment: preferences.xml added

comment:1 by malenki, 11 years ago

Description: modified (diff)

comment:2 by bastiK, 11 years ago

Cc: iandees added

comment:3 by iandees, 11 years ago

I'm thinking some other plugin is loading an older version of commons-lang3 JAR after the notes plugin, and it's hiding the method that's in use here.

A solution would be for notes to copy the StringEscapeUtils stuff into its own namespace...

in reply to:  3 comment:4 by bastiK, 11 years ago

Replying to iandees:

I'm thinking some other plugin is loading an older version of commons-lang3 JAR after the notes plugin, and it's hiding the method that's in use here.

Plugin opendata is also using the org.apache.commons.lang3 package.

A solution would be for notes to copy the StringEscapeUtils stuff into its own namespace...

I guess that would solve the problem.

Btw.: According to the wiki, you are developing the plugin together with Toby Murray. Lately, you have been the one who is more active in fixing bugs. So would it be okay to assign notes plugin tickets to you directly?

in reply to:  3 comment:5 by Don-vip, 11 years ago

Replying to iandees:

I'm thinking some other plugin is loading an older version of commons-lang3 JAR after the notes plugin, and it's hiding the method that's in use here.

Yep, I do it in opendata but I didn't think another plugin would use this.
The proper option would be to make another plugin for commons-lang, but as notes is good candidate for core integration when it will be mature enough, the ideal solution would be to not rely on another external library. Is it really needed ?

comment:6 by Don-vip, 11 years ago

Ticket #9098 has been marked as a duplicate of this ticket.

comment:7 by Don-vip, 11 years ago

@ToeBee, @iandees: Is it possible for you to not use this library ?

comment:8 by iandees, 11 years ago

Resolution: fixed
Status: newclosed

No longer using the library.

comment:9 by ToeBee, 11 years ago

For the record, I changed it to use JOSM's own XML encoding method in XmlWriter which has the side benefit of also fixing a slight problem with displaying apostrophes because of a bug in java's ToolTip class. (Same bug in JLabel I believe)

comment:10 by Don-vip, 11 years ago

Thanks guys !

comment:11 by rickmastfan67, 11 years ago

Ticket #9146 has been marked as a duplicate of this ticket.

comment:12 by ToeBee, 11 years ago

A new version of the plugin was published last week but it looks like JOSM isn't picking it up yet, probably because of #8998. Any chance we could get an admin to force a refresh on the notes plugin? The current version should be 0.6.

in reply to:  12 comment:13 by Don-vip, 11 years ago

Replying to ToeBee:

Any chance we could get an admin to force a refresh on the notes plugin? The current version should be 0.6.

Done :)

comment:14 by ToeBee, 11 years ago

Thank you!

Now everybody watching this ticket go update your plugins! :)

Modify Ticket

Change Properties
Set your email in Preferences
Action
as closed The owner will remain ToeBee.
as The resolution will be set.
The resolution will be deleted. Next status will be 'reopened'.

Add Comment


E-mail address and name can be saved in the Preferences .
 
Note: See TracTickets for help on using tickets.