Modify

Opened 3 years ago

Closed 3 years ago

#12991 closed defect (fixed)

Crash after deleting gpx file

Reported by: anonymous Owned by: OliverW
Priority: normal Milestone:
Component: Plugin elevationprofile Version:
Keywords: template_report gsoc-core regression Cc: michael2402

Description

What steps will reproduce the problem?

  1. Load gpx file
  2. Realise already edited, so delete
  3. Crash

What is the expected result?

What happens instead?

Please provide any additional information below. Attach a screenshot if possible.

URL:http://josm.openstreetmap.de/svn/trunk
Repository:UUID: 0c6e7542-c601-0410-84e7-c038aed88b3b
Last:Changed Date: 2016-06-18 01:45:15 +0200 (Sat, 18 Jun 2016)
Build-Date:2016-06-18 01:33:54
Revision:10414
Relative:URL: ^/trunk

Identification: JOSM/1.5 (10414 en_GB) Linux Debian GNU/Linux testing (stretch)
Memory Usage: 526 MB / 3550 MB (211 MB allocated, but free)
Java version: 1.8.0_91-8u91-b14-2-b14, Oracle Corporation, OpenJDK 64-Bit Server VM

Plugins:
- DirectDownload (32158)
- ElevationProfile (32158)
- Tracer2 (32158)
- buildings_tools (32158)
- editgpx (32263)
- graphview (32158)
- measurement (32158)
- turnrestrictions (32158)
- utilsplugin2 (32158)

Last errors/warnings:
- W: Unable to delete file <josm.pref>/cache/tiles/TMS.data
- W: Unable to delete file <josm.pref>/cache/tiles/TMS_INDEX.key
- W: Unable to delete file <josm.pref>/cache/tiles/TMS_INDEX.data
- W: Old style SideButton usage for action org.openstreetmap.josm.gui.download.DownloadDialog$CancelAction@722b6ff1
- E: java.lang.IllegalArgumentException: Listener was not registered before: LayerChangeAdapter [org.openstreetmap.josm.plugins.elevation.ElevationMapMode@46562140]

java.lang.IllegalArgumentException: Listener was not registered before: LayerChangeAdapter [org.openstreetmap.josm.plugins.elevation.ElevationMapMode@46562140]
	at org.openstreetmap.josm.gui.layer.LayerManager.removeLayerChangeListener(LayerManager.java:316)
	at org.openstreetmap.josm.gui.layer.LayerManager.removeLayerChangeListener(LayerManager.java:304)
	at org.openstreetmap.josm.actions.JosmAction.destroy(JosmAction.java:220)
	at org.openstreetmap.josm.gui.IconToggleButton.destroy(IconToggleButton.java:72)
	at org.openstreetmap.josm.gui.MapFrame.destroy(MapFrame.java:342)
	at org.openstreetmap.josm.Main.setMapFrame(Main.java:521)
	at org.openstreetmap.josm.Main.removeLayer(Main.java:552)
	at org.openstreetmap.josm.gui.dialogs.layer.DeleteLayerAction.actionPerformed(DeleteLayerAction.java:48)
	at javax.swing.AbstractButton.fireActionPerformed(AbstractButton.java:2022)
	at javax.swing.AbstractButton$Handler.actionPerformed(AbstractButton.java:2348)
	at javax.swing.DefaultButtonModel.fireActionPerformed(DefaultButtonModel.java:402)
	at javax.swing.DefaultButtonModel.setPressed(DefaultButtonModel.java:259)
	at javax.swing.plaf.basic.BasicButtonListener.mouseReleased(BasicButtonListener.java:252)
	at java.awt.AWTEventMulticaster.mouseReleased(AWTEventMulticaster.java:289)
	at java.awt.Component.processMouseEvent(Component.java:6535)
	at javax.swing.JComponent.processMouseEvent(JComponent.java:3324)
	at java.awt.Component.processEvent(Component.java:6300)
	at java.awt.Container.processEvent(Container.java:2236)
	at java.awt.Component.dispatchEventImpl(Component.java:4891)
	at java.awt.Container.dispatchEventImpl(Container.java:2294)
	at java.awt.Component.dispatchEvent(Component.java:4713)
	at java.awt.LightweightDispatcher.retargetMouseEvent(Container.java:4888)
	at java.awt.LightweightDispatcher.processMouseEvent(Container.java:4525)
	at java.awt.LightweightDispatcher.dispatchEvent(Container.java:4466)
	at java.awt.Container.dispatchEventImpl(Container.java:2280)
	at java.awt.Window.dispatchEventImpl(Window.java:2750)
	at java.awt.Component.dispatchEvent(Component.java:4713)
	at java.awt.EventQueue.dispatchEventImpl(EventQueue.java:758)
	at java.awt.EventQueue.access$500(EventQueue.java:97)
	at java.awt.EventQueue$3.run(EventQueue.java:709)
	at java.awt.EventQueue$3.run(EventQueue.java:703)
	at java.security.AccessController.doPrivileged(Native Method)
	at java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:76)
	at java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:86)
	at java.awt.EventQueue$4.run(EventQueue.java:731)
	at java.awt.EventQueue$4.run(EventQueue.java:729)
	at java.security.AccessController.doPrivileged(Native Method)
	at java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:76)
	at java.awt.EventQueue.dispatchEvent(EventQueue.java:728)
	at org.GNOME.Accessibility.AtkWrapper$5.dispatchEvent(AtkWrapper.java:697)
	at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:201)
	at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:116)
	at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:105)
	at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:101)
	at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:93)
	at java.awt.EventDispatchThread.run(EventDispatchThread.java:82)

Attachments (1)

plugin-ElevationProfile-destroy.patch (1.4 KB) - added by michael2402 3 years ago.

Download all attachments as: .zip

Change History (5)

comment:1 Changed 3 years ago by Don-vip

Cc: michael2402 added
Keywords: gsoc-core regression added

comment:2 Changed 3 years ago by michael2402

Component: CorePlugin elevationprofile
Owner: changed from team to OliverW

I could reproduce this. It only happened the second time I deleted the GPX layer.

I have the same problem with the TMS/WMS layers in AddImageLayerActionTest (and some more):

destroy() seems to be called for actions that are already destroyed.

Last edited 3 years ago by michael2402 (previous) (diff)

Changed 3 years ago by michael2402

comment:3 Changed 3 years ago by michael2402

I added an untested patch for this.

MapModes are automatically destroyed when the map view is.

comment:4 Changed 3 years ago by Don-vip

Resolution: fixed
Status: newclosed

Thanks! It should be fixed in [o32313:32314].

Modify Ticket

Change Properties
Set your email in Preferences
Action
as closed The owner will remain OliverW.
as The resolution will be set.
The resolution will be deleted.

Add Comment


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

 
Note: See TracTickets for help on using tickets.