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

ImageCursor throws IndexOutOfBoundsException when image is picked up from placeholder

    Details

      Description

      Run the attached test. You will see a button and an image. Move the mouse over the button. If you see the following exception on the console, bug is reproduced.

      Exception in thread "AWT-EventQueue-0" java.lang.IndexOutOfBoundsException: invalid hotSpot
              at sun.awt.CustomCursor.<init>(CustomCursor.java:61)
              at sun.awt.windows.WCustomCursor.<init>(WCustomCursor.java:28)
              at sun.awt.windows.WToolkit.createCustomCursor(WToolkit.java:712)
              at com.sun.javafx.tk.swing.SwingToolkit.convertImageCursorFromFX(SwingToolkit.fx:440)
              at com.sun.javafx.tk.swing.SwingToolkit.convertCursorFromFX(SwingToolkit.fx:391)
              at javafx.scene.Scene$MouseHandler.process(Scene.fx:1522)
              at javafx.scene.Scene$MouseHandler.process(Scene.fx:1361)
              at javafx.scene.Scene.impl_processMouseEvent(Scene.fx:679)
              at javafx.scene.Scene$ScenePeerListener.mouseEvent(Scene.fx:956)
              at com.sun.javafx.tk.swing.SwingScene$SwingScenePanel.doMouseEvent(SwingScene.java:446)
              at com.sun.javafx.tk.swing.SwingScene$SwingScenePanel.mouseMoved(SwingScene.java:480)
              at java.awt.AWTEventMulticaster.mouseMoved(AWTEventMulticaster.java:312)
              at java.awt.Component.processMouseMotionEvent(Component.java:6308)
              at javax.swing.JComponent.processMouseMotionEvent(JComponent.java:3285)
              at java.awt.Component.processEvent(Component.java:6032)
              at java.awt.Container.processEvent(Container.java:2041)
              at java.awt.Component.dispatchEventImpl(Component.java:4630)
              at java.awt.Container.dispatchEventImpl(Container.java:2099)
              at java.awt.Component.dispatchEvent(Component.java:4460)
              at java.awt.LightweightDispatcher.retargetMouseEvent(Container.java:4574)
              at java.awt.LightweightDispatcher.processMouseEvent(Container.java:4251)
              at java.awt.LightweightDispatcher.dispatchEvent(Container.java:4168)
              at java.awt.Container.dispatchEventImpl(Container.java:2085)
              at java.awt.Window.dispatchEventImpl(Window.java:2478)
              at java.awt.Component.dispatchEvent(Component.java:4460)
              at java.awt.EventQueue.dispatchEvent(EventQueue.java:599)
              at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:269)
              at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:184)
              at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:174)
              at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:169)
              at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:161)
              at java.awt.EventDispatchThread.run(EventDispatchThread.java:122)

      Reproduced on Soma-b30, WinVista.

      In the test, I am using an invalid image for the main URL and using a valid placeholder image. The main image is set with a specific width and height. Hotspot values exceed the size of the main as well as placeholder image. So the hotspot is not getting clamped down to valid values in this case.

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                lnerad Ľubomír Nerád
                Reporter:
                pmohan Praveen Mohan
              • Votes:
                0 Vote for this issue
                Watchers:
                1 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved:
                  Imported: