Modify

Opened 2 years ago

Closed 21 months ago

Last modified 21 months ago

#22100 closed defect (fixed)

NumberFormatException in IndoorHelperController.unsetSpecificKeyFilter (-0.5 is not an int)

Reported by: anonymous Owned by: rebsc
Priority: normal Milestone:
Component: Plugin ​indoorhelper Version:
Keywords: template_report Cc:

Description

What steps will reproduce the problem?

  1. Changing level to an existent intermediate floor (-0.5, 0.5, 1.5)

What is the expected result?

Nothing should happen (just switch to the intermediary floor, which happens ok)

What happens instead?

"Update plugins" window pops up ("An unexpected error occurred"). When closing it, Bug report pops up.

Please provide any additional information below. Attach a screenshot if possible.

Relative:URL: ^/trunk
Repository:UUID: 0c6e7542-c601-0410-84e7-c038aed88b3b
Last:Changed Date: 2022-05-29 21:53:52 +0200 (Sun, 29 May 2022)
Revision:18463
Build-Date:2022-05-30 01:30:57
URL:https://josm.openstreetmap.de/svn/trunk

Identification: JOSM/1.5 (18463 en) Windows 10 64-Bit
OS Build number: Windows 10 Pro 2009 (19042)
Memory Usage: 267 MB / 4066 MB (138 MB allocated, but free)
Java version: 11.0.15+10-LTS, Azul Systems, Inc., OpenJDK 64-Bit Server VM
Look and Feel: com.sun.java.swing.plaf.windows.WindowsLookAndFeel
Screen: \Display0 1920×1080 (scaling 1.00×1.00)
Maximum Screen Size: 1920×1080
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_DE
Numbers with default locale: 1234567890 -> 1234567890
VM arguments: [-Dicedtea-web.bin.location=%UserProfile%\AppData\Local\Programs\OpenWebStart\javaws, -Djava.util.Arrays.useLegacyMergeSort=true, --add-exports=jdk.deploy/com.sun.deploy.config=ALL-UNNAMED, --add-opens=java.desktop/javax.swing.text.html=ALL-UNNAMED, --add-reads=java.naming=ALL-UNNAMED,java.desktop, --add-exports=java.base/sun.security.action=ALL-UNNAMED,java.desktop, --add-reads=java.base=ALL-UNNAMED,java.desktop, --add-exports=java.naming/com.sun.jndi.toolkit.url=ALL-UNNAMED,java.desktop, --add-opens=java.base/jdk.internal.loader=ALL-UNNAMED, --add-exports=java.desktop/com.apple.eawt=ALL-UNNAMED, --add-exports=java.desktop/sun.awt=ALL-UNNAMED,java.desktop, --add-opens=java.base/jdk.internal.ref=ALL-UNNAMED, --add-exports=java.base/sun.security.validator=ALL-UNNAMED,java.desktop, --add-exports=java.desktop/com.sun.imageio.plugins.jpeg=ALL-UNNAMED, --add-exports=java.base/sun.net.www.protocol.jar=ALL-UNNAMED,java.desktop, --add-exports=java.base/jdk.internal.util.jar=ALL-UNNAMED,java.desktop, --add-opens=java.prefs/java.util.prefs=ALL-UNNAMED, --add-exports=java.base/com.sun.net.ssl.internal.ssl=ALL-UNNAMED,java.desktop, --add-exports=javafx.graphics/com.sun.javafx.application=ALL-UNNAMED, --add-modules=java.scripting,java.sql,javafx.controls,javafx.media,javafx.swing,javafx.web, --add-exports=java.desktop/sun.awt.X11=ALL-UNNAMED,java.desktop, --add-exports=java.desktop/sun.applet=ALL-UNNAMED,java.desktop,jdk.jsobject, --add-exports=java.base/sun.net.www.protocol.http=ALL-UNNAMED,java.desktop, --add-opens=java.base/java.lang=ALL-UNNAMED, --add-exports=java.base/sun.security.util=ALL-UNNAMED,java.desktop, --add-exports=java.desktop/com.sun.imageio.spi=ALL-UNNAMED, --add-reads=java.desktop=ALL-UNNAMED,java.naming, --add-opens=java.base/java.nio=ALL-UNNAMED, --add-exports=java.base/sun.security.x509=ALL-UNNAMED,java.desktop, --add-opens=java.desktop/javax.imageio.spi=ALL-UNNAMED, --add-exports=java.desktop/javax.jnlp=ALL-UNNAMED,java.desktop, --add-exports=java.base/sun.security.provider=ALL-UNNAMED,java.desktop]
Dataset consistency test: No problems found

Plugins:
+ PicLayer (1.0.1)
+ indoorhelper (1.2.0)

