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

MacOS/Prism: IllegalArgumentException in com.sun.prism.impl.BaseTexture wedges the whole UI.

    XMLWordPrintable

Details

    • Bug
    • Resolution: Fixed
    • P3
    • fx2.0
    • fx2.0
    • javafx
    • Product: javafx-2.0dev
      Platform: macosx-universal
      Build-Number: 107
      Build-ID: 2011-03-31_11-18-50

    Description

      In the authoring tool we're using:
                   
                  final Object platformImage = scene.renderToImage(null);
                  image = Image.impl_fromPlatformImage(platformImage);

      to create an image of an object (such as a Rectangle, or a Group, or whatever) in order to
      display a thumbnail image of it in the inspector.

      This works well on windows, but on MacOS we get an IllegalArgumentException in the render thread
      which wedges the whole UI:

      java.lang.IllegalArgumentException: Upload requires 2704 elements, but only 0 elements remain in the buffer
              at com.sun.prism.impl.BaseTexture.checkUpdateParams(BaseTexture.java:162)
              at com.sun.prism.es2.ES2Texture.update(ES2Texture.java:409)
              at com.sun.prism.impl.BaseTexture.update(BaseTexture.java:104)
              at com.sun.prism.impl.BaseResourceFactory.createTexture(BaseResourceFactory.java:113)
              at com.sun.prism.impl.BaseResourceFactory.getCachedTexture(BaseResourceFactory.java:93)
              at com.sun.prism.impl.BaseResourceFactory.getCachedTexture(BaseResourceFactory.java:84)
              at com.sun.javafx.sg.prism.NGImageView.renderContent(NGImageView.java:311)
              at com.sun.javafx.sg.prism.NGNode.doRender(NGNode.java:95)
              at com.sun.javafx.sg.prism.NGNode.doRender(NGNode.java:36)
              at com.sun.javafx.sg.BaseNode.render(BaseNode.java:909)
              at com.sun.javafx.sg.prism.NGGroup.renderContent(NGGroup.java:148)
              at com.sun.javafx.sg.prism.NGNode.doRender(NGNode.java:95)
              at com.sun.javafx.sg.prism.NGNode.doRender(NGNode.java:36)
              at com.sun.javafx.sg.BaseNode.render(BaseNode.java:909)
              at com.sun.javafx.tk.quantum.PrismPen$PaintRunnable.paintImpl(PrismPen.java:196)
              at com.sun.javafx.tk.quantum.PrismPen$PaintRunnable.run(PrismPen.java:310)
              at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:441)
              at java.util.concurrent.FutureTask$Sync.innerRunAndReset(FutureTask.java:317)
              at java.util.concurrent.FutureTask.runAndReset(FutureTask.java:150)
              at com.sun.prism.tkal.RenderJob.run(RenderJob.java:29)
              at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
              at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
              at java.lang.Thread.run(Thread.java:680)


      The small example attached (needs jfxrt.jar and AuthoringTool.jar) shows that.
      It creates a Rectangle in a Scene, then call the NodeRender (a class we use in the AT) to
      create an image from it, then adds the image to the scenegraph.
      shortly after the exception is raised.

      Attachments

        Issue Links

          Activity

            People

              dcherepanov Dmitry Cherepanov
              dfuchs Daniel Fuchs
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:
                Imported: