Modify

Opened 2 years ago

Closed 2 years ago

#22683 closed defect (fixed)

IllegalArgumentException: Listener was already added

Reported by: breia.velarde@… Owned by: taylor.smock
Priority: normal Milestone:
Component: Plugin mapwithai Version:
Keywords: Cc:

Description

URL:https://josm.openstreetmap.de/svn/trunk
Repository:UUID: 0c6e7542-c601-0410-84e7-c038aed88b3b
Last:Changed Date: 2023-01-03 21:28:24 +0100 (Tue, 03 Jan 2023)
Build-Date:2023-01-04 02:30:56
Revision:18622
Relative:URL: ^/trunk

Identification: JOSM/1.5 (18622 en) Mac OS X 13.1
OS Build number: macOS 13.1 (22C65)
Memory Usage: 1563 MB / 3641 MB (410 MB allocated, but free)
Java version: 1.8.0_361-b09, Oracle Corporation, Java HotSpot(TM) 64-Bit Server VM
Look and Feel: com.formdev.flatlaf.FlatDarkLaf
Screen: Display 1 1440×900 (scaling 1.00×1.00) Display 2 1920×1080 (scaling 1.00×1.00)
Maximum Screen Size: 1920×1080
Best cursor sizes: 16×16→16×16, 32×32→32×32
System property file.encoding: UTF-8
System property sun.jnu.encoding: UTF-8
Locale info: en_US
Numbers with default locale: 1234567890 -> 1234567890
VM arguments: [-Djava.security.policy=file:<java.home>/lib/security/javaws.policy, -DtrustProxy=true, -Djnlpx.home=<java.home>/bin, -Djava.security.manager, -Djnlpx.origFilenameArg=${HOME}/Library/Application Support/Oracle/Java/Deployment/cache/6.0/56/1ee8cfb8-1e6a7001, -Djnlpx.remove=false, -Dsun.awt.warmup=true, -Djava.util.Arrays.useLegacyMergeSort=true, -Dmacosx.jnlpx.dock.name=JOSM, -Dmacosx.jnlpx.dock.icon=${HOME}/Library/Application Support/Oracle/Java/Deployment/cache/6.0/25/4c122699-75542ca7.icns, -Djnlp.application.href=https://josm.openstreetmap.de/download/josm.jnlp , -Djnlpx.jvm="<java.home>/bin/java"]
Dataset consistency test: No problems found

Plugins:
+ FastDraw (35978)
+ Mapillary (2.1.1)
+ apache-commons (36034)
+ apache-http (35924)
+ auto_tools (81)
+ buildings_tools (36011)
+ changessum (v0.1.1)
+ flatlaf (36036)
+ graphview (36011)
+ jna (36005)
+ mapwithai (v1.10.3)
+ markseen (14)
+ measurement (35978)
+ osm-obj-info (66)
+ reverter (36043)
+ scripting
+ undelete (36011)
+ utilsplugin2 (36011)

Tagging presets:
+ ${HOME}/Desktop/Sneffels/FB_presets.max.xml

Map paint styles:
+ ${HOME}/Desktop/Sneffels/FB_style.mapcss
+ https://josm.openstreetmap.de/josmfile?page=Styles/MapWithAI&zip=1
- ${HOME}/Desktop/Sneffels/rainbow_roads.mapcss
- https://josm.openstreetmap.de/josmfile?page=Styles/Coloured_Streets&zip=1
- https://raw.githubusercontent.com/KaartGroup/Kaart-Styles/master/Kaart-Styles.mapcss
- ${HOME}/Desktop/Sneffels/Gembvelarde.mapcss
+ https://raw.githubusercontent.com/KaartGroup/Kaart-Styles/master/Overlapping%20Ways.mapcss
- ${HOME}/Downloads/applepaintstyles-main (1).zip
- https://raw.githubusercontent.com/KaartGroup/Kaart-Styles/master/Kaart_QC_Mexico.mapcss

Validator rules:
+ https://raw.githubusercontent.com/KaartGroup/KaartValidator/master/kaart.durazno.validator.mapcss
+ ${HOME}/Desktop/Sneffels/FB_rules5.14.validator.mapcss

Last errors/warnings:
- 00012.349 E: Failed to locate image ''
- 00012.354 W: Mappaint style "standard" (Gembvelarde) icon "" not found.
- 00014.361 W: Plugin scripting requires Java version 11. The current Java version is 8. You have to update Java in order to use this plugin.
- 00015.136 E: Skipping to the next rule, because of an error:
- 00015.461 E: org.openstreetmap.josm.gui.mappaint.mapcss.parsergen.ParseException: Encountered " "{" "{ "" at line 18, column 130.
- 00015.890 E: Failed to locate image 'MapWithAI'
- 00029.702 W: Proposed rect has such extreme aspect ratio that it would be zero-width at preferredZoom
- 00117.409 E: Handled by bug report queue: java.lang.IllegalArgumentException: java.lang.IllegalArgumentException: Listener org.openstreetmap.josm.plugins.mapwithai.backend.BoundingBoxMapWithAIDownloader$$Lambda$1497/30520430@2d810d8d (instance of org.openstreetmap.josm.plugins.mapwithai.backend.BoundingBoxMapWithAIDownloader$$Lambda$1497/30520430) was already registered.. Cause: java.lang.IllegalArgumentException: Listener org.openstreetmap.josm.plugins.mapwithai.backend.BoundingBoxMapWithAIDownloader$$Lambda$1497/30520430@2d810d8d (instance of org.openstreetmap.josm.plugins.mapwithai.backend.BoundingBoxMapWithAIDownloader$$Lambda$1497/30520430) was already registered.
- 00130.036 E: Thread main-worker-0 raised java.lang.IllegalArgumentException: java.lang.IllegalArgumentException: Listener org.openstreetmap.josm.plugins.mapwithai.backend.BoundingBoxMapWithAIDownloader$$Lambda$1497/30520430@2d810d8d (instance of org.openstreetmap.josm.plugins.mapwithai.backend.BoundingBoxMapWithAIDownloader$$Lambda$1497/30520430) was already registered.
- 00130.040 E: Handled by bug report queue: java.lang.IllegalArgumentException: java.lang.IllegalArgumentException: Listener org.openstreetmap.josm.plugins.mapwithai.backend.BoundingBoxMapWithAIDownloader$$Lambda$1497/30520430@2d810d8d (instance of org.openstreetmap.josm.plugins.mapwithai.backend.BoundingBoxMapWithAIDownloader$$Lambda$1497/30520430) was already registered.. Cause: java.lang.IllegalArgumentException: Listener org.openstreetmap.josm.plugins.mapwithai.backend.BoundingBoxMapWithAIDownloader$$Lambda$1497/30520430@2d810d8d (instance of org.openstreetmap.josm.plugins.mapwithai.backend.BoundingBoxMapWithAIDownloader$$Lambda$1497/30520430) was already registered.



=== REPORTED CRASH DATA ===
BugReportExceptionHandler#handleException:
No data collected.

Warning issued by: BugReportExceptionHandler#handleException

=== STACK TRACE ===
Thread: AWT-EventQueue-2 (53) of javawsApplicationThreadGroup
java.lang.IllegalArgumentException: java.lang.IllegalArgumentException: Listener org.openstreetmap.josm.plugins.mapwithai.backend.BoundingBoxMapWithAIDownloader$$Lambda$1497/30520430@2d810d8d (instance of org.openstreetmap.josm.plugins.mapwithai.backend.BoundingBoxMapWithAIDownloader$$Lambda$1497/30520430) was already registered.
	at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
	at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62)
	at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
	at java.lang.reflect.Constructor.newInstance(Constructor.java:423)
	at java.util.concurrent.ForkJoinTask.getThrowableException(ForkJoinTask.java:593)
	at java.util.concurrent.ForkJoinTask.reportException(ForkJoinTask.java:677)
	at java.util.concurrent.ForkJoinTask.join(ForkJoinTask.java:720)
	at org.openstreetmap.josm.plugins.mapwithai.actions.AddMapWithAILayerAction.actionPerformed(AddMapWithAILayerAction.java:116)
	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.AbstractButton.doClick(AbstractButton.java:376)
	at com.apple.laf.ScreenMenuItem.actionPerformed(ScreenMenuItem.java:125)
	at java.awt.MenuItem.processActionEvent(MenuItem.java:669)
	at java.awt.MenuItem.processEvent(MenuItem.java:628)
	at java.awt.MenuComponent.dispatchEventImpl(MenuComponent.java:357)
	at java.awt.MenuComponent.dispatchEvent(MenuComponent.java:345)
	at java.awt.EventQueue.dispatchEventImpl(EventQueue.java:763)
	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:74)
	at java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:84)
	at java.awt.EventQueue$4.run(EventQueue.java:733)
	at java.awt.EventQueue$4.run(EventQueue.java:731)
	at java.security.AccessController.doPrivileged(Native Method)
	at java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:74)
	at java.awt.EventQueue.dispatchEvent(EventQueue.java:730)
	at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:205)
	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)