Map paint styles:
- <josm.pref>\styles\sit.mapcss
+ <josm.pref>\styles\sit.mapcss

Last errors/warnings:
- 01748.355 E: Failed to locate image 'entrance_icon.png'
- 01748.360 E: Failed to locate image 'entrance_icon.png'
- 01748.364 E: Failed to locate image 'entrance_icon.png'
- 01748.563 E: Failed to locate image 'entrance_icon.png'
- 01748.568 E: Failed to locate image 'entrance_icon.png'
- 01748.574 E: Failed to locate image 'entrance_icon.png'
- 01748.579 E: Failed to locate image 'entrance_icon.png'
- 01748.583 E: Failed to locate image 'entrance_icon.png'
- 01748.587 E: Failed to locate image 'entrance_icon.png'
- 01756.282 E: Handled by bug report queue: java.lang.NumberFormatException: For input string: "-0.5"



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

Warning issued by: BugReportExceptionHandler#handleException

=== STACK TRACE ===
Thread: AWT-EventQueue-1 (56) of JOSM
java.lang.NumberFormatException: For input string: "-0.5"
	at java.base/java.lang.NumberFormatException.forInputString(NumberFormatException.java:65)
	at java.base/java.lang.Integer.parseInt(Integer.java:652)
	at java.base/java.lang.Integer.parseInt(Integer.java:770)
	at controller.IndoorHelperController.unsetSpecificKeyFilter(IndoorHelperController.java:380)
	at org.openstreetmap.josm.plugins.indoorhelper.IndoorHelperPlugin.paintableInvalidated(IndoorHelperPlugin.java:109)
	at org.openstreetmap.josm.gui.layer.AbstractMapViewPaintable.invalidate(AbstractMapViewPaintable.java:89)
	at org.openstreetmap.josm.gui.layer.OsmDataLayer.processDatasetEvent(OsmDataLayer.java:1165)
	at org.openstreetmap.josm.data.osm.event.DataSetListenerAdapter.otherDatasetChange(DataSetListenerAdapter.java:71)
	at org.openstreetmap.josm.data.osm.event.FilterChangedEvent.fire(FilterChangedEvent.java:26)
	at org.openstreetmap.josm.data.osm.DataSet.fireEventToListeners(DataSet.java:1035)
	at org.openstreetmap.josm.data.osm.DataSet.endUpdate(DataSet.java:966)
	at org.openstreetmap.josm.data.osm.FilterModel.executeFilters(FilterModel.java:135)
	at org.openstreetmap.josm.gui.autofilter.AutoFilterManager.setCurrentAutoFilter(AutoFilterManager.java:401)
	at org.openstreetmap.josm.gui.autofilter.AutoFilterButton$1.actionPerformed(AutoFilterButton.java:43)
	at java.desktop/javax.swing.AbstractButton.fireActionPerformed(AbstractButton.java:1967)
	at java.desktop/javax.swing.AbstractButton$Handler.actionPerformed(AbstractButton.java:2308)
	at java.desktop/javax.swing.DefaultButtonModel.fireActionPerformed(DefaultButtonModel.java:405)
	at java.desktop/javax.swing.DefaultButtonModel.setPressed(DefaultButtonModel.java:262)
	at java.desktop/javax.swing.plaf.basic.BasicButtonListener.mouseReleased(BasicButtonListener.java:279)
	at java.desktop/java.awt.AWTEventMulticaster.mouseReleased(AWTEventMulticaster.java:297)
	at java.desktop/java.awt.Component.processMouseEvent(Component.java:6635)
	at java.desktop/javax.swing.JComponent.processMouseEvent(JComponent.java:3342)
	at java.desktop/java.awt.Component.processEvent(Component.java:6400)
	at java.desktop/java.awt.Container.processEvent(Container.java:2263)
	at java.desktop/java.awt.Component.dispatchEventImpl(Component.java:5011)
	at java.desktop/java.awt.Container.dispatchEventImpl(Container.java:2321)
	at java.desktop/java.awt.Component.dispatchEvent(Component.java:4843)
	at java.desktop/java.awt.LightweightDispatcher.retargetMouseEvent(Container.java:4918)
	at java.desktop/java.awt.LightweightDispatcher.processMouseEvent(Container.java:4547)
	at java.desktop/java.awt.LightweightDispatcher.dispatchEvent(Container.java:4488)
	at java.desktop/java.awt.Container.dispatchEventImpl(Container.java:2307)
	at java.desktop/java.awt.Window.dispatchEventImpl(Window.java:2772)
	at java.desktop/java.awt.Component.dispatchEvent(Component.java:4843)
	at java.desktop/java.awt.EventQueue.dispatchEventImpl(EventQueue.java:772)
	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.base/java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:95)
	at java.desktop/java.awt.EventQueue$5.run(EventQueue.java:745)
	at java.desktop/java.awt.EventQueue$5.run(EventQueue.java:743)
	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:742)
	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 (0)

