Modify

Opened 7 years ago

Closed 7 years ago

Last modified 5 years ago

#15294 closed defect (fixed)

Java 9: CCE: QuadStateCheckBox$QuadStateDecorator cannot be cast to JToggleButton$ToggleButtonModel

Reported by: jirislaby@… Owned by: team
Priority: major Milestone: 17.09
Component: Core Version:
Keywords: template_report java9 Cc:

Description

What steps will reproduce the problem?

  1. select residential highway
  2. edit highway parameters
  3. click on access
  4. crash

What is the expected result?

no ClassCastException

What happens instead?

ClassCastException

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

Relative:URL: ^/trunk
Repository:UUID: 0c6e7542-c601-0410-84e7-c038aed88b3b
Last:Changed Date: 2017-09-12 00:58:32 +0200 (Tue, 12 Sep 2017)
Revision:12826
Build-Date:2017-09-12 01:31:04
URL:http://josm.openstreetmap.de/svn/trunk

Identification: JOSM/1.5 (12826 en) Linux openSUSE Tumbleweed
Memory Usage: 642 MB / 910 MB (113 MB allocated, but free)
Java version: 9-internal+0-adhoc.abuild.jdk9-b656dea9398e, Oracle Corporation, OpenJDK 64-Bit Server VM
Screen: :0.0 1366x768, :0.1 1920x1080
Maximum Screen Size: 1920x1080
Java package: openjdk-9-jre:balíček openjdk-9-jre není nainstalován
Dataset consistency test: No problems found

Plugins:
+ BuildingGeneralization (1010)
+ FastDraw (33583)
+ FixAddresses (33182)
+ RoadSigns (33579)
+ Tracer-testing (1505043416)
+ buildings_tools (33004)
+ czechaddress (33252)
+ ejml (32680)
+ geotools (33380)
+ indoorhelper (33088)
+ jts (32699)
+ log4j (32699)
+ measurement (33088)
+ osmarender (33004)
+ public_transport (33166)
+ public_transport_layer (33528)
+ reverter (33572)
+ routing (33004)
+ scripting (30771)
+ tageditor (33579)
+ turnlanes (33294)
+ turnlanes-tagging (254)
+ turnrestrictions (33537)
+ undelete (33480)

Map paint styles:
+ https://josm.openstreetmap.de/josmfile?page=Styles/Lane_and_Road_Attributes&zip=1
- https://github.com/bastik/mapcss-tools/raw/osm/mapnik2mapcss/osm-results/mapnik.zip
+ https://josm.openstreetmap.de/josmfile?page=Styles/Maxspeed&style&zip=1
+ https://josm.openstreetmap.de/josmfile?page=Styles/ParkingLanes&zip=1

