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

IllegalArgumentException: too small buffer size.

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: P3 P3
    • 8
    • 8
    • javafx
    • 8.0b63, SW, win7.

      Run the attached application.

      Mark "IMAGE" on both windows, as content type (and unmark other checkboxes).

      Click "Put to clipboard" button, or start a DnD. I catch an exception

      Note, that VM options are:
      -Dprism.order=sw -Dprism.verbose=true

      This issue is actual only for "JavaFX" image, which is attached to the project. I tried with a bit different image, and couldn't get the exception.

      Also, it is only for SW, because, if I remove "-Dprism.order=sw" from VM options, everything works fine.


      Application output:

      Prism pipeline init order: sw
      *** Fallback to Prism SW pipeline
      Using t2k for text rasterization
      Using native-based Pisces rasterizer
      Using dirty region optimizations
      Not using texture mask for primitives
      Not forcing power of 2 sizes for textures
      Using hardware CLAMP_TO_ZERO mode
      Prism pipeline name = com.sun.prism.sw.SWPipeline
      (X) Got class = class com.sun.prism.sw.SWPipeline
      Initialized prism pipeline: com.sun.prism.sw.SWPipeline
       vsync: true vpipe: false
      RESIZE: 1574657743652 w: 580 h: 700
      RESIZE: 1574694732780 w: 630 h: 700
      Source is putting image on dragboard
      java.lang.IllegalArgumentException: Too small byte buffer size 221x97 [85748] > 0
      at com.sun.glass.ui.Pixels.<init>(Unknown Source)
      at com.sun.glass.ui.win.WinPixels.<init>(Unknown Source)
      at com.sun.glass.ui.win.WinApplication.createPixels(Unknown Source)
      at com.sun.javafx.tk.quantum.PixelUtils.imageToPixels(PixelUtils.java:79)
      at com.sun.javafx.tk.quantum.QuantumClipboard.placeImage(QuantumClipboard.java:349)
      at com.sun.javafx.tk.quantum.QuantumClipboard.putContent(QuantumClipboard.java:493)
      at javafx.scene.input.Clipboard.setContent(Clipboard.java:226)
      at javafxapplication3.JavaFXApplication3$7$1.handle(JavaFXApplication3.java:376)
      at javafxapplication3.JavaFXApplication3$7$1.handle(JavaFXApplication3.java:366)
      at com.sun.javafx.event.CompositeEventHandler.dispatchBubblingEvent(CompositeEventHandler.java:86)
      at com.sun.javafx.event.EventHandlerManager.dispatchBubblingEvent(EventHandlerManager.java:238)
      at com.sun.javafx.event.EventHandlerManager.dispatchBubblingEvent(EventHandlerManager.java:191)
      at com.sun.javafx.event.CompositeEventDispatcher.dispatchBubblingEvent(CompositeEventDispatcher.java:59)
      at com.sun.javafx.event.BasicEventDispatcher.dispatchEvent(BasicEventDispatcher.java:58)
      at com.sun.javafx.event.EventDispatchChainImpl.dispatchEvent(EventDispatchChainImpl.java:113)
      at com.sun.javafx.event.BasicEventDispatcher.dispatchEvent(BasicEventDispatcher.java:56)
      at com.sun.javafx.event.EventDispatchChainImpl.dispatchEvent(EventDispatchChainImpl.java:113)
      at com.sun.javafx.event.BasicEventDispatcher.dispatchEvent(BasicEventDispatcher.java:56)
      at com.sun.javafx.event.EventDispatchChainImpl.dispatchEvent(EventDispatchChainImpl.java:113)
      at com.sun.javafx.event.EventUtil.fireEventImpl(EventUtil.java:74)
      at com.sun.javafx.event.EventUtil.fireEvent(EventUtil.java:54)
      at javafx.event.Event.fireEvent(Event.java:201)
      at javafx.scene.Scene$DnDGesture.fireEvent(Scene.java:2678)
      at javafx.scene.Scene$DnDGesture.process(Scene.java:2757)
      at javafx.scene.Scene$DnDGesture.access$8600(Scene.java:2654)
      at javafx.scene.Scene$MouseHandler.process(Scene.java:3390)
      at javafx.scene.Scene$MouseHandler.process(Scene.java:3214)
      at javafx.scene.Scene$MouseHandler.access$1900(Scene.java:3166)
      at javafx.scene.Scene.impl_processMouseEvent(Scene.java:1570)
      at javafx.scene.Scene$ScenePeerListener.mouseEvent(Scene.java:2315)
      at com.sun.javafx.tk.quantum.GlassViewEventHandler.handleMouseEvent(GlassViewEventHandler.java:287)
      at com.sun.glass.ui.View.handleMouseEvent(Unknown Source)
      at com.sun.glass.ui.View.notifyMouse(Unknown Source)
      at com.sun.glass.ui.win.WinApplication._runLoop(Native Method)
      at com.sun.glass.ui.win.WinApplication.access$100(Unknown Source)
      at com.sun.glass.ui.win.WinApplication$3$1.run(Unknown Source)
      at java.lang.Thread.run(Thread.java:722)
      QuantumRenderer: shutdown
      Exception in thread "JavaFX Application Thread" jfxsa-run:

            msoch Martin Ĺ och
            akirov Alexander Kirov (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved:
              Imported: