Opened 4 years ago
Closed 4 years ago
#20933 closed defect (fixed)
[PATCH] NumberFormatException: For input string: "333,662"
Reported by: | anonymous | Owned by: | team |
---|---|---|---|
Priority: | normal | Milestone: | 21.05 |
Component: | Core imagery | Version: | |
Keywords: | template_report | Cc: |
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.
Relative:URL: ^/trunk Repository:UUID: 0c6e7542-c601-0410-84e7-c038aed88b3b Last:Changed Date: 2021-05-17 21:27:21 +0200 (Mon, 17 May 2021) Revision:17903 Build-Date:2021-05-18 01:31:02 URL:https://josm.openstreetmap.de/svn/trunk Identification: JOSM/1.5 (17903 uk) Mac OS X 11.3 OS Build number: macOS 11.3.1 (20E241) Memory Usage: 4096 MB / 4096 MB (1025 MB allocated, but free) Java version: 11.0.11+9, AdoptOpenJDK, OpenJDK 64-Bit Server VM Look and Feel: com.apple.laf.AquaLookAndFeel Screen: Display 188933191 3200×1800 (scaling 2.00×2.00) Display 69734662 2048×1280 (scaling 2.00×2.00) Maximum Screen Size: 3200×1800 Best cursor sizes: 16×16→16×16, 32×32→32×32 Environment variable LANG: uk_UA.UTF-8 System property file.encoding: UTF-8 System property sun.jnu.encoding: UTF-8 Locale info: uk_UA Numbers with default locale: 1234567890 -> 1234567890 Dataset consistency test: No problems found Plugins: + CustomizePublicTransportStop (35760) + Lanes (${version.entry.commit.revision}) + Mapillary (2.0.0-alpha.5) + apache-commons (35524) + apache-http (35589) + continuosDownload (91) + contourmerge (v0.1.8) + gpsblam (35458) + imagery_offset_db (35640) + jna (35662) + mapwithai (1.8.1) + pt_assistant (1ff2e15) + tageditor (35640) + turnlanes-tagging (288) + turnrestrictions (35640) + utilsplugin2 (35691) Map paint styles: - https://josm.openstreetmap.de/josmfile?page=Styles/PublicTransport&zip=1 + https://josm.openstreetmap.de/josmfile?page=Styles/MapWithAI&zip=1 Last errors/warnings: - 00017.416 E: Збій пошуку зображення 'regulatory--texts--g2' - 00017.753 E: Збій пошуку зображення 'void--car-mount' - 00017.753 E: Збій пошуку зображення 'void--dynamic' - 00017.754 E: Збій пошуку зображення 'void--ego-vehicle' - 00017.755 E: Збій пошуку зображення 'void--ground' - 00017.755 E: Збій пошуку зображення 'void--static' - 00017.924 E: Збій пошуку зображення 'warning--kangaroo-crossing--g1' - 00097.353 E: Handled by bug report queue: java.lang.NumberFormatException: For input string: "333,662" - 00098.091 E: Handled by bug report queue: java.lang.NumberFormatException: For input string: "333,662" - 00100.360 E: Handled by bug report queue: java.lang.NumberFormatException: For input string: "333,662" === REPORTED CRASH DATA === MapView#paintLayer: - layer: MapillaryLayer [info=Знімки Mapillary[] ('Глобальне) - https://tiles3.mapillary.com/v0.1/{z}/{x}/{y}.mvt - MVT] Warning issued by: MapView#paintLayer === STACK TRACE === Thread: AWT-EventQueue-0 (21) of main java.lang.NumberFormatException: For input string: "333,662" at java.base/jdk.internal.math.FloatingDecimal.readJavaFormatString(FloatingDecimal.java:2054) at java.base/jdk.internal.math.FloatingDecimal.parseDouble(FloatingDecimal.java:110) at java.base/java.lang.Double.parseDouble(Double.java:543) at org.openstreetmap.josm.plugins.mapillary.utils.MapillaryImageUtils.getAngle(MapillaryImageUtils.java:117) at org.openstreetmap.josm.plugins.mapillary.gui.layer.MapillaryLayer.drawImageMarker(MapillaryLayer.java:401) at org.openstreetmap.josm.plugins.mapillary.gui.layer.MapillaryLayer.paintWithLock(MapillaryLayer.java:316) at org.openstreetmap.josm.plugins.mapillary.gui.layer.MapillaryLayer.paint(MapillaryLayer.java:268) at org.openstreetmap.josm.gui.layer.AbstractTileSourceLayer$TileSourcePainter.paint(AbstractTileSourceLayer.java:2010) at org.openstreetmap.josm.gui.MapView.paintLayer(MapView.java:468) at org.openstreetmap.josm.gui.MapView.drawMapContent(MapView.java:583) at org.openstreetmap.josm.gui.MapView.paint(MapView.java:490) at java.desktop/javax.swing.JComponent.paintChildren(JComponent.java:907) at java.desktop/javax.swing.JComponent.paint(JComponent.java:1083) at java.desktop/javax.swing.JComponent.paintToOffscreen(JComponent.java:5255) at java.desktop/javax.swing.RepaintManager$PaintManager.paintDoubleBufferedImpl(RepaintManager.java:1643) at java.desktop/javax.swing.RepaintManager$PaintManager.paintDoubleBuffered(RepaintManager.java:1618) at java.desktop/javax.swing.RepaintManager$PaintManager.paint(RepaintManager.java:1556) at java.desktop/javax.swing.RepaintManager.paint(RepaintManager.java:1323) at java.desktop/javax.swing.JComponent._paintImmediately(JComponent.java:5203) at java.desktop/javax.swing.JComponent.paintImmediately(JComponent.java:5013) at java.desktop/javax.swing.RepaintManager$4.run(RepaintManager.java:865) at java.desktop/javax.swing.RepaintManager$4.run(RepaintManager.java:848) at java.base/java.security.AccessController.doPrivileged(Native Method) at java.base/java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:85) at java.desktop/javax.swing.RepaintManager.paintDirtyRegions(RepaintManager.java:848) at java.desktop/javax.swing.RepaintManager.paintDirtyRegions(RepaintManager.java:823) at java.desktop/javax.swing.RepaintManager.prePaintDirtyRegions(RepaintManager.java:772) at java.desktop/javax.swing.RepaintManager$ProcessingRunnable.run(RepaintManager.java:1890) at java.desktop/java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:313) at java.desktop/java.awt.EventQueue.dispatchEventImpl(EventQueue.java:770) at java.desktop/java.awt.EventQueue$4.run(EventQueue.java:721) at java.desktop/java.awt.EventQueue$4.run(EventQueue.java:715) at java.base/java.security.AccessController.doPrivileged(Native Method) at java.base/java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:85) at java.desktop/java.awt.EventQueue.dispatchEvent(EventQueue.java:740) at java.desktop/java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:203) at java.desktop/java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:124) at java.desktop/java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:113) at java.desktop/java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:109) at java.desktop/java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:101) at java.desktop/java.awt.EventDispatchThread.run(EventDispatchThread.java:90)
Attachments (1)
Change History (9)
comment:1 by , 4 years ago
Component: | Core → Plugin mapillary |
---|---|
Owner: | changed from | to
Summary: | Crash → NumberFormatException: For input string: "333,662" |
comment:2 by , 4 years ago
Good question. I have never seen anything like that (333,662
) in my testing. I've only ever seen valid angles in the tiles that I've checked.
I'm kind of wondering if it is a locale issue -- 333.662
_is_ a valid angle, while 333,662
is not (as far as numbers in Java go).
I think I am converting from radians to degrees somewhere, and the string conversion might be messing stuff up (when it gets stored as a tag).
comment:3 by , 4 years ago
Well, it is string conversion. But it is in the Mapbox Vector Tile code (oops...).
So, we have two choices:
1) Format numbers as strings in such a way as to ensure that they can be parsed again
2) I do some kind of replace
in the Mapillary plugin.
I'll attach a patch for (1) in a bit. I'm kind of thinking that we should stick with the same representation for numbers throughout, and OSM already defaults to .
for decimals instead of ,
.
comment:4 by , 4 years ago
Component: | Plugin mapillary → Core imagery |
---|---|
Owner: | changed from | to
comment:5 by , 4 years ago
https://gitlab.com/smocktaylor/josm/-/merge_requests/5
I'm working on a non-regression test right now.
comment:6 by , 4 years ago
Summary: | NumberFormatException: For input string: "333,662" → [PATCH] NumberFormatException: For input string: "333,662" |
---|
I've added a non-regression test. It uses the I18n
annotation that I wrote for #16567 (moving JOSMTestRules into annotations).
I copied it here since it allows me to test multiple languages in the same class.
by , 4 years ago
Attachment: | 20933.patch added |
---|
comment:7 by , 4 years ago
Milestone: | → 21.05 |
---|
Is this a java bug or a problem of the plugin?