Caused by: java.lang.IllegalArgumentException: Listener org.openstreetmap.josm.plugins.mapwithai.backend.BoundingBoxMapWithAIDownloader$$Lambda$1497/30520430@2d810d8d (instance of org.openstreetmap.josm.plugins.mapwithai.backend.BoundingBoxMapWithAIDownloader$$Lambda$1497/30520430) was already registered.
	at org.openstreetmap.josm.tools.ListenerList.failAdd(ListenerList.java:110)
	at org.openstreetmap.josm.tools.ListenerList.ensureNotInList(ListenerList.java:101)
	at org.openstreetmap.josm.tools.ListenerList.addListener(ListenerList.java:93)
	at org.openstreetmap.josm.plugins.mapwithai.data.mapwithai.MapWithAILayerInfo.loadDefaults(MapWithAILayerInfo.java:222)
	at org.openstreetmap.josm.plugins.mapwithai.backend.BoundingBoxMapWithAIDownloader.parseOsm(BoundingBoxMapWithAIDownloader.java:159)
	at org.openstreetmap.josm.plugins.mapwithai.backend.MapWithAIDataUtils.lambda$download$6(MapWithAIDataUtils.java:171)
	at java.util.concurrent.ForkJoinTask$AdaptedCallable.exec(ForkJoinTask.java:1424)
	at java.util.concurrent.ForkJoinTask.doExec(ForkJoinTask.java:289)
	at java.util.concurrent.ForkJoinPool$WorkQueue.runTask(ForkJoinPool.java:1067)
	at java.util.concurrent.ForkJoinPool.runWorker(ForkJoinPool.java:1703)
	at java.util.concurrent.ForkJoinWorkerThread.run(ForkJoinWorkerThread.java:172)

