﻿id	summary	reporter	owner	description	type	status	priority	milestone	component	version	resolution	keywords	cc
23402	Error saving offset bookmark	anonymous	team	"==== What steps will reproduce the problem?
(I did not attempt to reproduce to verify, but this is what I did the first time.)
1. Adjust imagery offset using one imagery source, but don't save the bookmark.  Make a note of the offset numbers.
2. Adjust imagery offset using another imagery source. Use different offset numbers from the ones of step 1.
3. Close the second imagery source (garbage can button in layers box).
4. Click ""Adjust imagery offset"" back in the first imagery source again, don't change anything yet.  Look to see what the offset numbers are.  If the bug happens for you as it did for me, the numbers will still be from the offset you set on the second imagery source.  So if you wanted to save the first imagery offset as a bookmark, it makes sense you would try to change them to the correct numbers first.
5. Change the numbers in the box back to what they should be (the ones you made a note of in step 1).
6. Enter a bookmark name to save.
7. Click OK.

==== What is the expected result?
The bookmark should save, as it properly does if you skip steps 2 through 5.

==== What happens instead?
Error box pops up saying ""You have encountered a bug in JOSM.""

==== Please provide any additional information below. Attach a screenshot if possible.

{{{
Revision:18907
Build-Date:2023-12-07 16:43:08

Identification: JOSM/1.5 (18907 en) Windows 11 64-Bit
OS Build number: Windows 10 Pro 2009 (22621)
Memory Usage: 708 MB / 8172 MB (190 MB allocated, but free)
Java version: 17.0.9+8-LTS, Azul Systems, Inc., OpenJDK 64-Bit Server VM
Look and Feel: com.sun.java.swing.plaf.windows.WindowsLookAndFeel
Screen: \Display0 2560×1440 (scaling 1.00×1.00) \Display1 1920×1080 (scaling 1.00×1.00)
Maximum Screen Size: 2560×1440
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_US
Numbers with default locale: 1234567890 -> 1234567890
VM arguments: [-Djpackage.app-version=1.5.18907, --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:
+ CommandLine (36178)
+ OpeningHoursEditor (36126)
+ buildings_tools (36178)
+ movemembership (1.0.0)
+ utilsplugin2 (36178)

Last errors/warnings:
- 10111.923 W: java.net.SocketTimeoutException: Read timed out. Cause: java.net.SocketTimeoutException: Read timed out
- 10111.923 W: Already here java.net.SocketTimeoutException: Read timed out
- 10112.024 E: Failed to locate image 'https://www.fs.usda.gov/sites/all/themes/fs_hq/images/usfslogo.png'
- 10763.269 W: java.net.SocketTimeoutException: Read timed out. Cause: java.net.SocketTimeoutException: Read timed out
- 10763.269 W: Already here java.net.SocketTimeoutException: Read timed out
- 10763.376 E: Failed to locate image 'https://www.fs.usda.gov/sites/all/themes/fs_hq/images/usfslogo.png'
- 10852.554 W: java.net.SocketTimeoutException: Read timed out. Cause: java.net.SocketTimeoutException: Read timed out
- 10852.554 W: Already here java.net.SocketTimeoutException: Read timed out
- 10852.662 E: Failed to locate image 'https://www.fs.usda.gov/sites/all/themes/fs_hq/images/usfslogo.png'
- 10983.232 E: Handled by bug report queue: java.lang.NullPointerException: Cannot invoke ""org.openstreetmap.josm.gui.layer.ImageryLayer.getInfo()"" because ""layer"" is null



=== REPORTED CRASH DATA ===
BugReportExceptionHandler#handleException:
No data collected.

Warning issued by: BugReportExceptionHandler#handleException

=== STACK TRACE ===
Thread: AWT-EventQueue-0 (31) of main
java.lang.NullPointerException: Cannot invoke ""org.openstreetmap.josm.gui.layer.ImageryLayer.getInfo()"" because ""layer"" is null
	at org.openstreetmap.josm.data.imagery.OffsetBookmark.isUsable(OffsetBookmark.java:52)
	at org.openstreetmap.josm.data.imagery.OffsetBookmark.lambda$getBookmarkByName$5(OffsetBookmark.java:351)
	at java.base/java.util.stream.ReferencePipeline$2$1.accept(Unknown Source)
	at java.base/java.util.ArrayList$ArrayListSpliterator.tryAdvance(Unknown Source)
	at java.base/java.util.stream.ReferencePipeline.forEachWithCancel(Unknown Source)
	at java.base/java.util.stream.AbstractPipeline.copyIntoWithCancel(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.FindOps$FindOp.evaluateSequential(Unknown Source)
	at java.base/java.util.stream.AbstractPipeline.evaluate(Unknown Source)
	at java.base/java.util.stream.ReferencePipeline.findFirst(Unknown Source)
	at org.openstreetmap.josm.data.imagery.OffsetBookmark.getBookmarkByName(OffsetBookmark.java:352)
	at org.openstreetmap.josm.actions.ImageryAdjustAction$ImageryOffsetDialog.buttonAction(ImageryAdjustAction.java:332)
	at org.openstreetmap.josm.gui.ExtendedDialog$1.actionPerformed(ExtendedDialog.java:381)
	at java.desktop/javax.swing.AbstractButton.fireActionPerformed(Unknown Source)
	at java.desktop/javax.swing.AbstractButton$Handler.actionPerformed(Unknown Source)
	at java.desktop/javax.swing.DefaultButtonModel.fireActionPerformed(Unknown Source)
	at java.desktop/javax.swing.DefaultButtonModel.setPressed(Unknown Source)
	at java.desktop/javax.swing.plaf.basic.BasicButtonListener.mouseReleased(Unknown Source)
	at java.desktop/java.awt.Component.processMouseEvent(Unknown Source)
	at java.desktop/javax.swing.JComponent.processMouseEvent(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.LightweightDispatcher.retargetMouseEvent(Unknown Source)
	at java.desktop/java.awt.LightweightDispatcher.processMouseEvent(Unknown Source)
	at java.desktop/java.awt.LightweightDispatcher.dispatchEvent(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)
}}}
"	defect	new	normal		Core imagery	tested		template_report offset	
