Modify

Opened 8 years ago

Closed 8 years ago

#13095 closed defect (fixed)

Exception on closing layers

Reported by: mdk Owned by: team
Priority: critical Milestone: 16.06
Component: Core Version: latest
Keywords: template_report regression gsoc-core autoscale Cc: michael2402

Description

What steps will reproduce the problem?

  1. Download an area (something which cause validator warnings?)
  2. Add Bing aereal imagery layer
  3. Validate (add validation layer)
  4. Remove Bing layer
  5. Remove Data layer

What is the expected result?

All layers are closed. No Exception, just showing the start page with news.

What happens instead?

Exception

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

Afterwards the application has to be restarted, because other operations (like new download) cause other execptions in Plugins etc.

URL:http://josm.openstreetmap.de/svn/trunk
Repository:UUID: 0c6e7542-c601-0410-84e7-c038aed88b3b
Last:Changed Date: 2016-06-30 20:43:22 +0200 (Thu, 30 Jun 2016)
Build-Date:2016-07-01 01:33:37
Revision:10504
Relative:URL: ^/trunk

Identification: JOSM/1.5 (10504 en) Linux Ubuntu 15.10
Memory Usage: 422 MB / 876 MB (106 MB allocated, but free)
Java version: 1.8.0_91-8u91-b14-0ubuntu4~15.10.1-b14, Oracle Corporation, OpenJDK Server VM
VM arguments: [-Djosm.restart=true, -Djosm.home=<josm.pref>, -Djava.net.useSystemProxies=true]
Dataset consistency test: No problems found

Plugins:
- ColumbusCSV (32292)
- FastDraw (32158)
- HouseNumberTaggingTool (31926)
- Mapillary (32396)
- OpeningHoursEditor (32158)
- RoadSigns (32177)
- apache-commons (32158)
- apache-http (32158)
- buildings_tools (32158)
- contourmerge (1014)
- imagery-xml-bounds (32287)
- imagery_offset_db (32158)
- pbf (32290)
- poly (32287)
- public_transport (32158)
- reltoolbox (32158)
- reverter (32158)
- terracer (32158)
- turnlanes (32158)
- turnrestrictions (32386)
- utilsplugin2 (32158)

Tagging presets:
- https://josm.openstreetmap.de/josmfile?page=Presets/LaneAttributes&preset&zip=1
- https://josm.openstreetmap.de/josmfile?page=Presets/OneClick&zip=1

Map paint styles:
- https://josm.openstreetmap.de/josmfile?page=Styles/Lane_and_Road_Attributes&zip=1
- https://josm.openstreetmap.de/josmfile?page=Styles/Maxspeed&zip=1
- https://josm.openstreetmap.de/josmfile?page=Styles/Traffic_signs&zip=1

Last errors/warnings:
- W: java.io.IOException: Attribution is not loaded yet
- W: java.io.IOException: Attribution is not loaded yet
- W: java.io.IOException: Attribution is not loaded yet
- W: java.io.IOException: Attribution is not loaded yet
- W: java.io.IOException: Attribution is not loaded yet
- W: java.io.IOException: Attribution is not loaded yet
- W: java.io.IOException: Attribution is not loaded yet
- W: Some of the key listeners forgot to remove themselves: [org.openstreetmap.josm.actions.mapmode.SelectAction@14d9fbf]
- W: Some of the key modifier listeners forgot to remove themselves: [org.openstreetmap.josm.actions.mapmode.SelectAction@14d9fbf]
- E: java.lang.IllegalStateException: Dialog not created yet. Invoke createInstance() first

java.lang.IllegalStateException: Dialog not created yet. Invoke createInstance() first
	at org.openstreetmap.josm.gui.dialogs.LayerListDialog.getInstance(LayerListDialog.java:112)
	at org.openstreetmap.josm.actions.AutoScaleAction.getFirstSelectedLayer(AutoScaleAction.java:227)
	at org.openstreetmap.josm.actions.AutoScaleAction.updateEnabledState(AutoScaleAction.java:354)
	at org.openstreetmap.josm.actions.AutoScaleAction$MapFrameAdapter.mapFrameInitialized(AutoScaleAction.java:443)
	at org.openstreetmap.josm.gui.MainPanel.updateContent(MainPanel.java:82)
	at org.openstreetmap.josm.gui.MainPanel$1$1.run(MainPanel.java:170)
	at java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:311)
	at java.awt.EventQueue.dispatchEventImpl(EventQueue.java:756)
	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.awt.EventQueue.dispatchEvent(EventQueue.java:726)
	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 (2)

patch-mapview-add-layer-presence-event.patch (8.4 KB ) - added by michael2402 8 years ago.
patch-fix-13095.patch (9.2 KB ) - added by michael2402 8 years ago.

Download all attachments as: .zip

Change History (8)

comment:1 by mdk, 8 years ago

Perhaps an importand detail:
When I download data, I also download "Raw GPS data", but not "Notes". So I get two layers. Sometimes the GPS layer is automatically closed, when I close the data layser (as described above), and sometimes the GPS layer remains. Then the exception occurs after closing this last layer.

comment:2 by Don-vip, 8 years ago

Cc: michael2402 added
Keywords: regression gsoc-core added
Milestone: 16.06
Priority: majorcritical

comment:3 by michael2402, 8 years ago

Keywords: autoscale added

comment:4 by michael2402, 8 years ago

Ignore that patch, it does not really solve the problem, so I'd say we keep it for 16.07: #13078

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

comment:5 by michael2402, 8 years ago

I traced down the problem. Steps to reproduce:

  • Add data layer
  • validate
  • Remove that data layer

The problems are:

  • The validator layer is removed twice. Once by OsmValidator and once by ValidatorLayer
  • The validation layer calls remove(layer) inside an other remove listener. So half of the layers first get the remove event of Layer 1, then Layer 2. The rest gets them the other way around. This may cause race conditions with the removal and the active layer listeners.

Soltion:

  • Delete the OsmValidator listener code
  • Remove the next layer after the current one was deleted.

by michael2402, 8 years ago

Attachment: patch-fix-13095.patch added

comment:6 by Don-vip, 8 years ago

Resolution: fixed
Status: newclosed

In 10507/josm:

fix #13095 - Exception on closing layers (patch by michael2402) - gsoc-core

Modify Ticket

Change Properties
Set your email in Preferences
Action
as closed The owner will remain team.
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.