Last errors/warnings:
- W: No configuration settings found.  Using hardcoded default values for all pools.
- W: Invalid jar file ''<josm.pref>/plugins/Tracer-testing.jar.new'' (exists: false, canRead: false)
- 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(LayoutFocusTraversalPolicy.java:243)
	at java.desktop/javax.swing.SortingFocusTraversalPolicy.getFirstComponent(SortingFocusTraversalPolicy.java:492)
	at java.desktop/javax.swing.LayoutFocusTraversalPolicy.getFirstComponent(LayoutFocusTraversalPolicy.java:167)
	at java.desktop/javax.swing.DefaultFocusManager.getFirstComponent(DefaultFocusManager.java:142)
	at java.desktop/javax.swing.LegacyGlueFocusTraversalPolicy.getFirstComponent(LegacyGlueFocusTraversalPolicy.java:133)
	at java.desktop/javax.swing.LegacyGlueFocusTraversalPolicy.getDefaultComponent(LegacyGlueFocusTraversalPolicy.java:151)
	at java.desktop/java.awt.FocusTraversalPolicy.getInitialComponent(FocusTraversalPolicy.java:169)
	at java.desktop/java.awt.Window.getMostRecentFocusOwner(Window.java:2355)
	at java.desktop/java.awt.DefaultKeyboardFocusManager.dispatchEvent(DefaultKeyboardFocusManager.java:746)
	at java.desktop/java.awt.Component.dispatchEventImpl(Component.java:4842)
	at java.desktop/java.awt.Container.dispatchEventImpl(Container.java:2317)
	at java.desktop/java.awt.Window.dispatchEventImpl(Window.java:2758)
	at java.desktop/java.awt.Component.dispatchEvent(Component.java:4793)
	at java.desktop/java.awt.EventQueue.dispatchEventImpl(EventQueue.java:766)
	at java.desktop/java.awt.EventQueue.access$500(EventQueue.java:97)
	at java.desktop/java.awt.EventQueue$3.run(EventQueue.java:717)
	at java.desktop/java.awt.EventQueue$3.run(EventQueue.java:711)
	at java.base/java.security.AccessController.doPrivileged(Native Method)
	at java.base/java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:89)
	at java.base/java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:99)
	at java.desktop/java.awt.EventQueue$4.run(EventQueue.java:739)
	at java.desktop/java.awt.EventQueue$4.run(EventQueue.java:737)
	at java.base/java.security.AccessController.doPrivileged(Native Method)
	at java.base/java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:89)
	at java.desktop/java.awt.EventQueue.dispatchEvent(EventQueue.java:736)
	at java.desktop/java.awt.SequencedEvent.dispatch(SequencedEvent.java:132)
	at java.desktop/java.awt.EventQueue.dispatchEventImpl(EventQueue.java:764)
	at java.desktop/java.awt.EventQueue.access$500(EventQueue.java:97)
	at java.desktop/java.awt.EventQueue$3.run(EventQueue.java:717)
	at java.desktop/java.awt.EventQueue$3.run(EventQueue.java:711)
	at java.base/java.security.AccessController.doPrivileged(Native Method)
	at java.base/java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:89)
	at java.base/java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:99)
	at java.desktop/java.awt.EventQueue$4.run(EventQueue.java:739)
	at java.desktop/java.awt.EventQueue$4.run(EventQueue.java:737)
	at java.base/java.security.AccessController.doPrivileged(Native Method)
	at java.base/java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:89)
	at java.desktop/java.awt.EventQueue.dispatchEvent(EventQueue.java:736)
	at java.desktop/java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:199)
	at java.desktop/java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:124)
	at java.desktop/java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:117)
	at java.desktop/java.awt.WaitDispatchSupport$2.run(WaitDispatchSupport.java:190)
	at java.desktop/java.awt.WaitDispatchSupport$4.run(WaitDispatchSupport.java:235)
	at java.desktop/java.awt.WaitDispatchSupport$4.run(WaitDispatchSupport.java:233)
	at java.base/java.security.AccessController.doPrivileged(Native Method)
	at java.desktop/java.awt.WaitDispatchSupport.enter(WaitDispatchSupport.java:233)
	at java.desktop/java.awt.Dialog.show(Dialog.java:1070)
	at java.desktop/java.awt.Component.show(Component.java:1669)
	at java.desktop/java.awt.Component.setVisible(Component.java:1616)
	at java.desktop/java.awt.Window.setVisible(Window.java:1017)
	at java.desktop/java.awt.Dialog.setVisible(Dialog.java:1005)
	at org.openstreetmap.josm.gui.ExtendedDialog.setVisible(ExtendedDialog.java:458)
	at org.openstreetmap.josm.gui.ExtendedDialog.showDialog(ExtendedDialog.java:254)
	at org.openstreetmap.josm.gui.tagging.presets.TaggingPreset$PresetDialog.<init>(TaggingPreset.java:456)
	at org.openstreetmap.josm.gui.tagging.presets.TaggingPreset.showDialog(TaggingPreset.java:494)
	at org.openstreetmap.josm.gui.tagging.presets.TaggingPreset.actionPerformed(TaggingPreset.java:392)
	at org.openstreetmap.josm.gui.tagging.presets.items.PresetLink$TaggingPresetMouseAdapter.mouseClicked(PresetLink.java:36)
	at java.desktop/java.awt.AWTEventMulticaster.mouseClicked(AWTEventMulticaster.java:278)
	at java.desktop/java.awt.Component.processMouseEvent(Component.java:6581)
	at java.desktop/javax.swing.JComponent.processMouseEvent(JComponent.java:3343)
	at java.desktop/java.awt.Component.processEvent(Component.java:6343)
	at java.desktop/java.awt.Container.processEvent(Container.java:2259)
	at java.desktop/java.awt.Component.dispatchEventImpl(Component.java:4961)
	at java.desktop/java.awt.Container.dispatchEventImpl(Container.java:2317)
	at java.desktop/java.awt.Component.dispatchEvent(Component.java:4793)
	at java.desktop/java.awt.LightweightDispatcher.retargetMouseEvent(Container.java:4904)
	at java.desktop/java.awt.LightweightDispatcher.processMouseEvent(Container.java:4548)
	at java.desktop/java.awt.LightweightDispatcher.dispatchEvent(Container.java:4480)
	at java.desktop/java.awt.Container.dispatchEventImpl(Container.java:2303)
	at java.desktop/java.awt.Window.dispatchEventImpl(Window.java:2758)
	at java.desktop/java.awt.Component.dispatchEvent(Component.java:4793)
	at java.desktop/java.awt.EventQueue.dispatchEventImpl(EventQueue.java:766)
	at java.desktop/java.awt.EventQueue.access$500(EventQueue.java:97)
	at java.desktop/java.awt.EventQueue$3.run(EventQueue.java:717)
	at java.desktop/java.awt.EventQueue$3.run(EventQueue.java:711)
	at java.base/java.security.AccessController.doPrivileged(Native Method)
	at java.base/java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:89)
	at java.base/java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:99)
	at java.desktop/java.awt.EventQueue$4.run(EventQueue.java:739)
	at java.desktop/java.awt.EventQueue$4.run(EventQueue.java:737)
	at java.base/java.security.AccessController.doPrivileged(Native Method)
	at java.base/java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:89)
	at java.desktop/java.awt.EventQueue.dispatchEvent(EventQueue.java:736)
	at java.desktop/java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:199)
	at java.desktop/java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:124)
	at java.desktop/java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:117)
	at java.desktop/java.awt.WaitDispatchSupport$2.run(WaitDispatchSupport.java:190)
	at java.desktop/java.awt.WaitDispatchSupport$4.run(WaitDispatchSupport.java:235)
	at java.desktop/java.awt.WaitDispatchSupport$4.run(WaitDispatchSupport.java:233)
	at java.base/java.security.AccessController.doPrivileged(Native Method)
	at java.desktop/java.awt.WaitDispatchSupport.enter(WaitDispatchSupport.java:233)
	at java.desktop/java.awt.Dialog.show(Dialog.java:1070)
	at java.desktop/java.awt.Component.show(Component.java:1669)
	at java.desktop/java.awt.Component.setVisible(Component.java:1616)
	at java.desktop/java.awt.Window.setVisible(Window.java:1017)
	at java.desktop/java.awt.Dialog.setVisible(Dialog.java:1005)
	at org.openstreetmap.josm.gui.ExtendedDialog.setVisible(ExtendedDialog.java:458)
	at org.openstreetmap.josm.gui.ExtendedDialog.showDialog(ExtendedDialog.java:254)
	at org.openstreetmap.josm.gui.tagging.presets.TaggingPreset$PresetDialog.<init>(TaggingPreset.java:456)
	at org.openstreetmap.josm.gui.tagging.presets.TaggingPreset.showDialog(TaggingPreset.java:494)
	at org.openstreetmap.josm.gui.dialogs.properties.PresetListPanel$LabelMouseAdapter.mouseClicked(PresetListPanel.java:41)
	at java.desktop/java.awt.AWTEventMulticaster.mouseClicked(AWTEventMulticaster.java:278)
	at java.desktop/java.awt.Component.processMouseEvent(Component.java:6581)
	at java.desktop/javax.swing.JComponent.processMouseEvent(JComponent.java:3343)
	at java.desktop/java.awt.Component.processEvent(Component.java:6343)
	at java.desktop/java.awt.Container.processEvent(Container.java:2259)
	at java.desktop/java.awt.Component.dispatchEventImpl(Component.java:4961)
	at java.desktop/java.awt.Container.dispatchEventImpl(Container.java:2317)
	at java.desktop/java.awt.Component.dispatchEvent(Component.java:4793)
	at java.desktop/java.awt.LightweightDispatcher.retargetMouseEvent(Container.java:4904)
	at java.desktop/java.awt.LightweightDispatcher.processMouseEvent(Container.java:4548)
	at java.desktop/java.awt.LightweightDispatcher.dispatchEvent(Container.java:4480)
	at java.desktop/java.awt.Container.dispatchEventImpl(Container.java:2303)
	at java.desktop/java.awt.Window.dispatchEventImpl(Window.java:2758)
	at java.desktop/java.awt.Component.dispatchEvent(Component.java:4793)
	at java.desktop/java.awt.EventQueue.dispatchEventImpl(EventQueue.java:766)
	at java.desktop/java.awt.EventQueue.access$500(EventQueue.java:97)
	at java.desktop/java.awt.EventQueue$3.run(EventQueue.java:717)
	at java.desktop/java.awt.EventQueue$3.run(EventQueue.java:711)
	at java.base/java.security.AccessController.doPrivileged(Native Method)
	at java.base/java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:89)
	at java.base/java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:99)
	at java.desktop/java.awt.EventQueue$4.run(EventQueue.java:739)
	at java.desktop/java.awt.EventQueue$4.run(EventQueue.java:737)
	at java.base/java.security.AccessController.doPrivileged(Native Method)
	at java.base/java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:89)
	at java.desktop/java.awt.EventQueue.dispatchEvent(EventQueue.java:736)
	at java.desktop/java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:199)
	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 (11)