Change History (5)

comment:1 by taylor.smock, 2 years ago

Component: CorePlugin ​indoorhelper
Owner: changed from team to rebsc
Summary: "Update plugins"NumberFormatException in IndoorHelperController.unsetSpecificKeyFilter (-0.5 is not an int)

comment:2 by taylor.smock, 2 years ago

It looks like the version that JOSM has for the latest version isn't the latest version. I've updated the wiki page.

comment:3 by taylor.smock, 2 years ago

Better stack trace for current code (v1.2.1):

Revision:18458
Is-Local-Build:true
Build-Date:2022-05-26 06:40:20

Identification: JOSM/1.5 (18458 SVN en) Mac OS X 12.4
OS Build number: macOS 12.4 (21F79)
Memory Usage: 692 MB / 4096 MB (172 MB allocated, but free)
Java version: 17.0.3+7-LTS, Azul Systems, Inc., OpenJDK 64-Bit Server VM
Look and Feel: com.apple.laf.AquaLookAndFeel
Screen: Display 188945233 1920×1080 (scaling 1.00×1.00) Display 188945231 1920×1080 (scaling 1.00×1.00) Display 69733382 1680×1050 (scaling 2.00×2.00)
Maximum Screen Size: 1920×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_US
Numbers with default locale: 1234567890 -> 1234567890
VM arguments: [-agentlib:jdwp=transport=dt_socket,address=127.0.0.1:50743,suspend=y,server=n, -javaagent:/Users/tsmock/Library/Caches/JetBrains/IntelliJIdea2022.1/captureAgent/debugger-agent.jar, -Dfile.encoding=UTF-8]
Dataset consistency test: No problems found

Plugins:
+ ImportImagePlugin (35893)
+ apache-commons (35924)
+ apache-http (35924)
+ ejml (35924)
+ geotools (35959)
+ imagery_offset_db (35893)
+ indoorhelper (35498)
+ jackson (35958)
+ jaxb (35952)
+ jna (35924)
+ jts (35924)
+ log4j (35924)
+ mapwithai (1.9.13)
+ opendata (35910)
+ pTerry (v0.2.1)
+ utilsplugin2 (35970)

Map paint styles:
- ${HOME}/workspace/josm/core/test.mapcss
+ https://josm.openstreetmap.de/josmfile?page=Styles/MapWithAI&zip=1
+ <josm.userdata>/plugins/indoorhelper/resources/sit.mapcss

Validator rules:
+ ${HOME}/workspace/josm/core/test.validator.mapcss

Last errors/warnings:
- 00004.102 W: Missing plugin main version in plugin lwjgl-sources
- 00004.834 W: Failed to register with macOS: java.lang.IllegalAccessException: class org.openstreetmap.josm.tools.PlatformHookOsx cannot access class com.apple.eawt.Application (in module java.desktop) because module java.desktop does not export com.apple.eawt to unnamed module @4445629
- 00010.908 E: Cannot add MapCSS rule: Cannot add instruction type: Keyword{string}!
- 00010.908 E: Cannot add MapCSS rule: Cannot add instruction type: Keyword{string}!
- 00010.909 E: Cannot add MapCSS rule: Cannot add instruction type: Keyword{color}!
- 00010.909 E: Cannot add MapCSS rule: Cannot add instruction type: Keyword{double}!
- 00010.910 E: Cannot add MapCSS rule: Cannot add instruction casing-width: 4.0!
- 00010.910 E: Cannot add MapCSS rule: Cannot add instruction symbol-shape: Keyword{circle}!
- 00129.408 E: Handled by bug report queue: java.lang.NullPointerException: Cannot invoke "org.openstreetmap.josm.plugins.indoorhelper.model.TagCatalog$IndoorObject.ordinal()" because "o" is null
- 00299.212 E: Handled by bug report queue: java.lang.NumberFormatException: For input string: "0.5"



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

Warning issued by: BugReportExceptionHandler#handleException

