Modify

Opened 7 months ago

Closed 7 months ago

#18167 closed defect (duplicate)

ClassCastException: QuadStateCheckBox$QuadStateDecorator cannot be cast to ToggleButtonModel

Reported by: drnoble@… Owned by: team
Priority: normal Milestone:
Component: Core Version:
Keywords: template_report java9 Cc:

Description

What steps will reproduce the problem?

  1. Select a node
  2. Click Barriers > Gate icons in toolbar
  3. Error message appears (twice)

What is the expected result?

What happens instead?

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

This doesn't seem to happen when selecting Presents Menu > Highways > Barriers > Gate, and has only been happening in the latest version of JOSM

Relative:URL: ^/trunk
Repository:UUID: 0c6e7542-c601-0410-84e7-c038aed88b3b
Last:Changed Date: 2019-08-26 08:55:27 +0200 (Mon, 26 Aug 2019)
Revision:15322
Build-Date:2019-08-26 06:57:10
URL:https://josm.openstreetmap.de/svn/trunk

Identification: JOSM/1.5 (15322 en_GB) Mac OS X 10.13.6
OS Build number: Mac OS X 10.13.6 (17G8030)
Memory Usage: 352 MB / 2048 MB (107 MB allocated, but free)
Java version: 9.0.4+11, Oracle Corporation, Java HotSpot(TM) 64-Bit Server VM
Screen: Display 69675265 1440x900
Maximum Screen Size: 1440x900
VM arguments: [-Djava.library.path=/Applications/JOSM.app/Contents/MacOS, -DLibraryDirectory=${HOME}/Library, -DDocumentsDirectory=${HOME}/Documents, -DApplicationSupportDirectory=${HOME}/Library/Application Support, -DCachesDirectory=${HOME}/Library/Caches, -DApplicationDirectory=${HOME}/Applications, -DAutosavedInformationDirectory=${HOME}/Library/Autosave Information, -DDesktopDirectory=${HOME}/Desktop, -DDownloadsDirectory=${HOME}/Downloads, -DMoviesDirectory=${HOME}/Movies, -DMusicDirectory=${HOME}/Music, -DPicturesDirectory=${HOME}/Pictures, -DSharedPublicDirectory=${HOME}/Public, -DSystemLibraryDirectory=/Library, -DSystemApplicationSupportDirectory=/Library/Application Support, -DSystemCachesDirectory=/Library/Caches, -DSystemApplicationDirectory=/Applications, -DSystemUserDirectory=/Users, -DUserHome=${HOME}, -DSandboxEnabled=true, -DLaunchModifierFlags=0, -DLaunchModifierFlagCapsLock=false, -DLaunchModifierFlagShift=false, -DLaunchModifierFlagControl=false, -DLaunchModifierFlagOption=false, -DLaunchModifierFlagCommand=false, -DLaunchModifierFlagNumericPad=false, -DLaunchModifierFlagHelp=false, -DLaunchModifierFlagFunction=false, -Dapple.laf.useScreenMenuBar=true, -Dcom.apple.macos.use-file-dialog-packages=true, -Dcom.apple.macos.useScreenMenuBar=true, -Dcom.apple.mrj.application.apple.menu.about.name=JOSM, -Dcom.apple.smallTabs=true]
Dataset consistency test: No problems found

Plugins:
+ AddrInterpolation (34908)
+ FastDraw (34977)
+ ImportImagePlugin (34908)
+ Mapillary (1.5.18)
+ OpeningHoursEditor (34977)
+ PicLayer (35104)
+ SeaMapEditor (34908)
+ apache-commons (34908)
+ apache-http (34908)
+ buildings_tools (34982)
+ conflation (0.6.3)
+ editgpx (34908)
+ ejml (35049)
+ geojson (124)
+ geotools (34908)
+ jaxb (35014)
+ jna (34908)
+ jts (35064)
+ log4j (34908)
+ opendata (35102)
+ pt_assistant (705)
+ reverter (35084)
+ terracer (34977)
+ turnrestrictions (34977)
+ utilsplugin2 (35098)

