﻿id	summary	reporter	owner	description	type	status	priority	milestone	component	version	resolution	keywords	cc
22066	Mapwithai not loading in JOSM after update	xpirixii@…	taylor.smock	"==== What steps will reproduce the problem?
1. Update JOSM to 18427
2. Update all JOSM plugins
3. Mapwithai plugins doesn't work

==== What is the expected result?
Plugin updated and work perfectly
==== What happens instead?
Unable to load plugin
==== Please provide any additional information below. Attach a screenshot if possible.
System : MacOS Monterey
Using : OSX package from josm page
{{{
Revision:18427
Build-Date:2022-04-05 19:28:31

Identification: JOSM/1.5 (18427 en) Mac OS X 12.1
OS Build number: macOS 12.1 (21C52)
Memory Usage: 293 MB / 2048 MB (174 MB allocated, but free)
Java version: 17.0.2+8-LTS, Azul Systems, Inc., OpenJDK 64-Bit Server VM
Look and Feel: com.apple.laf.AquaLookAndFeel
Screen: Display 458633203 2560×1080 (scaling 1.00×1.00)
Maximum Screen Size: 2560×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_MG
Numbers with default locale: 1234567890 -> 1234567890
VM arguments: [-Djpackage.app-version=18427, --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.apple.eawt=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=/Applications/JOSM.app/Contents/MacOS/JOSM]

Plugins:
+ FastDraw
+ apache-commons (35924)
+ apache-http (35924)
+ buildings_tools
+ jna (35924)
+ mapwithai
+ todo (30306)
+ utilsplugin2 (35951)

Map paint styles:
+ https://josm.openstreetmap.de/josmfile?page=Styles/MapWithAI&zip=1

Last errors/warnings:
- 00001.068 W: Unexpected parameters for SOCKS proxy. Got host 'null' and port '0'.
- 00001.069 W: The proxy will not be used.
- 00006.043 E: Failed to locate image 'MapWithAI'
- 00006.095 E: Handled by bug report queue: java.lang.NullPointerException: Cannot invoke ""org.openstreetmap.josm.tools.GeoPropertyIndex.getGeoProperty()"" because ""geoPropertyIndex"" is null
- 00006.095 E: org.openstreetmap.josm.plugins.PluginException: An error occurred in plugin mapwithai. Cause: java.lang.reflect.InvocationTargetException. Cause: java.lang.ExceptionInInitializerError. Cause: java.lang.NullPointerException: Cannot invoke ""org.openstreetmap.josm.tools.GeoPropertyIndex.getGeoProperty()"" because ""geoPropertyIndex"" is null
- 00006.108 W: Disable plugin - Could not load plugin 'mapwithai'. Delete from preferences?



=== REPORTED CRASH DATA ===
BugReportExceptionHandler#handleException:
No data collected.

Warning issued by: BugReportExceptionHandler#handleException

=== STACK TRACE ===
Thread: AWT-EventQueue-0 (23) of main
java.lang.NullPointerException: Cannot invoke ""org.openstreetmap.josm.tools.GeoPropertyIndex.getGeoProperty()"" because ""geoPropertyIndex"" is null
	at org.openstreetmap.josm.plugins.mapwithai.data.mapwithai.CountryUtils.getCountryShape(CountryUtils.java:42)
	at org.openstreetmap.josm.plugins.mapwithai.data.mapwithai.MapWithAIInfo.<init>(MapWithAIInfo.java:235)
	at org.openstreetmap.josm.plugins.mapwithai.data.mapwithai.MapWithAILayerInfo.load(MapWithAILayerInfo.java:180)
	at org.openstreetmap.josm.plugins.mapwithai.data.mapwithai.MapWithAILayerInfo.<init>(MapWithAILayerInfo.java:136)
	at org.openstreetmap.josm.plugins.mapwithai.data.mapwithai.MapWithAILayerInfo.getInstance(MapWithAILayerInfo.java:83)
	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)
}}}
"	defect	closed	normal		Plugin mapwithai	latest	fixed	template_report	