=== STACK TRACE ===
Thread: AWT-EventQueue-0 (26) of main
java.lang.NumberFormatException: For input string: "0.5"
	at java.base/java.lang.NumberFormatException.forInputString(NumberFormatException.java:67)
	at java.base/java.lang.Integer.parseInt(Integer.java:668)
	at java.base/java.lang.Integer.parseInt(Integer.java:786)
	at org.openstreetmap.josm.plugins.indoorhelper.controller.IndoorHelperController.unsetSpecificKeyFilter(IndoorHelperController.java:382)
	at org.openstreetmap.josm.plugins.indoorhelper.IndoorHelperPlugin.paintableInvalidated(IndoorHelperPlugin.java:111)
	at org.openstreetmap.josm.gui.layer.AbstractMapViewPaintable.invalidate(AbstractMapViewPaintable.java:89)
	at org.openstreetmap.josm.gui.layer.OsmDataLayer.processDatasetEvent(OsmDataLayer.java:1165)
	at org.openstreetmap.josm.data.osm.event.DataSetListenerAdapter.otherDatasetChange(DataSetListenerAdapter.java:71)
	at org.openstreetmap.josm.data.osm.event.FilterChangedEvent.fire(FilterChangedEvent.java:26)
	at org.openstreetmap.josm.data.osm.DataSet.fireEventToListeners(DataSet.java:1035)
	at org.openstreetmap.josm.data.osm.DataSet.endUpdate(DataSet.java:966)
	at org.openstreetmap.josm.data.osm.FilterModel.executeFilters(FilterModel.java:135)
	at org.openstreetmap.josm.gui.autofilter.AutoFilterManager.setCurrentAutoFilter(AutoFilterManager.java:401)
	at org.openstreetmap.josm.gui.autofilter.AutoFilterButton$1.actionPerformed(AutoFilterButton.java:43)
	at java.desktop/javax.swing.AbstractButton.fireActionPerformed(AbstractButton.java:1972)
	at java.desktop/javax.swing.AbstractButton$Handler.actionPerformed(AbstractButton.java:2313)
	at java.desktop/javax.swing.DefaultButtonModel.fireActionPerformed(DefaultButtonModel.java:405)
	at java.desktop/javax.swing.DefaultButtonModel.setPressed(DefaultButtonModel.java:262)
	at java.desktop/javax.swing.plaf.basic.BasicButtonListener.mouseReleased(BasicButtonListener.java:279)
	at java.desktop/java.awt.AWTEventMulticaster.mouseReleased(AWTEventMulticaster.java:297)
	at java.desktop/java.awt.Component.processMouseEvent(Component.java:6626)
	at java.desktop/javax.swing.JComponent.processMouseEvent(JComponent.java:3389)
	at java.desktop/java.awt.Component.processEvent(Component.java:6391)
	at java.desktop/java.awt.Container.processEvent(Container.java:2266)
	at java.desktop/java.awt.Component.dispatchEventImpl(Component.java:5001)
	at java.desktop/java.awt.Container.dispatchEventImpl(Container.java:2324)
	at java.desktop/java.awt.Component.dispatchEvent(Component.java:4833)
	at java.desktop/java.awt.LightweightDispatcher.retargetMouseEvent(Container.java:4948)
	at java.desktop/java.awt.LightweightDispatcher.processMouseEvent(Container.java:4575)
	at java.desktop/java.awt.LightweightDispatcher.dispatchEvent(Container.java:4516)
	at java.desktop/java.awt.Container.dispatchEventImpl(Container.java:2310)
	at java.desktop/java.awt.Window.dispatchEventImpl(Window.java:2780)
	at java.desktop/java.awt.Component.dispatchEvent(Component.java:4833)
	at java.desktop/java.awt.EventQueue.dispatchEventImpl(EventQueue.java:773)
	at java.desktop/java.awt.EventQueue$4.run(EventQueue.java:722)
	at java.desktop/java.awt.EventQueue$4.run(EventQueue.java:716)
	at java.base/java.security.AccessController.doPrivileged(AccessController.java:399)
	at java.base/java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:86)
	at java.base/java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:97)
	at java.desktop/java.awt.EventQueue$5.run(EventQueue.java:746)
	at java.desktop/java.awt.EventQueue$5.run(EventQueue.java:744)
	at java.base/java.security.AccessController.doPrivileged(AccessController.java:399)
	at java.base/java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:86)
	at java.desktop/java.awt.EventQueue.dispatchEvent(EventQueue.java:743)
	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)

comment:4 by taylor.smock, 2 years ago

It looks like the plugin assumes that (a) all level tags are valid and (b) all level tags are integers. It would take a fair amount of refactoring to fix this.

See osmwiki:Key:level for more information (it looks like fractional values like 0.5 are still under discussion).

comment:5 by rebsc, 21 months ago

Resolution: fixed
Status: newclosed

Issue handled in Release v1.2.2

Last edited 21 months ago by rebsc (previous) (diff)

Modify Ticket

Change Properties
Set your email in Preferences
Action
as closed The owner will remain rebsc.
as The resolution will be set.
The resolution will be deleted. Next status will be 'reopened'.

Add Comment


E-mail address and name can be saved in the Preferences .
 
Note: See TracTickets for help on using tickets.