Tagging presets:
+ https://josm.openstreetmap.de/josmfile?page=Presets/OneClick&zip=1
+ https://josm.openstreetmap.de/josmfile?page=Presets/Communication_Towers&zip=1
+ https://josm.openstreetmap.de/josmfile?page=Presets/Historical_Objects&zip=1
+ http://zibi.openstreetmap.org.pl/kendzi/k/Simple3dPreset/s3db-preset.zip
+ https://josm.openstreetmap.de/josmfile?page=Presets/Mountainbike&zip=1
+ ${HOME}/Documents/Maps/OSM/JOSM_preset_solar_panel.xml

Map paint styles:
- https://josm.openstreetmap.de/josmfile?page=Styles/PublicTransport&zip=1
- <josm.userdata>/styles/sit.mapcss

Last errors/warnings:
- W: java.net.ConnectException: Connection refused (Connection refused)
- W: java.net.ConnectException: Connection refused (Connection refused)
- E: java.io.IOException: No file found for: http://zibi.openstreetmap.org.pl/kendzi/k/Simple3dPreset/s3db-preset.zip
- E: http://zibi.openstreetmap.org.pl/kendzi/k/Simple3dPreset/s3db-preset.zip
- W: No configuration settings found.  Using hardcoded default values for all pools.
- E: java.io.IOException: Exception fetching data:. Cause: java.io.IOException: Font transform has NaN position
- E: Handled by bug report queue: java.lang.ClassCastException: org.openstreetmap.josm.gui.widgets.QuadStateCheckBox$QuadStateDecorator cannot be cast to java.desktop/javax.swing.JToggleButton$ToggleButtonModel
- E: Handled by bug report queue: java.lang.ClassCastException: org.openstreetmap.josm.gui.widgets.QuadStateCheckBox$QuadStateDecorator cannot be cast to java.desktop/javax.swing.JToggleButton$ToggleButtonModel


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

Warning issued by: BugReportExceptionHandler#handleException

