Opened 9 years ago
Closed 9 years ago
#12897 closed defect (fixed)
[Patch] Exiting JOSM produces this since update to
Reported by: | phinret | Owned by: | michael2402 |
---|---|---|---|
Priority: | normal | Milestone: | 16.06 |
Component: | Core | Version: | |
Keywords: | template_report regression | Cc: |
Description
What steps will reproduce the problem?
- Click on Exit
What is the expected result?
JOSM exits without bug report
What happens instead?
JOSM detects a bug and wants to report.
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-05-30 02:06:54 +0200 (Mon, 30 May 2016) Build-Date:2016-05-30 01:32:45 Revision:10301 Relative:URL: ^/trunk Identification: JOSM/1.5 (10301 de) Linux Ubuntu 14.04.4 LTS Memory Usage: 221 MB / 239 MB (113 MB allocated, but free) Java version: 1.8.0_92-b14, Oracle Corporation, Java HotSpot(TM) Client VM Plugins: - FixAddresses (32158) - HouseNumberTaggingTool (31926) - apache-commons (32158) - buildings_tools (32158) - dataimport (31926) - editgpx (32158) - ejml (32158) - fieldpapers (v0.4.0) - geotools (31895) - imagery_offset_db (32158) - importvec (32158) - jts (31906) - lakewalker (32158) - opendata (32158) - openvisible (31772) - utilsplugin2 (32158) Map paint styles: - https://github.com/simon04/coloured-addresses.mapcss/raw/master/dist/coloured-addresses.mapcss Last errors/warnings: - E: java.lang.IllegalArgumentException: Listener was not registered before: org.openstreetmap.josm.gui.dialogs.LayerListDialog$LayerListModel@13d33d OSM API: http://www.openstreetmap.org/api java.lang.IllegalArgumentException: Listener was not registered before: org.openstreetmap.josm.gui.dialogs.LayerListDialog$LayerListModel@13d33d at org.openstreetmap.josm.gui.layer.LayerManager.removeLayerChangeListener(LayerManager.java:315) at org.openstreetmap.josm.gui.layer.LayerManager.removeLayerChangeListener(LayerManager.java:303) at org.openstreetmap.josm.gui.dialogs.LayerListDialog.hideNotify(LayerListDialog.java:340) at org.openstreetmap.josm.gui.dialogs.ToggleDialog.destroy(ToggleDialog.java:441) at org.openstreetmap.josm.gui.dialogs.LayerListDialog.destroy(LayerListDialog.java:399) at org.openstreetmap.josm.gui.dialogs.DialogsPanel.destroy(DialogsPanel.java:297) at org.openstreetmap.josm.gui.MapFrame.destroy(MapFrame.java:332) at org.openstreetmap.josm.Main.setMapFrame(Main.java:520) at org.openstreetmap.josm.Main.removeLayer(Main.java:545) at org.openstreetmap.josm.Main.exitJosm(Main.java:1123) at org.openstreetmap.josm.gui.MainApplication$1.windowClosing(MainApplication.java:116) at java.awt.AWTEventMulticaster.windowClosing(AWTEventMulticaster.java:349) at java.awt.AWTEventMulticaster.windowClosing(AWTEventMulticaster.java:349) at java.awt.AWTEventMulticaster.windowClosing(AWTEventMulticaster.java:349) at java.awt.Window.processWindowEvent(Window.java:2054) at javax.swing.JFrame.processWindowEvent(JFrame.java:305) at java.awt.Window.processEvent(Window.java:2013) at java.awt.Component.dispatchEventImpl(Component.java:4889) at java.awt.Container.dispatchEventImpl(Container.java:2294) at java.awt.Window.dispatchEventImpl(Window.java:2746) at java.awt.Component.dispatchEvent(Component.java:4711) 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 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)
Change History (17)
comment:1 by , 9 years ago
comment:2 by , 9 years ago
GETTING OAuth TO WORK SOLVED THE PROBLEM.
Replying to phinret:
What steps will reproduce the problem?
- Click on Exit
What is the expected result?
JOSM exits without bug report
What happens instead?
JOSM detects a bug and wants to report.
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-05-30 02:06:54 +0200 (Mon, 30 May 2016) Build-Date:2016-05-30 01:32:45 Revision:10301 Relative:URL: ^/trunk Identification: JOSM/1.5 (10301 de) Linux Ubuntu 14.04.4 LTS Memory Usage: 221 MB / 239 MB (113 MB allocated, but free) Java version: 1.8.0_92-b14, Oracle Corporation, Java HotSpot(TM) Client VM Plugins: - FixAddresses (32158) - HouseNumberTaggingTool (31926) - apache-commons (32158) - buildings_tools (32158) - dataimport (31926) - editgpx (32158) - ejml (32158) - fieldpapers (v0.4.0) - geotools (31895) - imagery_offset_db (32158) - importvec (32158) - jts (31906) - lakewalker (32158) - opendata (32158) - openvisible (31772) - utilsplugin2 (32158) Map paint styles: - https://github.com/simon04/coloured-addresses.mapcss/raw/master/dist/coloured-addresses.mapcss Last errors/warnings: - E: java.lang.IllegalArgumentException: Listener was not registered before: org.openstreetmap.josm.gui.dialogs.LayerListDialog$LayerListModel@13d33d OSM API: http://www.openstreetmap.org/api java.lang.IllegalArgumentException: Listener was not registered before: org.openstreetmap.josm.gui.dialogs.LayerListDialog$LayerListModel@13d33d at org.openstreetmap.josm.gui.layer.LayerManager.removeLayerChangeListener(LayerManager.java:315) at org.openstreetmap.josm.gui.layer.LayerManager.removeLayerChangeListener(LayerManager.java:303) at org.openstreetmap.josm.gui.dialogs.LayerListDialog.hideNotify(LayerListDialog.java:340) at org.openstreetmap.josm.gui.dialogs.ToggleDialog.destroy(ToggleDialog.java:441) at org.openstreetmap.josm.gui.dialogs.LayerListDialog.destroy(LayerListDialog.java:399) at org.openstreetmap.josm.gui.dialogs.DialogsPanel.destroy(DialogsPanel.java:297) at org.openstreetmap.josm.gui.MapFrame.destroy(MapFrame.java:332) at org.openstreetmap.josm.Main.setMapFrame(Main.java:520) at org.openstreetmap.josm.Main.removeLayer(Main.java:545) at org.openstreetmap.josm.Main.exitJosm(Main.java:1123) at org.openstreetmap.josm.gui.MainApplication$1.windowClosing(MainApplication.java:116) at java.awt.AWTEventMulticaster.windowClosing(AWTEventMulticaster.java:349) at java.awt.AWTEventMulticaster.windowClosing(AWTEventMulticaster.java:349) at java.awt.AWTEventMulticaster.windowClosing(AWTEventMulticaster.java:349) at java.awt.Window.processWindowEvent(Window.java:2054) at javax.swing.JFrame.processWindowEvent(JFrame.java:305) at java.awt.Window.processEvent(Window.java:2013) at java.awt.Component.dispatchEventImpl(Component.java:4889) at java.awt.Container.dispatchEventImpl(Container.java:2294) at java.awt.Window.dispatchEventImpl(Window.java:2746) at java.awt.Component.dispatchEvent(Component.java:4711) 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 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)
comment:4 by , 9 years ago
Milestone: | → 16.06 |
---|
comment:5 by , 9 years ago
There is something wrong with the lifecycle of LayerListDialog. It gets a hideNotify() without having received a showNotify().
follow-up: 11 comment:7 by , 9 years ago
I was unable to reproduce this. Do you have more information about the steps you did before the crash (adding/removing layers, download dialog, ...)?
I added a patch that should prevent this exception from being raised but we should find out what the source for the wrong hideNotify() call is.
by , 9 years ago
Attachment: | patch-layer-list-lifecycle-quickfix.patch added |
---|
comment:8 by , 9 years ago
Summary: | Exiting JOSM produces this since update to → [Patch] Exiting JOSM produces this since update to |
---|
comment:11 by , 9 years ago
Replying to michael2402:
we should find out what the source for the wrong hideNotify() call is.
Agreed. I have not applied the patch on purpose: more bug reports will help us to hunt down this issue.
by , 9 years ago
Attachment: | patch-layer-list-lifecycle-fix-destroy-calling-hide.patch added |
---|
comment:12 by , 9 years ago
The root cause is that ToggleDialog does not manage it's lifecycle in a clean way. Instead, hideNotify() and showNotify() are called in places where they might be useful.
In this case, destroy() calls hideNotify() without checking if the dialog is currently shown. Fixing this would solve this problem for now but we do not know if there are more issues in the existing code.
Until now, this was not a problem and every plugin (hopefully) just ignored multiple calls to those methods. This is what the quick fix is doing - ignoring it again for LayerListDialog.
I already started on designing a new state model. We currently have 4 states for the dialog:
- HIDDEN
- DOCKED
- COLLAPSED
- DETACHED
We can replace the isDocked/isShowing/isCollapsed properties by a state enum. Then we add a setState(...) method. That way, this method can do all state handling in a clean way.
I do not want to do this in the next weeks because I'll have enough time to work on getting all those deprecated warnings and getting the new bug report dialog going but I can do it afterwards.
comment:13 by , 9 years ago
And I was able to reproduce the issue:
- Start JOSM
- Download an area in OSM
- Make sure layer dialog is not visible (close it)
- Exit JOSM using File->Exit
comment:14 by , 9 years ago
Keywords: | regression added |
---|
update to JOSM 10301