Opened 10 months ago
Closed 10 months ago
#23399 closed defect (fixed)
Simplify ways crashes
Reported by: | GerdP | Owned by: | team |
---|---|---|---|
Priority: | normal | Milestone: | 23.12 |
Component: | Core | Version: | |
Keywords: | template_report | Cc: |
Description (last modified by )
What steps will reproduce the problem?
- load attached file
- press Ctrl-A to select all elements
- press Shift+Y to simplify
What is the expected result?
Popup dialog which asks for the maximum error
What happens instead?
Crash report is shown, ways are simplified with the last used (or default maximum error)
Please provide any additional information below. Attach a screenshot if possible.
This doesn't happen when I only select the ways, then the dialog shows 0.5 m as max error, but I thought that should not matter. Can also reproduce this with larger error values like 20 m.
Relative:URL: ^/trunk Repository:UUID: 0c6e7542-c601-0410-84e7-c038aed88b3b Last:Changed Date: 2023-12-07 13:35:12 +0100 (Thu, 07 Dec 2023) Revision:18907 Build-Date:2023-12-07 16:38:49 URL:https://josm.openstreetmap.de/svn/trunk Identification: JOSM/1.5 (18907 en) Windows 10 64-Bit OS Build number: Windows 10 Home 2009 (19045) Memory Usage: 652 MB / 2016 MB (217 MB allocated, but free) Java version: 17.0.5+8-LTS, Azul Systems, Inc., OpenJDK 64-Bit Server VM Look and Feel: com.sun.java.swing.plaf.windows.WindowsLookAndFeel Screen: \Display0 1920×1080 (scaling 1.50×1.50) Maximum Screen Size: 1920×1080 Best cursor sizes: 16×16→48×48, 32×32→48×48 System property file.encoding: Cp1252 System property sun.jnu.encoding: Cp1252 Locale info: en_DE Numbers with default locale: 1234567890 -> 1234567890 VM arguments: [-Dsun.java2d.uiScale=1.5, -Djpackage.app-version=1.5.18622, --add-modules=java.scripting,java.sql,javafx.controls,javafx.media,javafx.swing,javafx.web, --add-exports=java.base/sun.security.action=ALL-UNNAMED, --add-exports=java.desktop/com.sun.imageio.plugins.jpeg=ALL-UNNAMED, --add-exports=java.desktop/com.sun.imageio.spi=ALL-UNNAMED, --add-opens=java.base/java.lang=ALL-UNNAMED, --add-opens=java.base/java.nio=ALL-UNNAMED, --add-opens=java.base/jdk.internal.loader=ALL-UNNAMED, --add-opens=java.base/jdk.internal.ref=ALL-UNNAMED, --add-opens=java.desktop/javax.imageio.spi=ALL-UNNAMED, --add-opens=java.desktop/javax.swing.text.html=ALL-UNNAMED, --add-opens=java.prefs/java.util.prefs=ALL-UNNAMED, -Djpackage.app-path=%UserProfile%\AppData\Local\JOSM\HWConsole.exe] Dataset consistency test: No problems found Plugins: + OpeningHoursEditor (36196) + buildings_tools (36200) + measurement (36200) + o5m (36126) + poly (36126) + reverter (36196) + undelete (36126) + utilsplugin2 (36200) Tagging presets: + d:\josm\core\resources\data\defaultpresets.xml Last errors/warnings: - 00000.837 W: extended font config - overriding 'filename.Myanmar_Text=mmrtext.ttf' with 'MMRTEXT.TTF' - 00000.841 W: extended font config - overriding 'filename.Mongolian_Baiti=monbaiti.ttf' with 'MONBAITI.TTF' - 00001.732 E: java.security.KeyStoreException: Windows-ROOT not found. Cause: java.security.NoSuchAlgorithmException: Windows-ROOT KeyStore not available - 00051.162 E: Handled by bug report queue: java.util.ConcurrentModificationException - 00120.983 E: Handled by bug report queue: java.util.ConcurrentModificationException - 00281.817 E: Handled by bug report queue: java.util.ConcurrentModificationException - 00309.189 E: Handled by bug report queue: java.util.ConcurrentModificationException === REPORTED CRASH DATA === BugReportExceptionHandler#handleException: No data collected. Warning issued by: BugReportExceptionHandler#handleException === STACK TRACE === Thread: AWT-EventQueue-0 (22) of main java.util.ConcurrentModificationException at java.base/java.util.ArrayList$ArrayListSpliterator.forEachRemaining(Unknown Source) at java.base/java.util.stream.AbstractPipeline.copyInto(Unknown Source) at java.base/java.util.stream.AbstractPipeline.wrapAndCopyInto(Unknown Source) at java.base/java.util.stream.ReduceOps$ReduceOp.evaluateSequential(Unknown Source) at java.base/java.util.stream.AbstractPipeline.evaluate(Unknown Source) at java.base/java.util.stream.ReferencePipeline.collect(Unknown Source) at org.openstreetmap.josm.actions.SimplifyWayAction.buildSimplifyWaysCommand(SimplifyWayAction.java:346) at org.openstreetmap.josm.actions.SimplifyWayAction.simplifyWaysCountNodesRemoved(SimplifyWayAction.java:311) at org.openstreetmap.josm.actions.SimplifyWayAction$SimplifyChangeListener.stateChanged(SimplifyWayAction.java:542) at org.openstreetmap.josm.actions.SimplifyWayAction.lambda$askSimplifyWays$4(SimplifyWayAction.java:189) at org.openstreetmap.josm.actions.SimplifyWayAction$SimplifyWayDataSelectionListener.lambda$updateWayList$1(SimplifyWayAction.java:577) at org.openstreetmap.josm.gui.util.GuiHelper.runInEDT(GuiHelper.java:200) at org.openstreetmap.josm.actions.SimplifyWayAction$SimplifyWayDataSelectionListener.updateWayList(SimplifyWayAction.java:577) at org.openstreetmap.josm.actions.SimplifyWayAction$SimplifyWayDataSelectionListener.selectionChanged(SimplifyWayAction.java:567) at org.openstreetmap.josm.data.osm.DataSet.lambda$doSelectionChange$15(DataSet.java:833) at org.openstreetmap.josm.tools.ListenerList.fireEvent(ListenerList.java:155) at org.openstreetmap.josm.data.osm.DataSet.doSelectionChange(DataSet.java:833) at org.openstreetmap.josm.data.osm.DataSet.clearSelection(DataSet.java:799) at org.openstreetmap.josm.data.osm.DataSet.clearSelection(DataSet.java:790) at org.openstreetmap.josm.actions.SimplifyWayAction.createSimplifyCommand(SimplifyWayAction.java:420) at org.openstreetmap.josm.actions.SimplifyWayAction.lambda$buildSimplifyWaysCommand$8(SimplifyWayAction.java:344) at java.base/java.util.stream.ReferencePipeline$3$1.accept(Unknown Source) at java.base/java.util.ArrayList$ArrayListSpliterator.forEachRemaining(Unknown Source) at java.base/java.util.stream.AbstractPipeline.copyInto(Unknown Source) at java.base/java.util.stream.AbstractPipeline.wrapAndCopyInto(Unknown Source) at java.base/java.util.stream.ReduceOps$ReduceOp.evaluateSequential(Unknown Source) at java.base/java.util.stream.AbstractPipeline.evaluate(Unknown Source) at java.base/java.util.stream.ReferencePipeline.collect(Unknown Source) at org.openstreetmap.josm.actions.SimplifyWayAction.buildSimplifyWaysCommand(SimplifyWayAction.java:346) at org.openstreetmap.josm.actions.SimplifyWayAction.simplifyWaysCountNodesRemoved(SimplifyWayAction.java:311) at org.openstreetmap.josm.actions.SimplifyWayAction$SimplifyChangeListener.stateChanged(SimplifyWayAction.java:542) at org.openstreetmap.josm.actions.SimplifyWayAction.lambda$askSimplifyWays$4(SimplifyWayAction.java:189) at org.openstreetmap.josm.actions.SimplifyWayAction$SimplifyWayDataSelectionListener.lambda$updateWayList$1(SimplifyWayAction.java:577) at org.openstreetmap.josm.gui.util.GuiHelper.runInEDT(GuiHelper.java:200) at org.openstreetmap.josm.actions.SimplifyWayAction$SimplifyWayDataSelectionListener.updateWayList(SimplifyWayAction.java:577) at org.openstreetmap.josm.actions.SimplifyWayAction$SimplifyWayDataSelectionListener.selectionChanged(SimplifyWayAction.java:567) at org.openstreetmap.josm.data.osm.DataSet.lambda$doSelectionChange$15(DataSet.java:833) at org.openstreetmap.josm.tools.ListenerList.fireEvent(ListenerList.java:155) at org.openstreetmap.josm.data.osm.DataSet.doSelectionChange(DataSet.java:833) at org.openstreetmap.josm.data.osm.DataSet.clearSelection(DataSet.java:799) at org.openstreetmap.josm.data.osm.DataSet.clearSelection(DataSet.java:790) at org.openstreetmap.josm.actions.SimplifyWayAction.createSimplifyCommand(SimplifyWayAction.java:420) at org.openstreetmap.josm.actions.SimplifyWayAction.lambda$buildSimplifyWaysCommand$8(SimplifyWayAction.java:344) at java.base/java.util.stream.ReferencePipeline$3$1.accept(Unknown Source) at java.base/java.util.ArrayList$ArrayListSpliterator.forEachRemaining(Unknown Source) at java.base/java.util.stream.AbstractPipeline.copyInto(Unknown Source) at java.base/java.util.stream.AbstractPipeline.wrapAndCopyInto(Unknown Source) at java.base/java.util.stream.ReduceOps$ReduceOp.evaluateSequential(Unknown Source) at java.base/java.util.stream.AbstractPipeline.evaluate(Unknown Source) at java.base/java.util.stream.ReferencePipeline.collect(Unknown Source) at org.openstreetmap.josm.actions.SimplifyWayAction.buildSimplifyWaysCommand(SimplifyWayAction.java:346) at org.openstreetmap.josm.actions.SimplifyWayAction.simplifyWaysCountNodesRemoved(SimplifyWayAction.java:311) at org.openstreetmap.josm.actions.SimplifyWayAction$SimplifyChangeListener.stateChanged(SimplifyWayAction.java:542) at org.openstreetmap.josm.actions.SimplifyWayAction.lambda$askSimplifyWays$4(SimplifyWayAction.java:189) at org.openstreetmap.josm.actions.SimplifyWayAction$SimplifyWayDataSelectionListener.lambda$updateWayList$1(SimplifyWayAction.java:577) at org.openstreetmap.josm.gui.util.GuiHelper.runInEDT(GuiHelper.java:200) at org.openstreetmap.josm.actions.SimplifyWayAction$SimplifyWayDataSelectionListener.updateWayList(SimplifyWayAction.java:577) at org.openstreetmap.josm.actions.SimplifyWayAction$SimplifyWayDataSelectionListener.selectionChanged(SimplifyWayAction.java:567) at org.openstreetmap.josm.data.osm.DataSet.lambda$doSelectionChange$15(DataSet.java:833) at org.openstreetmap.josm.tools.ListenerList.fireEvent(ListenerList.java:155) at org.openstreetmap.josm.data.osm.DataSet.doSelectionChange(DataSet.java:833) at org.openstreetmap.josm.data.osm.DataSet.clearSelection(DataSet.java:799) at org.openstreetmap.josm.data.osm.DataSet.clearSelection(DataSet.java:790) at org.openstreetmap.josm.actions.SimplifyWayAction.createSimplifyCommand(SimplifyWayAction.java:420) at org.openstreetmap.josm.actions.SimplifyWayAction.lambda$buildSimplifyWaysCommand$8(SimplifyWayAction.java:344) at java.base/java.util.stream.ReferencePipeline$3$1.accept(Unknown Source) at java.base/java.util.ArrayList$ArrayListSpliterator.forEachRemaining(Unknown Source) at java.base/java.util.stream.AbstractPipeline.copyInto(Unknown Source) at java.base/java.util.stream.AbstractPipeline.wrapAndCopyInto(Unknown Source) at java.base/java.util.stream.ReduceOps$ReduceOp.evaluateSequential(Unknown Source) at java.base/java.util.stream.AbstractPipeline.evaluate(Unknown Source) at java.base/java.util.stream.ReferencePipeline.collect(Unknown Source) at org.openstreetmap.josm.actions.SimplifyWayAction.buildSimplifyWaysCommand(SimplifyWayAction.java:346) at org.openstreetmap.josm.actions.SimplifyWayAction.simplifyWaysCountNodesRemoved(SimplifyWayAction.java:311) at org.openstreetmap.josm.actions.SimplifyWayAction$SimplifyChangeListener.stateChanged(SimplifyWayAction.java:542) at org.openstreetmap.josm.actions.SimplifyWayAction.askSimplifyWays(SimplifyWayAction.java:194) at org.openstreetmap.josm.actions.SimplifyWayAction.actionPerformed(SimplifyWayAction.java:250) at java.desktop/javax.swing.SwingUtilities.notifyAction(Unknown Source) at java.desktop/javax.swing.JComponent.processKeyBinding(Unknown Source) at java.desktop/javax.swing.KeyboardManager.fireBinding(Unknown Source) at java.desktop/javax.swing.KeyboardManager.fireKeyboardAction(Unknown Source) at java.desktop/javax.swing.JComponent.processKeyBindingsForAllComponents(Unknown Source) at java.desktop/javax.swing.JComponent.processKeyBindings(Unknown Source) at java.desktop/javax.swing.JComponent.processKeyEvent(Unknown Source) at java.desktop/java.awt.Component.processEvent(Unknown Source) at java.desktop/java.awt.Container.processEvent(Unknown Source) at java.desktop/java.awt.Component.dispatchEventImpl(Unknown Source) at java.desktop/java.awt.Container.dispatchEventImpl(Unknown Source) at java.desktop/java.awt.Component.dispatchEvent(Unknown Source) at java.desktop/java.awt.KeyboardFocusManager.redispatchEvent(Unknown Source) at java.desktop/java.awt.DefaultKeyboardFocusManager.dispatchKeyEvent(Unknown Source) at java.desktop/java.awt.DefaultKeyboardFocusManager.preDispatchKeyEvent(Unknown Source) at java.desktop/java.awt.DefaultKeyboardFocusManager.typeAheadAssertions(Unknown Source) at java.desktop/java.awt.DefaultKeyboardFocusManager.dispatchEvent(Unknown Source) at java.desktop/java.awt.Component.dispatchEventImpl(Unknown Source) at java.desktop/java.awt.Container.dispatchEventImpl(Unknown Source) at java.desktop/java.awt.Window.dispatchEventImpl(Unknown Source) at java.desktop/java.awt.Component.dispatchEvent(Unknown Source) at java.desktop/java.awt.EventQueue.dispatchEventImpl(Unknown Source) at java.desktop/java.awt.EventQueue$4.run(Unknown Source) at java.desktop/java.awt.EventQueue$4.run(Unknown Source) at java.base/java.security.AccessController.doPrivileged(Unknown Source) at java.base/java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(Unknown Source) at java.base/java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(Unknown Source) at java.desktop/java.awt.EventQueue$5.run(Unknown Source) at java.desktop/java.awt.EventQueue$5.run(Unknown Source) at java.base/java.security.AccessController.doPrivileged(Unknown Source) at java.base/java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(Unknown Source) at java.desktop/java.awt.EventQueue.dispatchEvent(Unknown Source) at java.desktop/java.awt.EventDispatchThread.pumpOneEventForFilters(Unknown Source) at java.desktop/java.awt.EventDispatchThread.pumpEventsForFilter(Unknown Source) at java.desktop/java.awt.EventDispatchThread.pumpEventsForHierarchy(Unknown Source) at java.desktop/java.awt.EventDispatchThread.pumpEvents(Unknown Source) at java.desktop/java.awt.EventDispatchThread.pumpEvents(Unknown Source) at java.desktop/java.awt.EventDispatchThread.run(Unknown Source) === RUNNING THREADS === Thread: Reference Handler (2) of system java.base@17.0.5/java.lang.ref.Reference.waitForReferencePendingList(Native Method) java.base@17.0.5/java.lang.ref.Reference.processPendingReferences(Unknown Source) java.base@17.0.5/java.lang.ref.Reference$ReferenceHandler.run(Unknown Source) Thread: Notification Thread (13) of system Thread: RemoteControl HTTP Server (48) of main java.base@17.0.5/sun.nio.ch.Net.accept(Native Method) java.base@17.0.5/sun.nio.ch.NioSocketImpl.accept(Unknown Source) java.base@17.0.5/java.net.ServerSocket.implAccept(Unknown Source) java.base@17.0.5/java.net.ServerSocket.platformImplAccept(Unknown Source) java.base@17.0.5/java.net.ServerSocket.implAccept(Unknown Source) java.base@17.0.5/java.net.ServerSocket.implAccept(Unknown Source) java.base@17.0.5/java.net.ServerSocket.accept(Unknown Source) app//org.openstreetmap.josm.io.remotecontrol.RemoteControlHttpServer.run(RemoteControlHttpServer.java:104) Thread: Java2D Disposer (16) of system java.base@17.0.5/java.lang.Object.wait(Native Method) java.base@17.0.5/java.lang.ref.ReferenceQueue.remove(Unknown Source) java.base@17.0.5/java.lang.ref.ReferenceQueue.remove(Unknown Source) java.desktop@17.0.5/sun.java2d.Disposer.run(Unknown Source) java.base@17.0.5/java.lang.Thread.run(Unknown Source) Thread: styled-map-renderer-0 (59) of main java.base@17.0.5/jdk.internal.misc.Unsafe.park(Native Method) java.base@17.0.5/java.util.concurrent.locks.LockSupport.park(Unknown Source) java.base@17.0.5/java.util.concurrent.ForkJoinPool.awaitWork(Unknown Source) java.base@17.0.5/java.util.concurrent.ForkJoinPool.runWorker(Unknown Source) java.base@17.0.5/java.util.concurrent.ForkJoinWorkerThread.run(Unknown Source) Thread: styled-map-renderer-3 (62) of main java.base@17.0.5/jdk.internal.misc.Unsafe.park(Native Method) java.base@17.0.5/java.util.concurrent.locks.LockSupport.parkUntil(Unknown Source) java.base@17.0.5/java.util.concurrent.ForkJoinPool.awaitWork(Unknown Source) java.base@17.0.5/java.util.concurrent.ForkJoinPool.runWorker(Unknown Source) java.base@17.0.5/java.util.concurrent.ForkJoinWorkerThread.run(Unknown Source) Thread: Weak reference cleaner (32) of main java.base@17.0.5/java.lang.Object.wait(Native Method) java.base@17.0.5/java.lang.ref.ReferenceQueue.remove(Unknown Source) java.base@17.0.5/java.lang.ref.ReferenceQueue.remove(Unknown Source) app//org.openstreetmap.josm.tools.ListenableWeakReference.clean(ListenableWeakReference.java:60) app//org.openstreetmap.josm.tools.ListenableWeakReference$$Lambda$467/0x00000001004ae318.run(Unknown Source) java.base@17.0.5/java.lang.Thread.run(Unknown Source) Thread: styled-map-renderer-1 (60) of main java.base@17.0.5/jdk.internal.misc.Unsafe.park(Native Method) java.base@17.0.5/java.util.concurrent.locks.LockSupport.parkUntil(Unknown Source) java.base@17.0.5/java.util.concurrent.ForkJoinPool.awaitWork(Unknown Source) java.base@17.0.5/java.util.concurrent.ForkJoinPool.runWorker(Unknown Source) java.base@17.0.5/java.util.concurrent.ForkJoinWorkerThread.run(Unknown Source) Thread: AWT-EventQueue-0 (22) of main Stacktrace see above. Thread: ForkJoinPool.commonPool-worker-2 (28) of main java.base@17.0.5/jdk.internal.misc.Unsafe.park(Native Method) java.base@17.0.5/java.util.concurrent.locks.LockSupport.park(Unknown Source) java.base@17.0.5/java.util.concurrent.ForkJoinPool.awaitWork(Unknown Source) java.base@17.0.5/java.util.concurrent.ForkJoinPool.runWorker(Unknown Source) java.base@17.0.5/java.util.concurrent.ForkJoinWorkerThread.run(Unknown Source) Thread: ForkJoinPool.commonPool-worker-3 (29) of main java.base@17.0.5/jdk.internal.misc.Unsafe.park(Native Method) java.base@17.0.5/java.util.concurrent.locks.LockSupport.parkUntil(Unknown Source) java.base@17.0.5/java.util.concurrent.ForkJoinPool.awaitWork(Unknown Source) java.base@17.0.5/java.util.concurrent.ForkJoinPool.runWorker(Unknown Source) java.base@17.0.5/java.util.concurrent.ForkJoinWorkerThread.run(Unknown Source) Thread: Timer-0 (54) of main java.base@17.0.5/java.lang.Object.wait(Native Method) java.base@17.0.5/java.util.TimerThread.mainLoop(Unknown Source) java.base@17.0.5/java.util.TimerThread.run(Unknown Source) Thread: JCS-ElementEventQueue-Thread-1 (43) of main java.base@17.0.5/jdk.internal.misc.Unsafe.park(Native Method) java.base@17.0.5/java.util.concurrent.locks.LockSupport.park(Unknown Source) java.base@17.0.5/java.util.concurrent.locks.AbstractQueuedSynchronizer$ConditionNode.block(Unknown Source) java.base@17.0.5/java.util.concurrent.ForkJoinPool.unmanagedBlock(Unknown Source) java.base@17.0.5/java.util.concurrent.ForkJoinPool.managedBlock(Unknown Source) java.base@17.0.5/java.util.concurrent.locks.AbstractQueuedSynchronizer$ConditionObject.await(Unknown Source) java.base@17.0.5/java.util.concurrent.LinkedBlockingQueue.take(Unknown Source) java.base@17.0.5/java.util.concurrent.ThreadPoolExecutor.getTask(Unknown Source) java.base@17.0.5/java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source) java.base@17.0.5/java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source) java.base@17.0.5/java.lang.Thread.run(Unknown Source) Thread: changeset-updater-0 (51) of main java.base@17.0.5/jdk.internal.misc.Unsafe.park(Native Method) java.base@17.0.5/java.util.concurrent.locks.LockSupport.parkNanos(Unknown Source) java.base@17.0.5/java.util.concurrent.locks.AbstractQueuedSynchronizer$ConditionObject.awaitNanos(Unknown Source) java.base@17.0.5/java.util.concurrent.ScheduledThreadPoolExecutor$DelayedWorkQueue.take(Unknown Source) java.base@17.0.5/java.util.concurrent.ScheduledThreadPoolExecutor$DelayedWorkQueue.take(Unknown Source) java.base@17.0.5/java.util.concurrent.ThreadPoolExecutor.getTask(Unknown Source) java.base@17.0.5/java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source) java.base@17.0.5/java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source) java.base@17.0.5/java.lang.Thread.run(Unknown Source) Thread: TimerQueue (23) of system java.base@17.0.5/jdk.internal.misc.Unsafe.park(Native Method) java.base@17.0.5/java.util.concurrent.locks.LockSupport.park(Unknown Source) java.base@17.0.5/java.util.concurrent.locks.AbstractQueuedSynchronizer$ConditionNode.block(Unknown Source) java.base@17.0.5/java.util.concurrent.ForkJoinPool.unmanagedBlock(Unknown Source) java.base@17.0.5/java.util.concurrent.ForkJoinPool.managedBlock(Unknown Source) java.base@17.0.5/java.util.concurrent.locks.AbstractQueuedSynchronizer$ConditionObject.await(Unknown Source) java.base@17.0.5/java.util.concurrent.DelayQueue.take(Unknown Source) java.desktop@17.0.5/javax.swing.TimerQueue.run(Unknown Source) java.base@17.0.5/java.lang.Thread.run(Unknown Source) Thread: FileSystemWatchService (30) of main java.base@17.0.5/sun.nio.fs.WindowsNativeDispatcher.GetQueuedCompletionStatus0(Native Method) java.base@17.0.5/sun.nio.fs.WindowsNativeDispatcher.GetQueuedCompletionStatus(Unknown Source) java.base@17.0.5/sun.nio.fs.WindowsWatchService$Poller.run(Unknown Source) java.base@17.0.5/java.lang.Thread.run(Unknown Source) Thread: DestroyJavaVM (53) of main Thread: main-worker-0 (21) of main java.base@17.0.5/jdk.internal.misc.Unsafe.park(Native Method) java.base@17.0.5/java.util.concurrent.locks.LockSupport.park(Unknown Source) java.base@17.0.5/java.util.concurrent.locks.AbstractQueuedSynchronizer$ConditionNode.block(Unknown Source) java.base@17.0.5/java.util.concurrent.ForkJoinPool.unmanagedBlock(Unknown Source) java.base@17.0.5/java.util.concurrent.ForkJoinPool.managedBlock(Unknown Source) java.base@17.0.5/java.util.concurrent.locks.AbstractQueuedSynchronizer$ConditionObject.await(Unknown Source) java.base@17.0.5/java.util.concurrent.LinkedBlockingQueue.take(Unknown Source) java.base@17.0.5/java.util.concurrent.ThreadPoolExecutor.getTask(Unknown Source) java.base@17.0.5/java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source) java.base@17.0.5/java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source) java.base@17.0.5/java.lang.Thread.run(Unknown Source) Thread: message-notifier-0 (50) of main java.base@17.0.5/jdk.internal.misc.Unsafe.park(Native Method) java.base@17.0.5/java.util.concurrent.locks.LockSupport.parkNanos(Unknown Source) java.base@17.0.5/java.util.concurrent.locks.AbstractQueuedSynchronizer$ConditionObject.awaitNanos(Unknown Source) java.base@17.0.5/java.util.concurrent.ScheduledThreadPoolExecutor$DelayedWorkQueue.take(Unknown Source) java.base@17.0.5/java.util.concurrent.ScheduledThreadPoolExecutor$DelayedWorkQueue.take(Unknown Source) java.base@17.0.5/java.util.concurrent.ThreadPoolExecutor.getTask(Unknown Source) java.base@17.0.5/java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source) java.base@17.0.5/java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source) java.base@17.0.5/java.lang.Thread.run(Unknown Source) Thread: Common-Cleaner (12) of InnocuousThreadGroup java.base@17.0.5/java.lang.Object.wait(Native Method) java.base@17.0.5/java.lang.ref.ReferenceQueue.remove(Unknown Source) java.base@17.0.5/jdk.internal.ref.CleanerImpl.run(Unknown Source) java.base@17.0.5/java.lang.Thread.run(Unknown Source) java.base@17.0.5/jdk.internal.misc.InnocuousThread.run(Unknown Source) Thread: Attach Listener (5) of system Thread: CacheEventQueue.QProcessor-TMS_BLOCK_v2Thread-2 (44) of main java.base@17.0.5/jdk.internal.misc.Unsafe.park(Native Method) java.base@17.0.5/java.util.concurrent.locks.LockSupport.park(Unknown Source) java.base@17.0.5/java.util.concurrent.locks.AbstractQueuedSynchronizer$ConditionNode.block(Unknown Source) java.base@17.0.5/java.util.concurrent.ForkJoinPool.unmanagedBlock(Unknown Source) java.base@17.0.5/java.util.concurrent.ForkJoinPool.managedBlock(Unknown Source) java.base@17.0.5/java.util.concurrent.locks.AbstractQueuedSynchronizer$ConditionObject.await(Unknown Source) java.base@17.0.5/java.util.concurrent.LinkedBlockingQueue.take(Unknown Source) java.base@17.0.5/java.util.concurrent.ThreadPoolExecutor.getTask(Unknown Source) java.base@17.0.5/java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source) java.base@17.0.5/java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source) java.base@17.0.5/java.lang.Thread.run(Unknown Source) Thread: bug-report-display (63) of main java.base@17.0.5/java.lang.Object.wait(Native Method) java.base@17.0.5/java.lang.Object.wait(Unknown Source) app//org.openstreetmap.josm.tools.bugreport.BugReportQueue.getNext(BugReportQueue.java:123) app//org.openstreetmap.josm.tools.bugreport.BugReportQueue.access$100(BugReportQueue.java:17) app//org.openstreetmap.josm.tools.bugreport.BugReportQueue$BugReportDisplayRunnable.run(BugReportQueue.java:99) java.base@17.0.5/java.lang.Thread.run(Unknown Source) Thread: Timer-1 (55) of main java.base@17.0.5/java.lang.Object.wait(Native Method) java.base@17.0.5/java.lang.Object.wait(Unknown Source) java.base@17.0.5/java.util.TimerThread.mainLoop(Unknown Source) java.base@17.0.5/java.util.TimerThread.run(Unknown Source) Thread: RemoteControl HTTP Server (49) of main java.base@17.0.5/sun.nio.ch.Net.accept(Native Method) java.base@17.0.5/sun.nio.ch.NioSocketImpl.accept(Unknown Source) java.base@17.0.5/java.net.ServerSocket.implAccept(Unknown Source) java.base@17.0.5/java.net.ServerSocket.platformImplAccept(Unknown Source) java.base@17.0.5/java.net.ServerSocket.implAccept(Unknown Source) java.base@17.0.5/java.net.ServerSocket.implAccept(Unknown Source) java.base@17.0.5/java.net.ServerSocket.accept(Unknown Source) app//org.openstreetmap.josm.io.remotecontrol.RemoteControlHttpServer.run(RemoteControlHttpServer.java:104) Thread: Map Status Collector (68) of main java.base@17.0.5/java.lang.Object.wait(Native Method) java.base@17.0.5/java.lang.Object.wait(Unknown Source) java.desktop@17.0.5/java.awt.EventQueue.invokeAndWait(Unknown Source) java.desktop@17.0.5/java.awt.EventQueue.invokeAndWait(Unknown Source) app//org.openstreetmap.josm.gui.MapStatus$Collector.run(MapStatus.java:447) java.base@17.0.5/java.lang.Thread.run(Unknown Source) Thread: ForkJoinPool.commonPool-worker-1 (27) of main java.base@17.0.5/jdk.internal.misc.Unsafe.park(Native Method) java.base@17.0.5/java.util.concurrent.locks.LockSupport.park(Unknown Source) java.base@17.0.5/java.util.concurrent.ForkJoinPool.awaitWork(Unknown Source) java.base@17.0.5/java.util.concurrent.ForkJoinPool.runWorker(Unknown Source) java.base@17.0.5/java.util.concurrent.ForkJoinWorkerThread.run(Unknown Source) Thread: Finalizer (3) of system java.base@17.0.5/java.lang.Object.wait(Native Method) java.base@17.0.5/java.lang.ref.ReferenceQueue.remove(Unknown Source) java.base@17.0.5/java.lang.ref.ReferenceQueue.remove(Unknown Source) java.base@17.0.5/java.lang.ref.Finalizer$FinalizerThread.run(Unknown Source) Thread: Signal Dispatcher (4) of system Thread: File Watcher (31) of main java.base@17.0.5/jdk.internal.misc.Unsafe.park(Native Method) java.base@17.0.5/java.util.concurrent.locks.LockSupport.park(Unknown Source) java.base@17.0.5/java.util.concurrent.locks.AbstractQueuedSynchronizer$ConditionNode.block(Unknown Source) java.base@17.0.5/java.util.concurrent.ForkJoinPool.unmanagedBlock(Unknown Source) java.base@17.0.5/java.util.concurrent.ForkJoinPool.managedBlock(Unknown Source) java.base@17.0.5/java.util.concurrent.locks.AbstractQueuedSynchronizer$ConditionObject.await(Unknown Source) java.base@17.0.5/java.util.concurrent.LinkedBlockingDeque.takeFirst(Unknown Source) java.base@17.0.5/java.util.concurrent.LinkedBlockingDeque.take(Unknown Source) java.base@17.0.5/sun.nio.fs.AbstractWatchService.take(Unknown Source) app//org.openstreetmap.josm.io.FileWatcher.processEvents(FileWatcher.java:120) app//org.openstreetmap.josm.io.FileWatcher$$Lambda$424/0x00000001004262f0.run(Unknown Source) java.base@17.0.5/java.lang.Thread.run(Unknown Source) Thread: styled-map-renderer-2 (61) of main java.base@17.0.5/jdk.internal.misc.Unsafe.park(Native Method) java.base@17.0.5/java.util.concurrent.locks.LockSupport.park(Unknown Source) java.base@17.0.5/java.util.concurrent.ForkJoinPool.awaitWork(Unknown Source) java.base@17.0.5/java.util.concurrent.ForkJoinPool.runWorker(Unknown Source) java.base@17.0.5/java.util.concurrent.ForkJoinWorkerThread.run(Unknown Source) Thread: AWT-Windows (19) of system java.desktop@17.0.5/sun.awt.windows.WToolkit.eventLoop(Native Method) java.desktop@17.0.5/sun.awt.windows.WToolkit.run(Unknown Source) java.base@17.0.5/java.lang.Thread.run(Unknown Source) Thread: image-fetcher-0 (41) of main java.base@17.0.5/jdk.internal.misc.Unsafe.park(Native Method) java.base@17.0.5/java.util.concurrent.locks.LockSupport.park(Unknown Source) java.base@17.0.5/java.util.concurrent.locks.AbstractQueuedSynchronizer$ConditionNode.block(Unknown Source) java.base@17.0.5/java.util.concurrent.ForkJoinPool.unmanagedBlock(Unknown Source) java.base@17.0.5/java.util.concurrent.ForkJoinPool.managedBlock(Unknown Source) java.base@17.0.5/java.util.concurrent.locks.AbstractQueuedSynchronizer$ConditionObject.await(Unknown Source) java.base@17.0.5/java.util.concurrent.LinkedBlockingQueue.take(Unknown Source) java.base@17.0.5/java.util.concurrent.ThreadPoolExecutor.getTask(Unknown Source) java.base@17.0.5/java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source) java.base@17.0.5/java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source) java.base@17.0.5/java.lang.Thread.run(Unknown Source) Thread: AWT-Shutdown (18) of system java.base@17.0.5/java.lang.Object.wait(Native Method) java.base@17.0.5/java.lang.Object.wait(Unknown Source) java.desktop@17.0.5/sun.awt.AWTAutoShutdown.run(Unknown Source) java.base@17.0.5/java.lang.Thread.run(Unknown Source)
Attachments (5)
Change History (38)
by , 10 months ago
Attachment: | simplify.osm.bz2 added |
---|
comment:1 by , 10 months ago
Whoa, a crash in a long time function which is probably used really a lot. Not the everyday report ;-)
comment:2 by , 10 months ago
If I got that right the crash happens after the simplify command was calculated. It seems the part that crashes was introduced with r16438. Line 347 is the last line in this call:
Collection<Command> allCommands = ways.stream() .map(way -> createSimplifyCommand(way, threshold)) .filter(Objects::nonNull) .collect(StreamUtils.toUnmodifiableList());
I guess it was (again) a bad idea to introduce stream() here.
Or - more likely - it worked well then and the error was introduced with r16566 which can modify the returned command and set it to null.
comment:3 by , 10 months ago
Description: | modified (diff) |
---|
comment:4 by , 10 months ago
Problem disappears when I revert the changes from r18851. All this listener stuff looks overly complicated to me. In German we say "Von hinten durch die Brust ins Auge".
There should be a less complex way to solve the problem with the immediate reaction on a change of the error distance, esp. it really shouldn't abuse the global undo stack, but I think we already discussed that before.
comment:5 by , 10 months ago
Description: | modified (diff) |
---|
follow-ups: 7 15 comment:6 by , 10 months ago
This quick hack seems to help, but I must confess that I don't understand the purpose of this listener.
Under what circumstances can the selection of ways in the dataset change while SimplifyAction is running?
-
src/org/openstreetmap/josm/actions/SimplifyWayAction.java
571 571 final List<Way> newWays = dataSet.getSelectedWays().stream() 572 572 .filter(p -> !p.isIncomplete()) 573 573 .collect(Collectors.toList()); 574 if (Objects.deepEquals(newWays, wayList)) 575 return; 574 576 this.wayList.clear(); 575 577 this.wayList.addAll(newWays); 576 578 if (this.consumer != null) {
follow-up: 10 comment:7 by , 10 months ago
Replying to GerdP:
This quick hack seems to help, but I must confess that I don't understand the purpose of this listener.
Under what circumstances can the selection of ways in the dataset change while SimplifyAction is running?
A plugin could finish a long-running task which changes the selection.
comment:8 by , 10 months ago
Such a task would be source for lots of problems. There are probably hundredth of places where code relies on the idea that the selection cannot be changed while it is executed.
comment:9 by , 10 months ago
I found a simpler method to reproduce:
1) Select all nodes for a way
2) Simplify that way (at least one node must be removed)
I've got a non-regression test.
comment:10 by , 10 months ago
Replying to taylor.smock:
A plugin could finish a long-running task which changes the selection.
I have to correct myself. It looks like it was added as part of #19199 in order to show the user how a way changed as they modified the simplification threshold.
comment:11 by , 10 months ago
I hope so. A parallel thread which randomly changes the selection would make JOSM unusable. The user needs to be sure that he changes the selected object and not something else.
comment:12 by , 10 months ago
Maybe SimplifyWays could simply store the original selection and than select only the ways while this dialog for the error distance is open? Later, restore the selection as fas as possible.
Or just refuse to work when way nodes are in the selection by checking this in the updateEnabledState()
.
comment:13 by , 10 months ago
I was thinking about just making a copy of the list and passing that around to the calculation methods. I'm double-checking to make certain that I know why the selection change is occurring first though (I believe this is due to manually unselecting nodes that will be deleted).
comment:14 by , 10 months ago
The selection changes because the command is executed before the dialog is shown and that removes nodes which are in the selection.
comment:15 by , 10 months ago
Replying to GerdP:
The selection changes because the command is executed before the dialog is shown and that removes nodes which are in the selection.
This isn't the issue -- it isn't modifying the list as the iteration is occurring.
Replying to GerdP:
This quick hack seems to help, but I must confess that I don't understand the purpose of this listener.
Moving away from the stream API will also fix this issue. Which is fun, because I think it should have the same behavior as the stream.
-
core/src/org/openstreetmap/josm/actions/SimplifyWayAction.java
diff --git a/core/src/org/openstreetmap/josm/actions/SimplifyWayAction.java b/core/src/org/openstreetmap/josm/actions/SimplifyWayAction.java
a b 340 340 * @since 16566 (private) 341 341 */ 342 342 private static SequenceCommand buildSimplifyWaysCommand(List<Way> ways, double threshold) { 343 Collection<Command> allCommands = ways.stream() 344 .map(way -> createSimplifyCommand(way, threshold)) 345 .filter(Objects::nonNull) 346 .collect(StreamUtils.toUnmodifiableList()); 343 final Collection<Command> allCommands = new ArrayList<>(ways.size()); 344 for (Way way : ways) { 345 final Command simplifyCommand = createSimplifyCommand(way, threshold); 346 if (simplifyCommand != null) { 347 allCommands.add(simplifyCommand); 348 } 349 } 347 350 if (allCommands.isEmpty()) 348 351 return null; 349 352 return new SequenceCommand(
comment:17 by , 10 months ago
comment:18 by , 10 months ago
Milestone: | → 23.12 |
---|
by , 10 months ago
Attachment: | 23399.patch added |
---|
comment:19 by , 10 months ago
This was primarily caused by selection updates occurring while the commands were generated. The fixes could be any of the following:
- Synchronized collections
- New list
- Avoiding selection updates
- This can be (and is) done via two methods; avoiding updating the list when no ways changed and by not changing the selection when calculating the simplify way command for each individual way.
The last option was taken for the following reasons:
- Avoiding a StackOverflow exception in 1k way test
- Reduced memory allocations in 1k way test (>11GB to <250MB)
- Reduced CPU cycles in 1k way test (16s to 2.7s)
EDIT: I'll plan on applying the patch tomorrow and doing the 23.12 release on Saturday.
comment:20 by , 10 months ago
I'll have a closer look today. The patch seems to add complexity. I expected a removement of all the listening to modified selections.
comment:21 by , 10 months ago
Most of the added complexity is in generating the deleted nodes to deselect once; this is something that should happen anyway, if only for people who are working on large imports (think simplifying buildings for a country prior to import).
Let me put it this way:
In the course of writing the non-regression test for this ticket, I found that we were firing an egregious number of selection changed events (1 for every way we are calling simplify way on).
As a happy accident/coincidence, fixing the egregious number of selection changed event also fixes this ticket.
The overall reductions in terms of cost are as follows (as measured using testNonRegression23399
in attachment:23399.patch):
- -80% CPU cycles in the EDT
- -50% CPU cycles in JVM methods (GC and class compilation, mostly -- reducing GC also reduces the number of GC pauses)
- -97% memory allocations in the EDT
Notably, for terms of measurement, the problematic methods outside of SimplifyWayAction#createSimplifyCommand
were not in the SimplifyWayAction
class. The big memory/CPU classes were SelectionListDialog
and PropertiesDialog
(collectively 93% of the total memory usage in the EDT and 62% of the CPU usage in the EDT).
follow-up: 24 comment:22 by , 10 months ago
Yes, I also noticed this performance problem. I thought my small patch solved that as well?
I still wonder why SimplifyWayDataSelectionListener
is needed. I see only one case where
GuiHelper.runInEDT(() -> this.consumer.accept(this.wayList));
is actually executed, and that's when
listener.updateWayList(ds);
is explicitely called.
comment:23 by , 10 months ago
The new unit test doesn't pass when I execute it in Eclipse, but seems to work with ant.
ant -Ddefault-junit-includes="**/**/SimplifyWayActionTest.class" test
Expected?
comment:24 by , 10 months ago
Replying to GerdP:
Yes, I also noticed this performance problem. I thought my small patch solved that as well?
Your patch from comment:6? No, it did not significantly improve performance (if it did, we are talking in the range of measurement jitter).
I still wonder why
SimplifyWayDataSelectionListener
is needed. I see only one case where
GuiHelper.runInEDT(() -> this.consumer.accept(this.wayList));
is actually executed, and that's when
listener.updateWayList(ds);
is explicitely called.
It doesn't look like it is currently needed. It looks like I added it to avoid issues with way deletion/modification while the window was open (see comment:5:ticket:23203). I don't remember exactly what I was thinking at the time, but I do know I've wanted to make the dialog non-blocking so that users can pan around to see how a way is changed as they modify the threshold.
The new unit test doesn't pass when I execute it in Eclipse, but seems to work with ant.
It should be working in eclipse. I wrote it using IDEA and tested it using IDEA. Is it failing, or is there an exception you can share?
comment:25 by , 10 months ago
This is what I get in Eclipse:
org.opentest4j.AssertionFailedError: Unexpected exception thrown: org.openstreetmap.josm.tools.bugreport.ReportedException: java.lang.reflect.InvocationTargetException at org.openstreetmap.josm.actions.SimplifyWayActionTest.testNonRegression23399(SimplifyWayActionTest.java:132) Caused by: ReportedException [thread=Thread[main,5,main], exception=java.lang.reflect.InvocationTargetException, methodWarningFrom=null] at org.openstreetmap.josm.tools.bugreport.BugReport.intercept(BugReport.java:213) at org.openstreetmap.josm.gui.util.GuiHelper.runInEDTAndWaitWithException(GuiHelper.java:252) at org.openstreetmap.josm.actions.SimplifyWayActionTest.lambda$7(SimplifyWayActionTest.java:132) ... 1 more Caused by: java.lang.reflect.InvocationTargetException at java.awt.EventQueue.invokeAndWait(EventQueue.java:1349) at java.awt.EventQueue.invokeAndWait(EventQueue.java:1324) at javax.swing.SwingUtilities.invokeAndWait(SwingUtilities.java:1353) at org.openstreetmap.josm.gui.util.GuiHelper.runInEDTAndWaitWithException(GuiHelper.java:250) ... 2 more Caused by: java.lang.NullPointerException at java.awt.Window.setOwnedWindowsAlwaysOnTop(Window.java:2252) at java.awt.Window.setAlwaysOnTop(Window.java:2246) at org.openstreetmap.josm.gui.HelpAwareOptionPane.doShowOptionDialog(HelpAwareOptionPane.java:355) at org.openstreetmap.josm.gui.HelpAwareOptionPane.showOptionDialog(HelpAwareOptionPane.java:290) at org.openstreetmap.josm.actions.SimplifyWayAction.confirmSimplifyManyWays(SimplifyWayAction.java:103) at org.openstreetmap.josm.actions.SimplifyWayAction.actionPerformed(SimplifyWayAction.java:242) at org.openstreetmap.josm.actions.SimplifyWayActionTest.lambda$8(SimplifyWayActionTest.java:132) at java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:301) 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:74) at java.awt.EventQueue.dispatchEvent(EventQueue.java:728) 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)
comment:26 by , 10 months ago
I think I need to add TestUtils.assumeWorkingJMockit()
to the start of the test.
You need to add -javaagent:${HOME}/.ivy2/cache/org.jmockit/jmockit/jars/jmockit-1.49.a.jar
(or the equivalent on Windows) to the VM arguments.
comment:27 by , 10 months ago
Not sure if I understand what to do. The test was executed with
-ea -javaagent:c:\josm\core\test\lib\jmockit.jar
When I change that to
-ea -javaagent:c:\Users\Gerd\.ivy2\cache\org.jmockit\jmockit\jars\jmockit-1.49.a.jar
nothing changes.
When I add TestUtils.assumeWorkingJMockit()
the line numbers in the stacktrace change, but nothing else.
comment:28 by , 10 months ago
It looks like it is a headless versus non-headless test run issue.
I was able to reproduce by changing -Djava.awt.headless=true
to -Djava.awt.headless=false
(this argument is added automatically -- I set up my individual test template to have that argument).
comment:29 by , 10 months ago
I still see a similar stacktrace with 23399.3.patch. I tried with and without -Djava.awt.headless=true
.
This now also happens on the command line.
I assume you use a newer JRE. I am still on 1.8.0_272 on the command line and in Eclipse.
I've also tried with 17.0.5.8 on the command line, no success.
by , 10 months ago
Attachment: | 23399.4.patch added |
---|
Fix SOE and make HelpAwareOptionPaneMocker call more robust to tr
differences
comment:32 by , 10 months ago
Yep. I just have to apply the patch and wait for the next build. I was going to do it Friday, but I had to make some modifications to the patch.
EDIT: To clarify, the modifications are attachment:23399.4.patch. I just wanted to make certain that everyone interested had a chance to look at it.
sample data