=== STACK TRACE ===
Thread: AWT-EventQueue-0 (20) of main
java.lang.ClassCastException: org.openstreetmap.josm.gui.widgets.QuadStateCheckBox$QuadStateDecorator cannot be cast to java.desktop/javax.swing.JToggleButton$ToggleButtonModel
	at java.desktop/javax.swing.LayoutFocusTraversalPolicy.accept(Unknown Source)
	at java.desktop/javax.swing.SortingFocusTraversalPolicy.getFirstComponent(Unknown Source)
	at java.desktop/javax.swing.LayoutFocusTraversalPolicy.getFirstComponent(Unknown Source)
	at java.desktop/javax.swing.DefaultFocusManager.getFirstComponent(Unknown Source)
	at java.desktop/javax.swing.LegacyGlueFocusTraversalPolicy.getFirstComponent(Unknown Source)
	at java.desktop/javax.swing.LegacyGlueFocusTraversalPolicy.getDefaultComponent(Unknown Source)
	at java.desktop/java.awt.FocusTraversalPolicy.getInitialComponent(Unknown Source)
	at java.desktop/java.awt.Window.getMostRecentFocusOwner(Unknown Source)
	at java.desktop/java.awt.DefaultKeyboardFocusManager.dispatchEvent(Unknown Source)
	at java.desktop/java.awt.Component.dispatchEventImpl(Unknown Source)
	at java.desktop/java.awt.Container.dispatchEventImpl(Unknown Source)
	at java.desktop/java.awt.Window.dispatchEventImpl(Unknown Source)
	at java.desktop/java.awt.Component.dispatchEvent(Unknown Source)
	at java.desktop/java.awt.EventQueue.dispatchEventImpl(Unknown Source)
	at java.desktop/java.awt.EventQueue.access$500(Unknown Source)
	at java.desktop/java.awt.EventQueue$3.run(Unknown Source)
	at java.desktop/java.awt.EventQueue$3.run(Unknown Source)
	at java.base/java.security.AccessController.doPrivileged(Native Method)
	at java.base/java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(Unknown Source)
	at java.base/java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(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(Native Method)
	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.pumpEventsForFilter(Unknown Source)
	at java.desktop/java.awt.WaitDispatchSupport$2.run(Unknown Source)
	at java.desktop/java.awt.WaitDispatchSupport$4.run(Unknown Source)
	at java.desktop/java.awt.WaitDispatchSupport$4.run(Unknown Source)
	at java.base/java.security.AccessController.doPrivileged(Native Method)
	at java.desktop/java.awt.WaitDispatchSupport.enter(Unknown Source)
	at java.desktop/java.awt.Dialog.show(Unknown Source)
	at java.desktop/java.awt.Component.show(Unknown Source)
	at java.desktop/java.awt.Component.setVisible(Unknown Source)
	at java.desktop/java.awt.Window.setVisible(Unknown Source)
	at java.desktop/java.awt.Dialog.setVisible(Unknown Source)
	at org.openstreetmap.josm.gui.ExtendedDialog.setVisible(ExtendedDialog.java:459)
	at org.openstreetmap.josm.gui.ExtendedDialog.showDialog(ExtendedDialog.java:255)
	at org.openstreetmap.josm.gui.tagging.presets.TaggingPreset$PresetDialog.<init>(TaggingPreset.java:468)
	at org.openstreetmap.josm.gui.tagging.presets.TaggingPreset.showDialog(TaggingPreset.java:511)
	at org.openstreetmap.josm.gui.tagging.presets.TaggingPreset.actionPerformed(TaggingPreset.java:404)
	at java.desktop/javax.swing.AbstractButton.fireActionPerformed(Unknown Source)
	at java.desktop/javax.swing.AbstractButton$Handler.actionPerformed(Unknown Source)
	at java.desktop/javax.swing.DefaultButtonModel.fireActionPerformed(Unknown Source)
	at java.desktop/javax.swing.DefaultButtonModel.setPressed(Unknown Source)
	at java.desktop/javax.swing.AbstractButton.doClick(Unknown Source)
	at java.desktop/javax.swing.plaf.basic.BasicMenuItemUI.doClick(Unknown Source)
	at java.desktop/com.apple.laf.AquaMenuItemUI.doClick(Unknown Source)
	at java.desktop/javax.swing.plaf.basic.BasicMenuItemUI$Handler.mouseReleased(Unknown Source)
	at java.desktop/java.awt.Component.processMouseEvent(Unknown Source)
	at java.desktop/javax.swing.JComponent.processMouseEvent(Unknown Source)
	at java.desktop/java.awt.Component.processEvent(Unknown Source)
	at java.desktop/java.awt.Container.processEvent(Unknown Source)
	at java.desktop/java.awt.Component.dispatchEventImpl(Unknown Source)
	at java.desktop/java.awt.Container.dispatchEventImpl(Unknown Source)
	at java.desktop/java.awt.Component.dispatchEvent(Unknown Source)
	at java.desktop/java.awt.LightweightDispatcher.retargetMouseEvent(Unknown Source)
	at java.desktop/java.awt.LightweightDispatcher.processMouseEvent(Unknown Source)
	at java.desktop/java.awt.LightweightDispatcher.dispatchEvent(Unknown Source)
	at java.desktop/java.awt.Container.dispatchEventImpl(Unknown Source)
	at java.desktop/java.awt.Window.dispatchEventImpl(Unknown Source)
	at java.desktop/java.awt.Component.dispatchEvent(Unknown Source)
	at java.desktop/java.awt.EventQueue.dispatchEventImpl(Unknown Source)
	at java.desktop/java.awt.EventQueue.access$500(Unknown Source)
	at java.desktop/java.awt.EventQueue$3.run(Unknown Source)
	at java.desktop/java.awt.EventQueue$3.run(Unknown Source)
	at java.base/java.security.AccessController.doPrivileged(Native Method)
	at java.base/java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(Unknown Source)
	at java.base/java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(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(Native Method)
	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)

Attachments (0)

Change History (1)

comment:1 Changed 7 months ago by Don-vip

Keywords: java9 added
Resolution: duplicate
Status: newclosed
Summary: Error when applying Barrier=Gate presetClassCastException: QuadStateCheckBox$QuadStateDecorator cannot be cast to ToggleButtonModel

Closed as duplicate of #18082.
Java 9 is no longer supported, please upgrade to Java 11 or later.

Modify Ticket

Change Properties
Set your email in Preferences
Action
as closed The owner will remain team.
as The resolution will be set.
The resolution will be deleted.

Add Comment


E-mail address and name can be saved in the Preferences.

 
Note: See TracTickets for help on using tickets.