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

IndexOutOfBoundsException: invalid hotSpot when creating custom cursor

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Not an Issue
    • Icon: P4 P4
    • 6
    • 6
    • client-libs
    • generic
    • generic

      Trying to hide the cursor with JDK1.5.0 on linux, I get
       
      Exception in thread "main" java.lang.ExceptionInInitializerError
         at apollo.Surface.<init>(Surface.java:59)
         at test.TestLevel.run(TestLevel.java:69)
         at test.TestLevel.main(TestLevel.java:54)
      Caused by: java.lang.IndexOutOfBoundsException: invalid hotSpot
         at sun.awt.CustomCursor.<init>(CustomCursor.java:61)
         at sun.awt.X11CustomCursor.<init>(X11CustomCursor.java:26)
         at sun.awt.X11.XCustomCursor.<init>(XCustomCursor.java:27)
         at sun.awt.X11.XToolkit.createCustomCursor(XToolkit.java:742)
         at apollo.CursorManager.createInvisibleCursor(CursorManager.java:6Cool
         at apollo.CursorManager.<clinit>(CursorManager.java:37)
         ... 3 more
       
       
      The code looks like this:
       private static Cursor createInvisibleCursor()
        {
          // Create the invisible cursor
          MemoryImageSource memIm = new MemoryImageSource(1, 1, new int[] { 0 }, 0, 1);
          Component c = new Component() { };
          Image im = c.createImage(memIm);
          Point spot = new Point(1, 1);
          return c.getToolkit().createCustomCursor(im, spot, INVISIBLE_CURSOR_NAME);
        }
      the same code worked with JDK 1.4.2 (Windows).
       A hotspot can be anywhere relative to the actual image really... even outside of it.
      ###@###.### 10/14/04 17:32 GMT

            osemenovsunw Oleg Semenov (Inactive)
            dmikhalksunw Denis Mikhalkin (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              Resolved:
              Imported:
              Indexed: