Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Validator hits null exception when run on overpass downloaded data set latest JOSM #7

Closed
watmildon opened this issue Sep 26, 2023 · 3 comments
Assignees
Labels
bug Something isn't working

Comments

@watmildon
Copy link

Steps to reproduce:
Install latest plugin on latest JOSM
Download this dataset:

[out:json][timeout:150];
{{geocodeArea:Tennessee, United States}}->.searchArea;
// gather results
  nwr["phone"](area.searchArea);
// print results
out body;

Run the validator.

Expected: issues to be fixed up

Actual: null ref

JOSM crash report:
{{{
Revision:18822
Build-Date:2023-08-30 11:44:32

Identification: JOSM/1.5 (18822 en) Windows 10 64-Bit
OS Build number: Windows 10 Pro 2009 (19045)
Memory Usage: 1244 MB / 4088 MB (969 MB allocated, but free)
Java version: 17.0.8+7-LTS, Azul Systems, Inc., OpenJDK 64-Bit Server VM
Look and Feel: com.sun.java.swing.plaf.windows.WindowsLookAndFeel
Screen: \Display0 1440×2560 (scaling 1.00×1.00) \Display1 3840×2160 (scaling 1.50×1.50)
Maximum Screen Size: 3840×2560
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_US
Numbers with default locale: 1234567890 -> 1234567890
VM arguments: [-Djpackage.app-version=1.5.18822, --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:

  • FastDraw (36126)
  • FixAddresses (36126)
  • MapRoulette (21)
  • apache-commons (36034)
  • apache-http (35924)
  • buildings_tools (36134)
  • conflation (0.6.11)
  • continuosDownload (1.3.4)
  • contourmerge (v0.2.0)
  • damn (0.13.1)
  • ejml (35924)
  • geotools (36068)
  • gridify (1606242219)
  • imagery_offset_db (36126)
  • jackson (36034)
  • javafx (36118)
  • jaxb (36118)
  • jna (36126)
  • jts (36004)
  • libphonenumber (8.13.21)
  • log4j (36045)
  • mapwithai (814)
  • opendata (36126)
  • phonenumber (1.0.3)
  • pmtiles (36125)
  • reltoolbox (36142)
  • reverter (36126)
  • shrinkwrap (v1.0.4)
  • tageditor (36126)
  • terracer (36126)
  • todo (133)
  • turnrestrictions (36126)
  • undelete (36126)
  • utilsplugin2 (36134)
  • wikipedia (605)

Map paint styles:

  • %UserProfile%\Address Tags Validator - Highlight unaddressed

Validator rules:

  • C:\OSM\Validator\GNISFixup.validator.mapcss
  • C:\OSM\josm-validator-rules\josm-validator-rules\rules\USStreetNameExpander-PrefixDirectional.validator.mapcss
  • C:\OSM\josm-validator-rules\josm-validator-rules\rules\USStreetNameExpander-PostfixDirectional.validator.mapcss
  • C:\OSM\josm-validator-rules\josm-validator-rules\rules\USStreetNameExpander.validator.mapcss
  • C:\OSM\josm-validator-rules\josm-validator-rules\rules\ALLCAPS-to-TitleCase.validator.mapcss
  • C:\OSM\josm-validator-rules\josm-validator-rules\rules\PhoneNumber-ITU-T-Formatter.validator.mapcss
  • C:\OSM\josm-validator-rules\josm-validator-rules\rules\ImportCleanup-San-Luis-Obispo-County.validator.mapcss
  • C:\OSM\josm-validator-rules\josm-validator-rules\rules\PhoneNumber-ITU-T-Formatter-Aggressive.validator.mapcss
  • C:\OSM\josm-validator-rules\josm-validator-rules\rules\NameTagCapitalization.validator.mapcss
  • C:\OSM\josm-validator-rules\josm-validator-rules\rules\LevelNotLayerIssues.validator.mapcss
  • C:\OSM\josm-validator-rules\josm-validator-rules\rules\CuisineFixups.validator.mapcss
  • C:\OSM\josm-validator-rules\josm-validator-rules\rules\FullAddressInStreetTag.validator.mapcss
  • C:\OSM\josm-validator-rules\josm-validator-rules\rules\RemoveCOVID19Tagging.validator.mapcss
  • C:\OSM\josm-validator-rules\josm-validator-rules\rules\whammo-PhoneFixup.validator.mapcss

Last errors/warnings:

  • 00000.512 W: extended font config - overriding 'filename.Myanmar_Text=mmrtext.ttf' with 'MMRTEXT.TTF'
  • 00000.515 W: extended font config - overriding 'filename.Mongolian_Baiti=monbaiti.ttf' with 'MONBAITI.TTF'
  • 00001.261 E: java.security.KeyStoreException: Windows-ROOT not found. Cause: java.security.NoSuchAlgorithmException: Windows-ROOT KeyStore not available
  • 00010.012 E: Failed to locate image 'waterways.svg'
  • 00010.012 W: Mappaint style "standard" (Waterways) icon "waterways.svg" not found.
  • 08102.196 E: Invalid setting (Icon missing): org.openstreetmap.josm.plugins.fixAddresses.FixAddressesPreferences
  • 08119.053 E: Invalid setting (Icon missing): org.openstreetmap.josm.plugins.fixAddresses.FixAddressesPreferences
  • 08209.907 E: Invalid setting (Icon missing): org.openstreetmap.josm.plugins.fixAddresses.FixAddressesPreferences
  • 08300.577 E: Handled by bug report queue: java.lang.NullPointerException: phoneNumberUtil.getRegio…odeForNumber(phoneNumber) must not be null

=== REPORTED CRASH DATA ===
BugReportExceptionHandler#handleException:
No data collected.

Warning issued by: BugReportExceptionHandler#handleException

=== STACK TRACE ===
Thread: AWT-EventQueue-0 (24) of main
java.lang.NullPointerException: phoneNumberUtil.getRegio…odeForNumber(phoneNumber) must not be null
at com.github.gabortim.phonenumber.tool.NumberFormatter.getRegionCode(NumberFormatter.kt:163)
at com.github.gabortim.phonenumber.tool.NumberFormatter.format(NumberFormatter.kt:72)
at com.github.gabortim.phonenumber.test.PhoneNumber.categorizeTags(PhoneNumber.kt:129)
at com.github.gabortim.phonenumber.test.PhoneNumber.(PhoneNumber.kt:101)
at com.github.gabortim.phonenumber.test.PhoneNumberValidator.check(PhoneNumberValidator.kt:104)
at org.openstreetmap.josm.data.validation.Test$TagTest.visit(Test.java:134)
at org.openstreetmap.josm.data.osm.Way.accept(Way.java:180)
at org.openstreetmap.josm.data.validation.Test.visit(Test.java:216)
at org.openstreetmap.josm.data.validation.ValidationTask.realRun(ValidationTask.java:136)
at org.openstreetmap.josm.gui.PleaseWaitRunnable.doRealRun(PleaseWaitRunnable.java:94)
at org.openstreetmap.josm.gui.PleaseWaitRunnable.run(PleaseWaitRunnable.java:142)
at java.base/java.util.concurrent.Executors$RunnableAdapter.call(Unknown Source)
at java.base/java.util.concurrent.FutureTask.run(Unknown Source)
at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
at java.base/java.lang.Thread.run(Unknown Source)
}}}

@gabortim gabortim self-assigned this Sep 26, 2023
@gabortim gabortim added the bug Something isn't working label Sep 26, 2023
@gabortim
Copy link
Owner

gabortim commented Sep 30, 2023

Thank you for the report! I reproduced the issue locally and prepared the fix, but there is another bug that can delete some invalid numbers in case of an autofix.

This ticket will be closed automatically when I push the commits, I'll let you know when the fix is released.

@watmildon
Copy link
Author

Thank you!!

@gabortim
Copy link
Owner

gabortim commented Oct 7, 2023

@watmildon Version 1.1.1 has been released and will be available in JOSM in approximately 10 minutes. Please test it and report if you encounter any issues. Thank you!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants