#22170 closed defect (fixed)
AIOOBE: org.openstreetmap.josm.gui.util.imagery.CameraPlane
Reported by: | anonymous | Owned by: | team |
---|---|---|---|
Priority: | normal | Milestone: | 22.06 |
Component: | Core image mapping | Version: | |
Keywords: | template_report regression | Cc: | GhostFoxSledgehammer |
Description
What steps will reproduce the problem?
What is the expected result?
What happens instead?
Please provide any additional information below. Attach a screenshot if possible.
Revision:18463 Build-Date:2022-05-30 10:23:53 Identification: JOSM/1.5 (18463 en) Windows 10 64-Bit OS Build number: Windows 10 Pro 2009 (19044) Memory Usage: 3284 MB / 3552 MB (932 MB allocated, but free) Java version: 17.0.3+7-LTS, Azul Systems, Inc., OpenJDK 64-Bit Server VM Look and Feel: javax.swing.plaf.metal.MetalLookAndFeel Screen: \Display0 1920×1080 (scaling 1.25×1.25) \Display1 1622×1014 (scaling 1.25×1.25) Maximum Screen Size: 1920×1080 Best cursor sizes: 16×16→32×32, 32×32→32×32 System property file.encoding: Cp1252 System property sun.jnu.encoding: Cp1252 Locale info: en_PH Numbers with default locale: 1234567890 -> 1234567890 VM arguments: [-Djpackage.app-version=1.5.18463, --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\JOSM.exe] Dataset consistency test: No problems found Plugins: + ColorPlugin (1537115529) + Mapillary (2.0.0-beta.10) + OpeningHoursEditor (35924) + RoadSigns (35935) + apache-commons (35924) + apache-http (35924) + buildings_tools (35978) + contourmerge (v0.1.9) + easypresets (1623509627) + ejml (35924) + fieldpapers (v0.5.0) + geotools (35959) + imagery_offset_db (35893) + jackson (35958) + jaxb (35952) + jna (35924) + josm-batch-downloader (1.0.4) + jts (35976) + mapwithai (1.9.14) + measurement (35976) + merge-overlap (35893) + namemanager (35976) + opendata (35910) + reverter (35980) + shrinkwrap (v1.0.4) + tageditor (35893) + todo (30306) + tofix (490) + turnlanes (35976) + turnlanes-tagging (v0.0.5) + turnrestrictions (35976) + undelete (35893) + utilsplugin2 (35970) + waydownloader (35976) Tagging presets: + <josm.pref>/EasyPresets.xml Map paint styles: - https://josm.openstreetmap.de/josmfile?page=Styles/SidewalksAndFootways&zip=1 - https://josm.openstreetmap.de/josmfile?page=Styles/Lane_and_Road_Attributes&zip=1 + https://josm.openstreetmap.de/josmfile?page=Styles/PhilippinesTrafficSigns&zip=1 - https://josm.openstreetmap.de/josmfile?page=Styles/Noname&zip=1 - https://raw.githubusercontent.com/species/josm-preset-wheelchair/master/sidewalks_kerbs.mapcss + https://josm.openstreetmap.de/josmfile?page=Styles/MapWithAI&zip=1 Last errors/warnings: - 03091.232 W: Listener not found for URL: https://scontent.fceb6-1.fna.fbcdn.net/m1/v/t6/An9cI3D0262c1nBZ0tIh4sgoltf-D7_-vugcl2zy14UkO6TqkisT_RpeF7M8hSk9Tq-udOtSCtfpGUcu92zsc9kx7dF1-1u044o8Jnf2kG9MrLFjykvYX5X5tZw96BulLhPXSPwAXDsrti9flKFr5w?stp=s256x144&ccb=10-5&oh=00_AT-g6gx7w9acwe4KAdQ4bVK4vcQetusSfKH7tVrZOYXw8Q&oe=62BFAED9&_nc_sid=122ab1. Listener not notified! - 03091.267 W: Listener not found for URL: https://scontent.fceb6-1.fna.fbcdn.net/m1/v/t6/An-VTGQb7NpSm3vg-KzNP2Gjrzhh-yu1P0rLNfJFs7zZJ_OPMC8HaKxldgnbk47MPq3ZqCMoMNv-1LNr7ExhVs82bjsWI57JKg38GN2POn5zKvn52-SMtixEYt11v0YaASHyYBgRlEuDZzxvhkHDOUI?stp=s256x144&ccb=10-5&oh=00_AT8Xais2L6fbv0d_El0j5stHy2lSzVVcg9fk2HepFXR7pQ&oe=62BF0748&_nc_sid=122ab1. Listener not notified! - 03091.290 W: Listener not found for URL: https://scontent.fceb6-1.fna.fbcdn.net/m1/v/t6/An_VypShZnMuZqO1ANe-x2TeqlzAsrugKMgPSRU7GULTRc9_eIMUkWnHqZDW9zASq7M4onyD97DLrLMiq6chrbg_h3yL8Z67xyGh9jHvIxxVTBbhUDrSMrLnd80b1i538oNgigsriPSfF_xgqglozQ?stp=s256x144&ccb=10-5&oh=00_AT_kQ-GON00C-LTEqE9SdvYn241QdJIB0VNtoG5OpWdUiA&oe=62BFD610&_nc_sid=122ab1. Listener not notified! - 03096.659 W: Listener not found for URL: https://scontent.fceb6-1.fna.fbcdn.net/m1/v/t6/An82dZbwr9TfHyIupUOLD-CgarN6SQJRcp0d5lKktKBQ-F0fxBMc_FaVlRNU95DK3OkjpdXXG3Io98BlGPsyMxePWFR5NNZN7w2MWUEEx5U7EFcck_PHRG7XotuZZ2TFKfh1I0mfvFuty3lrhkDADg?stp=s256x144&ccb=10-5&oh=00_AT_myWbkANn1ZV5SMlc3ahezLpJ4Xa3D4nyCyX9XLlg4hw&oe=62BECA53&_nc_sid=122ab1. Listener not notified! - 03096.667 W: Listener not found for URL: https://scontent.fceb6-1.fna.fbcdn.net/m1/v/t6/An9cI3D0262c1nBZ0tIh4sgoltf-D7_-vugcl2zy14UkO6TqkisT_RpeF7M8hSk9Tq-udOtSCtfpGUcu92zsc9kx7dF1-1u044o8Jnf2kG9MrLFjykvYX5X5tZw96BulLhPXSPwAXDsrti9flKFr5w?stp=s256x144&ccb=10-5&oh=00_AT-g6gx7w9acwe4KAdQ4bVK4vcQetusSfKH7tVrZOYXw8Q&oe=62BFAED9&_nc_sid=122ab1. Listener not notified! - 03096.705 W: Listener not found for URL: https://scontent.fceb6-1.fna.fbcdn.net/m1/v/t6/An_VypShZnMuZqO1ANe-x2TeqlzAsrugKMgPSRU7GULTRc9_eIMUkWnHqZDW9zASq7M4onyD97DLrLMiq6chrbg_h3yL8Z67xyGh9jHvIxxVTBbhUDrSMrLnd80b1i538oNgigsriPSfF_xgqglozQ?stp=s256x144&ccb=10-5&oh=00_AT_kQ-GON00C-LTEqE9SdvYn241QdJIB0VNtoG5OpWdUiA&oe=62BFD610&_nc_sid=122ab1. Listener not notified! - 03098.968 W: Listener not found for URL: https://scontent.fceb6-1.fna.fbcdn.net/m1/v/t6/An82dZbwr9TfHyIupUOLD-CgarN6SQJRcp0d5lKktKBQ-F0fxBMc_FaVlRNU95DK3OkjpdXXG3Io98BlGPsyMxePWFR5NNZN7w2MWUEEx5U7EFcck_PHRG7XotuZZ2TFKfh1I0mfvFuty3lrhkDADg?stp=s256x144&ccb=10-5&oh=00_AT_myWbkANn1ZV5SMlc3ahezLpJ4Xa3D4nyCyX9XLlg4hw&oe=62BECA53&_nc_sid=122ab1. Listener not notified! - 03098.989 W: Listener not found for URL: https://scontent.fceb6-1.fna.fbcdn.net/m1/v/t6/An9cI3D0262c1nBZ0tIh4sgoltf-D7_-vugcl2zy14UkO6TqkisT_RpeF7M8hSk9Tq-udOtSCtfpGUcu92zsc9kx7dF1-1u044o8Jnf2kG9MrLFjykvYX5X5tZw96BulLhPXSPwAXDsrti9flKFr5w?stp=s256x144&ccb=10-5&oh=00_AT-g6gx7w9acwe4KAdQ4bVK4vcQetusSfKH7tVrZOYXw8Q&oe=62BFAED9&_nc_sid=122ab1. Listener not notified! - 03099.011 W: Listener not found for URL: https://scontent.fceb6-1.fna.fbcdn.net/m1/v/t6/An-VTGQb7NpSm3vg-KzNP2Gjrzhh-yu1P0rLNfJFs7zZJ_OPMC8HaKxldgnbk47MPq3ZqCMoMNv-1LNr7ExhVs82bjsWI57JKg38GN2POn5zKvn52-SMtixEYt11v0YaASHyYBgRlEuDZzxvhkHDOUI?stp=s256x144&ccb=10-5&oh=00_AT8Xais2L6fbv0d_El0j5stHy2lSzVVcg9fk2HepFXR7pQ&oe=62BF0748&_nc_sid=122ab1. Listener not notified! - 03114.212 E: Handled by bug report queue: java.lang.ArrayIndexOutOfBoundsException. Cause: java.lang.ArrayIndexOutOfBoundsException: Index 9424912 out of bounds for length 3645712 === REPORTED CRASH DATA === BugReportExceptionHandler#handleException: No data collected. Warning issued by: BugReportExceptionHandler#handleException === STACK TRACE === Thread: AWT-EventQueue-0 (24) of main java.lang.ArrayIndexOutOfBoundsException at java.base/jdk.internal.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method) at java.base/jdk.internal.reflect.NativeConstructorAccessorImpl.newInstance(Unknown Source) at java.base/jdk.internal.reflect.DelegatingConstructorAccessorImpl.newInstance(Unknown Source) at java.base/java.lang.reflect.Constructor.newInstanceWithCaller(Unknown Source) at java.base/java.lang.reflect.Constructor.newInstance(Unknown Source) at java.base/java.util.concurrent.ForkJoinTask.getThrowableException(Unknown Source) at java.base/java.util.concurrent.ForkJoinTask.reportException(Unknown Source) at java.base/java.util.concurrent.ForkJoinTask.invoke(Unknown Source) at java.base/java.util.stream.ForEachOps$ForEachOp.evaluateParallel(Unknown Source) at java.base/java.util.stream.ForEachOps$ForEachOp$OfInt.evaluateParallel(Unknown Source) at java.base/java.util.stream.AbstractPipeline.evaluate(Unknown Source) at java.base/java.util.stream.IntPipeline.forEach(Unknown Source) at java.base/java.util.stream.IntPipeline$Head.forEach(Unknown Source) at org.openstreetmap.josm.gui.util.imagery.CameraPlane.mapping(CameraPlane.java:309) at org.openstreetmap.josm.gui.layer.geoimage.viewers.projections.Equirectangular.paintImage(Equirectangular.java:43) at org.openstreetmap.josm.gui.layer.geoimage.ImageDisplay.paintComponent(ImageDisplay.java:722) at java.desktop/javax.swing.JComponent.paint(Unknown Source) at java.desktop/javax.swing.JComponent.paintChildren(Unknown Source) at java.desktop/javax.swing.JComponent.paint(Unknown Source) at java.desktop/javax.swing.JComponent.paintChildren(Unknown Source) at java.desktop/javax.swing.JComponent.paint(Unknown Source) at java.desktop/javax.swing.JComponent.paintChildren(Unknown Source) at java.desktop/javax.swing.JComponent.paint(Unknown Source) at java.desktop/javax.swing.JComponent.paintChildren(Unknown Source) at java.desktop/javax.swing.JComponent.paint(Unknown Source) at java.desktop/javax.swing.JLayeredPane.paint(Unknown Source) at java.desktop/javax.swing.JComponent.paintChildren(Unknown Source) at java.desktop/javax.swing.JComponent.paintToOffscreen(Unknown Source) at java.desktop/javax.swing.RepaintManager$PaintManager.paintDoubleBufferedFPScales(Unknown Source) at java.desktop/javax.swing.RepaintManager$PaintManager.paintDoubleBuffered(Unknown Source) at java.desktop/javax.swing.RepaintManager$PaintManager.paint(Unknown Source) at java.desktop/javax.swing.RepaintManager.paint(Unknown Source) at java.desktop/javax.swing.JComponent.paint(Unknown Source) at java.desktop/java.awt.GraphicsCallback$PaintCallback.run(Unknown Source) at java.desktop/sun.awt.SunGraphicsCallback.runOneComponent(Unknown Source) at java.desktop/sun.awt.SunGraphicsCallback.runComponents(Unknown Source) at java.desktop/java.awt.Container.paint(Unknown Source) at java.desktop/java.awt.Window.paint(Unknown Source) at java.desktop/javax.swing.RepaintManager$4.run(Unknown Source) at java.desktop/javax.swing.RepaintManager$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.desktop/javax.swing.RepaintManager.paintDirtyRegions(Unknown Source) at java.desktop/javax.swing.RepaintManager.paintDirtyRegions(Unknown Source) at java.desktop/javax.swing.RepaintManager.prePaintDirtyRegions(Unknown Source) at java.desktop/javax.swing.RepaintManager$ProcessingRunnable.run(Unknown Source) at java.desktop/java.awt.event.InvocationEvent.dispatch(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.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) Caused by: java.lang.ArrayIndexOutOfBoundsException: Index 9424912 out of bounds for length 3645712 at org.openstreetmap.josm.gui.util.imagery.CameraPlane.lambda$mapping$6(CameraPlane.java:319) at java.base/java.util.stream.Streams$RangeIntSpliterator.forEachRemaining(Unknown Source) at java.base/java.util.stream.IntPipeline$Head.forEach(Unknown Source) at org.openstreetmap.josm.gui.util.imagery.CameraPlane.lambda$mapping$7(CameraPlane.java:309) at java.base/java.util.stream.ForEachOps$ForEachOp$OfInt.accept(Unknown Source) at java.base/java.util.stream.Streams$RangeIntSpliterator.forEachRemaining(Unknown Source) at java.base/java.util.Spliterator$OfInt.forEachRemaining(Unknown Source) at java.base/java.util.stream.AbstractPipeline.copyInto(Unknown Source) at java.base/java.util.stream.ForEachOps$ForEachTask.compute(Unknown Source) at java.base/java.util.concurrent.CountedCompleter.exec(Unknown Source) at java.base/java.util.concurrent.ForkJoinTask.doExec(Unknown Source) at java.base/java.util.concurrent.ForkJoinPool$WorkQueue.topLevelExec(Unknown Source) at java.base/java.util.concurrent.ForkJoinPool.scan(Unknown Source) at java.base/java.util.concurrent.ForkJoinPool.runWorker(Unknown Source) at java.base/java.util.concurrent.ForkJoinWorkerThread.run(Unknown Source)
Attachments (0)
Change History (8)
comment:1 by , 2 years ago
Component: | Core → Core image mapping |
---|---|
Summary: | error while using mapillary → AIOOBE: org.openstreetmap.josm.gui.util.imagery.CameraPlane |
comment:2 by , 2 years ago
Keywords: | regression added |
---|
follow-up: 4 comment:3 by , 2 years ago
Cc: | added |
---|
@GhostFoxSledgehammer: In r18398 (source:trunk/src/org/openstreetmap/josm/gui/util/imagery/CameraPlane.java#L257) you specified that the visibleRect
was the part of the target image that would be visible. I think it should be the source image. Is that correct?
From the docs for ImageDisplay#visibleRect:
The rectangle (in image coordinates) of the image that is visible. This rectangle is calculated each time the zoom is modified.
comment:4 by , 2 years ago
Replying to taylor.smock:
@GhostFoxSledgehammer: In r18398 (source:trunk/src/org/openstreetmap/josm/gui/util/imagery/CameraPlane.java#L257) you specified that the
visibleRect
was the part of the target image that would be visible. I think it should be the source image. Is that correct?
From the docs for ImageDisplay#visibleRect:
The rectangle (in image coordinates) of the image that is visible. This rectangle is calculated each time the zoom is modified.
I think it should be part of target image and not source image, primarily because it is dependent upon the type of projection used, like for equirectangular projection, visibleRect would not be of rectangular shape but something like a spherical arc, also it would wrap around the image for certain values of polar and azimuthal angles.
This is also consistent with how it was being used even before r18398.(source:trunk/src/org/openstreetmap/josm/gui/layer/geoimage/viewers/projections/Equirectangular.java?rev=18256#L47)
43 currentCameraPlane.mapping(image, currentOffscreenImage); 44 if (target == null) { 45 target = new Rectangle(0, 0, currentOffscreenImage.getWidth(null), currentOffscreenImage.getHeight(null)); 46 } 47 g.drawImage(currentOffscreenImage, target.x, target.y, target.x + target.width, target.y + target.height, 48 visibleRect.x, visibleRect.y, visibleRect.x + visibleRect.width, visibleRect.y + visibleRect.height, 49 null);
Here visibleRect is the zoomed in part of currentOffscreenImage, which is the target image in our mapping function.
comment:5 by , 2 years ago
Fair enough. I have tracked down the problem, and I'm currently working on writing a non-regression test for it.
Essentially, we get the visible rect, then we get the viewer (which may change the visible rect, especially when switching from perspective to equirectangular), but we still have the original visible rect.
-
src/org/openstreetmap/josm/gui/layer/geoimage/ImageDisplay.java
697 697 IImageEntry<?> currentOldEntry; 698 698 IImageViewer currentImageViewer; 699 699 BufferedImage currentImage; 700 VisRect currentVisibleRect;701 700 boolean currentErrorLoading; 702 701 703 702 synchronized (this) { … … 704 703 currentImage = this.processedImage; 705 704 currentEntry = this.entry; 706 705 currentOldEntry = this.oldEntry; 707 currentVisibleRect = this.visibleRect;708 706 currentErrorLoading = this.errorLoading; 709 707 } 710 708 … … 716 714 // Draw the image first, then draw error information 717 715 if (currentImage != null && (currentEntry != null || currentOldEntry != null)) { 718 716 currentImageViewer = this.getIImageViewer(currentEntry); 717 // This must be after the getIImageViewer call, since we may be switching image viewers. This is important, 718 // since an image viewer on switch may change the visible rectangle. 719 VisRect currentVisibleRect; 720 synchronized (this) { 721 currentVisibleRect = this.visibleRect; 722 } 719 723 Rectangle r = new Rectangle(currentVisibleRect); 720 724 Rectangle target = calculateDrawImageRectangle(currentVisibleRect, size); 721 725
comment:7 by , 2 years ago
Milestone: | → 22.07 |
---|
comment:8 by , 2 years ago
Milestone: | 22.07 → 22.06 |
---|
It looks like this is a regression of r18398.