comment:1 by Jiri Slaby <jirislaby@…>, 7 years ago

Java package: openjdk-9-jre:balíček openjdk-9-jre není nainstalován

For completeness (see ticket #15297):

$ rpm -q java-9-openjdk
java-9-openjdk-9.0.0.0~181-3.1.x86_64

comment:2 by Jiri Slaby <jirislaby@…>, 7 years ago

And indeed, java 9 expects JCheckBox's model to be a subclass of ToggleButtonModel, not only ButtonModel implementor. Be it a java bug or not....

comment:3 by Don-vip, 7 years ago

Keywords: java9 added

comment:5 by Don-vip, 7 years ago

javabug:8182577 rather. It has been fixed in JDK10 but it does seem to be backported to Java 9 so we might need to implement a workaround.

comment:6 by Don-vip, 7 years ago

Milestone: 17.09
Summary: crash in "access=" setting dialogJava 9: CCE: QuadStateCheckBox$QuadStateDecorator cannot be cast to JToggleButton$ToggleButtonModel

comment:7 by Don-vip, 7 years ago

Resolution: fixed
Status: newclosed

In 12829/josm:

fix #15294 - Java 9: CCE: QuadStateCheckBox$QuadStateDecorator cannot be cast to JToggleButton$ToggleButtonModel

comment:8 by Don-vip, 7 years ago

In 12833/josm:

see #15294 - fix NPE in initialization

comment:9 by Don-vip, 7 years ago

Ticket #15336 has been marked as a duplicate of this ticket.

comment:10 by Don-vip, 7 years ago

New bug report on another model: #15484

comment:11 by Don-vip, 5 years ago

In 15287/josm:

see #15294, see #15484 - code cleanup, revert r12829 / r13036 now that Java 9 is EOL

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. 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.