﻿id	summary	reporter	owner	description	type	status	priority	milestone	component	version	resolution	keywords	cc
24127	Exception when loading Bing Imagery	anonymous	team	"==== What steps will reproduce the problem?
1. Go to Imagery
2. Select Bing Imagery

==== What is the expected result? Bing Imagery Loads

==== What happens instead? Error: Attribution is not loaded yet and exception is thrown

==== Please provide any additional information below. Attach a screenshot if possible.

{{{
Revision:19307
Build-Date:2025-02-04 10:32:03

Identification: JOSM/1.5 (19307 en) Windows 11 64-Bit
OS Build number: Windows 10 Home 23H2 (22631)
Memory Usage: 640 MB / 48992 MB (313 MB allocated, but free)
Java version: 21.0.6+7-LTS, Azul Systems, Inc., OpenJDK 64-Bit Server VM
Look and Feel: com.sun.java.swing.plaf.windows.WindowsLookAndFeel
Screen: \Display0 2560x1440x32bpp@165Hz (scaling 1.00×1.00) \Display1 2560x1440x32bpp@165Hz (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: UTF-8
System property sun.jnu.encoding: Cp1252
Locale info: en_US
Numbers with default locale: 1234567890 -> 1234567890
VM arguments: [-Djpackage.app-version=1.5.19307, -XX:MaxRAMPercentage=75.0, --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 (Debug).exe]
Dataset consistency test: No problems found

Plugins:
+ FastDraw (36379)
+ MicrosoftStreetside (36379)
+ apache-commons (36379)
+ apache-http (36379)
+ buildings_tools (36382)
+ conflation (259)
+ ejml (36379)
+ geotools (36379)
+ imagery_offset_db (36379)
+ jackson (36379)
+ javafx (36379)
+ jaxb (36379)
+ jna (36379)
+ jts (36379)
+ log4j (36379)
+ mapwithai (837)
+ opendata (36379)
+ pmtiles (36379)
+ reverter (36379)
+ tageditor (36379)
+ terracer (36379)
+ turnlanes-tagging (1736422495)
+ turnrestrictions (36379)
+ utilsplugin2 (36379)

Map paint styles:
- https://josm.openstreetmap.de/josmfile?page=Styles/MapWithAI&zip=1
+ https://josm.openstreetmap.de/josmfile?page=Styles/SlovakiaBicycleRoutes&zip=1
- https://josm.openstreetmap.de/josmfile?page=Styles/Enhanced_Lane_and_Road_Attributes&zip=1
- https://josm.openstreetmap.de/josmfile?page=Styles/Cycleways&zip=1
- https://josm.openstreetmap.de/josmfile?page=Styles/Lane_and_Road_Attributes&zip=1

Last errors/warnings:
- 00027.920 W: java.io.IOException: Attribution is not loaded yet
- 00027.920 W: java.io.IOException: Attribution is not loaded yet
- 00027.921 W: java.io.IOException: Attribution is not loaded yet
- 00027.921 W: java.io.IOException: Attribution is not loaded yet
- 00027.921 W: java.io.IOException: Attribution is not loaded yet
- 00027.922 W: java.io.IOException: Attribution is not loaded yet
- 00027.923 W: java.io.IOException: Attribution is not loaded yet
- 00027.923 W: java.io.IOException: Attribution is not loaded yet
- 00027.924 W: java.io.IOException: Attribution is not loaded yet
- 00028.350 E: Handled by bug report queue: java.lang.NullPointerException: Cannot invoke ""java.lang.CharSequence.toString()"" because ""<parameter2>"" is null



=== REPORTED CRASH DATA ===
BugReportExceptionHandler#handleException:
No data collected.

Warning issued by: BugReportExceptionHandler#handleException

=== STACK TRACE ===
Thread: bing-attribution-loader-timer (400)
java.lang.NullPointerException: Cannot invoke ""java.lang.CharSequence.toString()"" because ""<parameter2>"" is null
	at java.base/java.lang.String.replace(Unknown Source)
	at org.openstreetmap.gui.jmapviewer.tilesources.BingAerialTileSource.getAttributionUrl(BingAerialTileSource.java:134)
	at org.openstreetmap.josm.data.imagery.CachedAttributionBingAerialTileSource.access$100(CachedAttributionBingAerialTileSource.java:37)
	at org.openstreetmap.josm.data.imagery.CachedAttributionBingAerialTileSource$BingAttributionData.isOffline(CachedAttributionBingAerialTileSource.java:82)
	at org.openstreetmap.josm.io.CacheCustomContent.needsUpdate(CacheCustomContent.java:90)
	at org.openstreetmap.josm.io.CacheCustomContent.updateIfRequiredString(CacheCustomContent.java:120)
	at org.openstreetmap.josm.data.imagery.CachedAttributionBingAerialTileSource$AttributionTimerTask.run(CachedAttributionBingAerialTileSource.java:142)
	at java.base/java.util.TimerThread.mainLoop(Unknown Source)
	at java.base/java.util.TimerThread.run(Unknown Source)
}}}
"	defect	closed	major		Core		duplicate	template_report	