=== ADDITIONAL EXCEPTIONS ===
==== Exception at 1674757574733 ====
java.lang.IllegalArgumentException: java.lang.IllegalArgumentException: Listener org.openstreetmap.josm.plugins.mapwithai.backend.BoundingBoxMapWithAIDownloader$$Lambda$1497/30520430@2d810d8d (instance of org.openstreetmap.josm.plugins.mapwithai.backend.BoundingBoxMapWithAIDownloader$$Lambda$1497/30520430) was already registered.
	at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
	at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62)
	at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
	at java.lang.reflect.Constructor.newInstance(Constructor.java:423)
	at java.util.concurrent.ForkJoinTask.getThrowableException(ForkJoinTask.java:593)
	at java.util.concurrent.ForkJoinTask.reportException(ForkJoinTask.java:677)
	at java.util.concurrent.ForkJoinTask.join(ForkJoinTask.java:720)
	at org.openstreetmap.josm.plugins.mapwithai.backend.GetDataRunnable.getDataReal(GetDataRunnable.java:701)
	at org.openstreetmap.josm.plugins.mapwithai.backend.GetDataRunnable.compute(GetDataRunnable.java:220)
	at org.openstreetmap.josm.plugins.mapwithai.backend.BoundingBoxMapWithAIDownloader.lambda$parseOsm$3(BoundingBoxMapWithAIDownloader.java:183)
	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
	at java.lang.Thread.run(Thread.java:750)
Caused by: java.lang.IllegalArgumentException: Listener org.openstreetmap.josm.plugins.mapwithai.backend.BoundingBoxMapWithAIDownloader$$Lambda$1497/30520430@2d810d8d (instance of org.openstreetmap.josm.plugins.mapwithai.backend.BoundingBoxMapWithAIDownloader$$Lambda$1497/30520430) was already registered.
	at org.openstreetmap.josm.tools.ListenerList.failAdd(ListenerList.java:110)
	at org.openstreetmap.josm.tools.ListenerList.ensureNotInList(ListenerList.java:101)
	at org.openstreetmap.josm.tools.ListenerList.addListener(ListenerList.java:93)
	at org.openstreetmap.josm.plugins.mapwithai.data.mapwithai.MapWithAILayerInfo.loadDefaults(MapWithAILayerInfo.java:222)
	at org.openstreetmap.josm.plugins.mapwithai.backend.BoundingBoxMapWithAIDownloader.parseOsm(BoundingBoxMapWithAIDownloader.java:159)
	at org.openstreetmap.josm.plugins.mapwithai.backend.MapWithAIDataUtils.lambda$download$6(MapWithAIDataUtils.java:171)
	at java.util.concurrent.ForkJoinTask$AdaptedCallable.exec(ForkJoinTask.java:1424)
	at java.util.concurrent.ForkJoinTask.doExec(ForkJoinTask.java:289)
	at java.util.concurrent.ForkJoinPool$WorkQueue.runTask(ForkJoinPool.java:1067)
	at java.util.concurrent.ForkJoinPool.runWorker(ForkJoinPool.java:1703)
	at java.util.concurrent.ForkJoinWorkerThread.run(ForkJoinWorkerThread.java:172)

Attachments (0)

Change History (2)

comment:1 by taylor.smock, 2 years ago

Summary: Layers repeatedly added to the menu, asking to update plugin despite latest version already availableIllegalArgumentException: Listener was already added

I don't know if fixing the exception will fix the issue with layers being repeated added to the menu, but stack trace looks like this was due to a fix I implemented for a different problem, where the cached server URL was wrong for an Esri source.

Anyway, I've got a few quick fixes, and you probably won't run into this same problem for a week or two (until Esri rotates server information again).

comment:2 by taylor.smock, 2 years ago

Resolution: fixed
Status: newclosed

A release with the fix should be out today.

Modify Ticket

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