Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-8020676

[macosx] JSlider setValue on applets crashes

    Details

    • OS:
      os_x

      Description

      FULL PRODUCT VERSION :
      Java(TM) SE Runtime Environment (build 1.7.0_25-b15)
      Java HotSpot(TM) 64-Bit Server VM (build 23.25-b01, mixed mode)


      ADDITIONAL OS VERSION INFORMATION :
      Mac OS where Java 7 is available

      A DESCRIPTION OF THE PROBLEM :

      Exception in thread " AWT-EventQueue-3 " java.lang.ClassCastException: sun.lwawt.macosx.CPlatformEmbeddedFrame cannot be cast to sun.lwawt.macosx.CPlatformWindow
      at sun.lwawt.macosx.CMouseInfoPeer.isWindowUnderMouse(CMouseInfoPeer.java:45)
      at java.awt.Component.findUnderMouseInWindow(Component.java:1325)
      at java.awt.Component.getMousePosition(Component.java:1377)
      at javax.swing.plaf.synth.SynthSliderUI.calculateThumbLocation(SynthSliderUI.java:547)
      at javax.swing.plaf.basic.BasicSliderUI$Handler.stateChanged(BasicSliderUI.java:1486)
      at javax.swing.DefaultBoundedRangeModel.fireStateChanged(DefaultBoundedRangeModel.java:364)
      at javax.swing.DefaultBoundedRangeModel.setRangeProperties(DefaultBoundedRangeModel.java:302)
      at javax.swing.DefaultBoundedRangeModel.setValue(DefaultBoundedRangeModel.java:168)
      at javax.swing.JSlider.setValue(JSlider.java:531)
      at accordionsoft.AccordionSoft.jMenuItem4ActionPerformed(AccordionSoft.java:905)
      at accordionsoft.AccordionSoft.access$4600(AccordionSoft.java:23)
      at accordionsoft.AccordionSoft$20.actionPerformed(AccordionSoft.java:712)
      at javax.swing.AbstractButton.fireActionPerformed(AbstractButton.java:2018)
      at javax.swing.AbstractButton$Handler.actionPerformed(AbstractButton.java:2341)
      at javax.swing.DefaultButtonModel.fireActionPerformed(DefaultButtonModel.java:402)
      at javax.swing.DefaultButtonModel.setPressed(DefaultButtonModel.java:259)
      at javax.swing.AbstractButton.doClick(AbstractButton.java:376)
      at javax.swing.plaf.basic.BasicMenuItemUI.doClick(BasicMenuItemUI.java:833)
      at javax.swing.plaf.basic.BasicMenuItemUI$Handler.mouseReleased(BasicMenuItemUI.java:877)
      at java.awt.Component.processMouseEvent(Component.java:6505)
      at javax.swing.JComponent.processMouseEvent(JComponent.java:3321)
      at java.awt.Component.processEvent(Component.java:6270)
      at java.awt.Container.processEvent(Container.java:2229)
      at java.awt.Component.dispatchEventImpl(Component.java:4861)
      at java.awt.Container.dispatchEventImpl(Container.java:2287)
      at java.awt.Component.dispatchEvent(Component.java:4687)
      at java.awt.LightweightDispatcher.retargetMouseEvent(Container.java:4832)
      at java.awt.LightweightDispatcher.processMouseEvent(Container.java:4492)
      at java.awt.LightweightDispatcher.dispatchEvent(Container.java:4422)
      at java.awt.Container.dispatchEventImpl(Container.java:2273)
      at java.awt.Window.dispatchEventImpl(Window.java:2719)
      at java.awt.Component.dispatchEvent(Component.java:4687)
      at java.awt.EventQueue.dispatchEventImpl(EventQueue.java:735)
      at java.awt.EventQueue.access$200(EventQueue.java:103)
      at java.awt.EventQueue$3.run(EventQueue.java:694)
      at java.awt.EventQueue$3.run(EventQueue.java:692)
      at java.security.AccessController.doPrivileged(Native Method)
      at java.security.ProtectionDomain$1.doIntersectionPrivilege(ProtectionDomain.java:76)
      at java.security.ProtectionDomain$1.doIntersectionPrivilege(ProtectionDomain.java:87)
      at java.awt.EventQueue$4.run(EventQueue.java:708)
      at java.awt.EventQueue$4.run(EventQueue.java:706)
      at java.security.AccessController.doPrivileged(Native Method)
      at java.security.ProtectionDomain$1.doIntersectionPrivilege(ProtectionDomain.java:76)
      at java.awt.EventQueue.dispatchEvent(EventQueue.java:705)
      at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:242)
      at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:161)
      at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:150)
      at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:146)
      at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:138)
      at java.awt.EventDispatchThread.run(EventDispatchThread.java:91)


      REGRESSION. Last worked in version 6u45

      STEPS TO FOLLOW TO REPRODUCE THE PROBLEM :
      Create an applet and add a JSlider

      javax.swing.JSlider jslider = new javax.swing.JSlider;
      jslider.setValue(50);

      Run the applet


      EXPECTED VERSUS ACTUAL BEHAVIOR :
      EXPECTED -
      the jslider displays the value provided.
      ACTUAL -
      An Exception in java console.

      ERROR MESSAGES/STACK TRACES THAT OCCUR :

      Exception in thread " AWT-EventQueue-3 " java.lang.ClassCastException: sun.lwawt.macosx.CPlatformEmbeddedFrame cannot be cast to sun.lwawt.macosx.CPlatformWindow
      at sun.lwawt.macosx.CMouseInfoPeer.isWindowUnderMouse(CMouseInfoPeer.java:45)
      at java.awt.Component.findUnderMouseInWindow(Component.java:1325)
      at java.awt.Component.getMousePosition(Component.java:1377)
      at javax.swing.plaf.synth.SynthSliderUI.calculateThumbLocation(SynthSliderUI.java:547)
      at javax.swing.plaf.basic.BasicSliderUI$Handler.stateChanged(BasicSliderUI.java:1486)
      at javax.swing.DefaultBoundedRangeModel.fireStateChanged(DefaultBoundedRangeModel.java:364)
      at javax.swing.DefaultBoundedRangeModel.setRangeProperties(DefaultBoundedRangeModel.java:302)
      at javax.swing.DefaultBoundedRangeModel.setValue(DefaultBoundedRangeModel.java:168)
      at javax.swing.JSlider.setValue(JSlider.java:531)
      at accordionsoft.AccordionSoft.jMenuItem4ActionPerformed(AccordionSoft.java:905)
      at accordionsoft.AccordionSoft.access$4600(AccordionSoft.java:23)
      at accordionsoft.AccordionSoft$20.actionPerformed(AccordionSoft.java:712)
      at javax.swing.AbstractButton.fireActionPerformed(AbstractButton.java:2018)
      at javax.swing.AbstractButton$Handler.actionPerformed(AbstractButton.java:2341)
      at javax.swing.DefaultButtonModel.fireActionPerformed(DefaultButtonModel.java:402)
      at javax.swing.DefaultButtonModel.setPressed(DefaultButtonModel.java:259)
      at javax.swing.AbstractButton.doClick(AbstractButton.java:376)
      at javax.swing.plaf.basic.BasicMenuItemUI.doClick(BasicMenuItemUI.java:833)
      at javax.swing.plaf.basic.BasicMenuItemUI$Handler.mouseReleased(BasicMenuItemUI.java:877)
      at java.awt.Component.processMouseEvent(Component.java:6505)
      at javax.swing.JComponent.processMouseEvent(JComponent.java:3321)
      at java.awt.Component.processEvent(Component.java:6270)
      at java.awt.Container.processEvent(Container.java:2229)
      at java.awt.Component.dispatchEventImpl(Component.java:4861)
      at java.awt.Container.dispatchEventImpl(Container.java:2287)
      at java.awt.Component.dispatchEvent(Component.java:4687)
      at java.awt.LightweightDispatcher.retargetMouseEvent(Container.java:4832)
      at java.awt.LightweightDispatcher.processMouseEvent(Container.java:4492)
      at java.awt.LightweightDispatcher.dispatchEvent(Container.java:4422)
      at java.awt.Container.dispatchEventImpl(Container.java:2273)
      at java.awt.Window.dispatchEventImpl(Window.java:2719)
      at java.awt.Component.dispatchEvent(Component.java:4687)
      at java.awt.EventQueue.dispatchEventImpl(EventQueue.java:735)
      at java.awt.EventQueue.access$200(EventQueue.java:103)
      at java.awt.EventQueue$3.run(EventQueue.java:694)
      at java.awt.EventQueue$3.run(EventQueue.java:692)
      at java.security.AccessController.doPrivileged(Native Method)
      at java.security.ProtectionDomain$1.doIntersectionPrivilege(ProtectionDomain.java:76)
      at java.security.ProtectionDomain$1.doIntersectionPrivilege(ProtectionDomain.java:87)
      at java.awt.EventQueue$4.run(EventQueue.java:708)
      at java.awt.EventQueue$4.run(EventQueue.java:706)
      at java.security.AccessController.doPrivileged(Native Method)
      at java.security.ProtectionDomain$1.doIntersectionPrivilege(ProtectionDomain.java:76)
      at java.awt.EventQueue.dispatchEvent(EventQueue.java:705)
      at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:242)
      at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:161)
      at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:150)
      at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:146)
      at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:138)
      at java.awt.EventDispatchThread.run(EventDispatchThread.java:91)


      REPRODUCIBILITY :
      This bug can be reproduced always.

      ---------- BEGIN SOURCE ----------
      Create an applet and add a JSlider

      javax.swing.JSlider jslider = new javax.swing.JSlider;
      jslider.setValue(50);

      Run the applet
      ---------- END SOURCE ----------

      CUSTOMER SUBMITTED WORKAROUND :
      Don't use JSliders

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                pchelko Petr Pchelko (Inactive)
                Reporter:
                webbuggrp Webbug Group
              • Votes:
                0 Vote for this issue
                Watchers:
                3 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: