#13464 closed defect (fixed)
Fast draw plugin does not enter map mode.
Reported by: | michael2402 | Owned by: | akks |
---|---|---|---|
Priority: | critical | Milestone: | |
Component: | Plugin FastDraw | Version: | |
Keywords: | template_report regression gsoc-core | Cc: | mcheck, danielnepomuceno@…, eladner |
Description
What steps will reproduce the problem?
- Cannot reproduce
Fix
Somehow I triggered this line in enterMapMode
if (!isEnabled()) return;
The whole state is inconsistent afterwards. This line should be removed.
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-08-25 23:21:10 +0200 (Thu, 25 Aug 2016) Build-Date:2016-08-26 01:33:11 Revision:10899 Relative:URL: ^/trunk Identification: JOSM/1.5 (10899 de) Linux Ubuntu 12.04.5 LTS Memory Usage: 418 MB / 857 MB (263 MB allocated, but free) Java version: 1.8.0_25-b17, Oracle Corporation, Java HotSpot(TM) 64-Bit Server VM Dataset consistency test: No problems found Plugins: + FastDraw (32773) + HouseNumberTaggingTool (32699) + OpeningHoursEditor (32699) + buildings_tools (32796) + graphview (32796) + josm-plugin-opengl (1440156917) + reltoolbox (32796) + turnrestrictions (32796) Map paint styles: - https://github.com/bastik/mapcss-tools/raw/osm/mapnik2mapcss/osm-results/mapnik.zip - https://josm.openstreetmap.de/josmfile?page=Styles/Lane_features&zip=1 - https://josm.openstreetmap.de/josmfile?page=Styles/Lit&zip=1 + https://josm.openstreetmap.de/josmfile?page=Styles/Lane_and_Road_Attributes&zip=1 - https://josm.openstreetmap.de/josmfile?page=Styles/Cycleways&zip=1 - https://josm.openstreetmap.de/josmfile?page=Styles/AddressValidator&zip=1 - https://josm.openstreetmap.de/josmfile?page=Styles/Landcover&zip=1 - https://josm.openstreetmap.de/josmfile?page=Styles/TreeCrownDiameter&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: 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 === REPORTED CRASH DATA === BugReport#intercept: No data collected. Warning issued by: ReportedException#warn === STACK TRACE === Thread: AWT-EventQueue-0 (17) of main java.lang.IllegalArgumentException: Listener org.openstreetmap.josm.plugins.fastdraw.FastDrawingMode@7406d2c8 (instance of org.openstreetmap.josm.plugins.fastdraw.FastDrawingMode) was not registered before or already removed. at org.openstreetmap.josm.tools.ListenerList.failRemove(ListenerList.java:129) at org.openstreetmap.josm.tools.ListenerList$TracingListenerList.failRemove(ListenerList.java:206) at org.openstreetmap.josm.tools.ListenerList.removeListener(ListenerList.java:123) at org.openstreetmap.josm.tools.ListenerList$TracingListenerList.removeListener(ListenerList.java:190) at org.openstreetmap.josm.data.Preferences.removePreferenceChangeListener(Preferences.java:240) at org.openstreetmap.josm.actions.mapmode.MapMode.exitMode(MapMode.java:78) at org.openstreetmap.josm.plugins.fastdraw.FastDrawingMode.exitMode(FastDrawingMode.java:119) at org.openstreetmap.josm.gui.MapFrame.selectMapMode(MapFrame.java:450) at org.openstreetmap.josm.gui.MapFrame.selectMapMode(MapFrame.java:432) at org.openstreetmap.josm.gui.MapFrame.selectSelectTool(MapFrame.java:305) at org.openstreetmap.josm.plugins.fastdraw.FastDrawingMode.saveAsWay(FastDrawingMode.java:606) at org.openstreetmap.josm.plugins.fastdraw.FastDrawingMode.doKeyPressed(FastDrawingMode.java:439) at org.openstreetmap.josm.gui.util.AdvancedKeyPressDetector.processKeyEvent(AdvancedKeyPressDetector.java:128) at org.openstreetmap.josm.gui.util.AdvancedKeyPressDetector.eventDispatched(AdvancedKeyPressDetector.java:168) at java.awt.Toolkit$SelectiveAWTEventListener.eventDispatched(Toolkit.java:2425) at java.awt.Toolkit$ToolkitEventMulticaster.eventDispatched(Toolkit.java:2317) at java.awt.Toolkit$ToolkitEventMulticaster.eventDispatched(Toolkit.java:2316) at java.awt.Toolkit.notifyAWTEventListeners(Toolkit.java:2275) at java.awt.Component.dispatchEventImpl(Component.java:4777) at java.awt.Container.dispatchEventImpl(Container.java:2292) at java.awt.Component.dispatchEvent(Component.java:4703) at java.awt.KeyboardFocusManager.redispatchEvent(KeyboardFocusManager.java:1954) at java.awt.DefaultKeyboardFocusManager.dispatchKeyEvent(DefaultKeyboardFocusManager.java:806) at java.awt.DefaultKeyboardFocusManager.preDispatchKeyEvent(DefaultKeyboardFocusManager.java:1074) at java.awt.DefaultKeyboardFocusManager.typeAheadAssertions(DefaultKeyboardFocusManager.java:945) at java.awt.DefaultKeyboardFocusManager.dispatchEvent(DefaultKeyboardFocusManager.java:771) at java.awt.Component.dispatchEventImpl(Component.java:4752) at java.awt.Container.dispatchEventImpl(Container.java:2292) at java.awt.Window.dispatchEventImpl(Window.java:2739) at java.awt.Component.dispatchEvent(Component.java:4703) at java.awt.EventQueue.dispatchEventImpl(EventQueue.java:746) at java.awt.EventQueue.access$400(EventQueue.java:97) at java.awt.EventQueue$3.run(EventQueue.java:697) at java.awt.EventQueue$3.run(EventQueue.java:691) at java.security.AccessController.doPrivileged(Native Method) at java.security.ProtectionDomain$1.doIntersectionPrivilege(ProtectionDomain.java:75) at java.security.ProtectionDomain$1.doIntersectionPrivilege(ProtectionDomain.java:86) at java.awt.EventQueue$4.run(EventQueue.java:719) at java.awt.EventQueue$4.run(EventQueue.java:717) at java.security.AccessController.doPrivileged(Native Method) at java.security.ProtectionDomain$1.doIntersectionPrivilege(ProtectionDomain.java:75) at java.awt.EventQueue.dispatchEvent(EventQueue.java:716) 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)
Change History (36)
comment:1 by , 8 years ago
Component: | Core → Plugin FastDraw |
---|---|
Owner: | changed from | to
Summary: | Fehler in → Fast draw plugin does not enter map mode. |
comment:2 by , 8 years ago
comment:8 by , 8 years ago
Priority: | normal → critical |
---|
comment:14 by , 8 years ago
Keywords: | regression gsoc-core added |
---|
comment:16 by , 8 years ago
Cc: | added |
---|
comment:18 by , 8 years ago
Resolution: | fixed |
---|---|
Status: | closed → reopened |
Right:
Build-Date:2016-09-07 00:39:11 Revision:10971 Is-Local-Build:true Identification: JOSM/1.5 (10971 SVN fr) Windows 10 64-Bit Memory Usage: 556 MB / 3634 MB (262 MB allocated, but free) Java version: 1.8.0_102-b14, Oracle Corporation, Java HotSpot(TM) 64-Bit Server VM Screen: \Display0 1920x1080, \Display1 1920x1080, \Display2 1280x1024 Maximum Screen Size: 1920x1080 VM arguments: [-Dfile.encoding=UTF-8] Program arguments: [--debug] Dataset consistency test: No problems found Plugins: + FastDraw (32930) === REPORTED CRASH DATA === BugReportExceptionHandler#handleException: No data collected. Warning issued by: BugReportExceptionHandler#handleException === STACK TRACE === Thread: AWT-EventQueue-0 (19) of main java.lang.IllegalArgumentException: Listener org.openstreetmap.josm.plugins.fastdraw.FastDrawingMode@5c0d5558 (instance of org.openstreetmap.josm.plugins.fastdraw.FastDrawingMode) was not registered before or already removed. at org.openstreetmap.josm.tools.ListenerList.failRemove(ListenerList.java:128) at org.openstreetmap.josm.tools.ListenerList$TracingListenerList.failRemove(ListenerList.java:206) at org.openstreetmap.josm.tools.ListenerList.removeListener(ListenerList.java:123) at org.openstreetmap.josm.tools.ListenerList$TracingListenerList.removeListener(ListenerList.java:190) at org.openstreetmap.josm.data.Preferences.removePreferenceChangeListener(Preferences.java:238) at org.openstreetmap.josm.actions.mapmode.MapMode.exitMode(MapMode.java:78) at org.openstreetmap.josm.plugins.fastdraw.FastDrawingMode.exitMode(FastDrawingMode.java:118) at org.openstreetmap.josm.gui.MapFrame.selectMapMode(MapFrame.java:450) at org.openstreetmap.josm.gui.MapFrame.selectMapMode(MapFrame.java:432) at org.openstreetmap.josm.gui.MapFrame.selectSelectTool(MapFrame.java:305) at org.openstreetmap.josm.plugins.fastdraw.FastDrawingMode.doKeyPressed(FastDrawingMode.java:470) at org.openstreetmap.josm.gui.util.AdvancedKeyPressDetector.processKeyEvent(AdvancedKeyPressDetector.java:128) at org.openstreetmap.josm.gui.util.AdvancedKeyPressDetector.eventDispatched(AdvancedKeyPressDetector.java:168) at java.awt.Toolkit$SelectiveAWTEventListener.eventDispatched(Toolkit.java:2425) at java.awt.Toolkit$ToolkitEventMulticaster.eventDispatched(Toolkit.java:2317) at java.awt.Toolkit$ToolkitEventMulticaster.eventDispatched(Toolkit.java:2316) at java.awt.Toolkit.notifyAWTEventListeners(Toolkit.java:2275) at java.awt.Component.dispatchEventImpl(Component.java:4785) at java.awt.Container.dispatchEventImpl(Container.java:2294) at java.awt.Component.dispatchEvent(Component.java:4711) at java.awt.KeyboardFocusManager.redispatchEvent(KeyboardFocusManager.java:1954) at java.awt.DefaultKeyboardFocusManager.dispatchKeyEvent(DefaultKeyboardFocusManager.java:806) at java.awt.DefaultKeyboardFocusManager.preDispatchKeyEvent(DefaultKeyboardFocusManager.java:1074) at java.awt.DefaultKeyboardFocusManager.typeAheadAssertions(DefaultKeyboardFocusManager.java:945) at java.awt.DefaultKeyboardFocusManager.dispatchEvent(DefaultKeyboardFocusManager.java:771) at java.awt.Component.dispatchEventImpl(Component.java:4760) 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)
Michael, can you please help me to fix this one?
comment:19 by , 8 years ago
Seems I never used it far enough to hit RETURN twice ;-) (and I stopped searching after the first possible error I found).
This is where the listener is removed first (Use --trace
to enable this tracing):
AM FEINSTEN: org.openstreetmap.josm.tools.ListenerList$TracingListenerList.removeListener line 192 AM FEINSTEN: org.openstreetmap.josm.data.Preferences.removePreferenceChangeListener line 238 AM FEINSTEN: org.openstreetmap.josm.actions.mapmode.MapMode.exitMode line 78 AM FEINSTEN: org.openstreetmap.josm.plugins.fastdraw.FastDrawingMode.exitMode line 119 AM FEINSTEN: org.openstreetmap.josm.plugins.fastdraw.FastDrawingMode.saveAsWay line 604 AM FEINSTEN: org.openstreetmap.josm.plugins.fastdraw.FastDrawingMode.doKeyPressed line 439 AM FEINSTEN: org.openstreetmap.josm.gui.util.AdvancedKeyPressDetector.processKeyEvent line 128 AM FEINSTEN: org.openstreetmap.josm.gui.util.AdvancedKeyPressDetector.eventDispatched line 168 AM FEINSTEN: java.awt.Toolkit$SelectiveAWTEventListener.eventDispatched line 2425 AM FEINSTEN: java.awt.Toolkit$ToolkitEventMulticaster.eventDispatched line 2317
The problem seems that saveAsWay
calls exitMode
. This is then called in Main.map.selectSelectTool
once again. The first exitMode
should be removed (I'll have to check for side effects...)
I can try testing a fix and creating a patch tomorrow.
One note: You can add a .cached()
to the ColorProperty
s. It won't change much in this situation, but it makes drawing much faster when you do a get()
in a loop.
by , 8 years ago
Attachment: | fix-13464.patch added |
---|
Fix fast drawing: It should not call exitMode().
comment:20 by , 8 years ago
I found two places where exitMode
was called. The plugin works fine without them.
comment:21 by , 8 years ago
I don't think the exitMode call is the problem -- it needs to unregister its own listeners that were registered in enterMode, right? It's complaining that it's trying to remove a PreferenceChangeListener that doesn't exist (even though the super.enterMode() to the MapMode class should have registered it).
If I recall, this error has been occurring for maybe a week. I haven't been able to trace back changes to all the related files (my Trac foo isn't that strong).
Possibly expand the search to related classes like Preferences and ListenerList?
comment:22 by , 8 years ago
comment:23 by , 8 years ago
Understand, but the FastDraw code's previous change was 5 months ago and I know it's worked since then.
Other possibilities in related recent changes, if that doesn't pan out:
Preference.java
ListenerList.java
comment:24 by , 8 years ago
Ah, ok. I just caught the note about enforcement in [10824]. Ignore the extra info...
similar reports: #13532, #13539