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

Exception thrown on creating a Stage set with visible 'false'

    Details

    • Type: Bug
    • Status: Closed
    • Priority: P2
    • Resolution: Fixed
    • Affects Version/s: fx1.3
    • Fix Version/s: fx1.3
    • Component/s: javafx
    • Labels:
    • Environment:

      Mac 10.5, prism, jdk6

      Description

      This is reproducible with soma integration b18 with prism enabled. This is seen on mac 10.5. This works alright with swing toolkit.

      Run the below program. It creates a stage with visible set to false. This throws an exception on console:

      java.lang.reflect.InvocationTargetException
      at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
      at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
      at java.lang.reflect.Method.invoke(Method.java:597)
      at com.sun.javafx.runtime.provider.GUIRuntimeProvider.run(GUIRuntimeProvider.java:62)
      at com.sun.javafx.runtime.Entry.start(Entry.java:84)
      at com.sun.javafx.runtime.Main.main(Main.java:80)
      Caused by: javax.media.opengl.GLException: OpenGL context not current
      at com.sun.opengl.impl.macosx.cgl.MacOSXCGLContext.setSwapInterval(MacOSXCGLContext.java:342)
      at com.sun.opengl.impl.gl2.GL2Impl.setSwapInterval(GL2Impl.java:22245)
      at com.sun.prism.es2.ES2Context.updateRenderTarget(ES2Context.java:60)
      at com.sun.prism.impl.ps.BaseContext.setRenderTarget(BaseContext.java:347)
      at com.sun.prism.impl.ps.BaseContext.setRenderTarget(BaseContext.java:341)
      at com.sun.prism.impl.ps.BaseGraphics.<init>(BaseGraphics.java:56)
      at com.sun.prism.es2.ES2Graphics.<init>(ES2Graphics.java:16)
      at com.sun.prism.es2.ES2Graphics.create(ES2Graphics.java:25)
      at com.sun.prism.es2.ES2SwapChain.createGraphics(ES2SwapChain.java:29)
      at com.sun.prism.es2.ES2Window.getGraphics(ES2Window.java:52)
      at com.sun.javafx.tk.prism.PrismScene$1.run(PrismScene.java:209)
      at com.sun.prism.tk.RunnableEvent.run(RunnableEvent.java:47)
      at com.sun.prism.tk.PrismToolkitImpl.processRenderEvent(PrismToolkitImpl.java:155)
      at com.sun.prism.tk.PrismToolkitImpl.processRenderTasks(PrismToolkitImpl.java:171)
      at com.sun.prism.tk.PrismToolkitImpl.run(PrismToolkitImpl.java:107)
      at com.sun.javafx.tk.prism.PrismToolkit.startup(PrismToolkit.fx:118)
      ... 7 more


      Testcase:
      import javafx.stage.*;
      import javafx.scene.*;
      import javafx.scene.shape.*;
      import javafx.scene.paint.*;
      import javafx.scene.input.*;

      Stage {
          visible: false
          width: 400
          height: 400
          x: 10
          y: 10
          scene: Scene {
              fill: Color.RED
              content: Rectangle {
                  x: 40
                  y: 40
                  width: 50
                  height: 50
                  stroke: Color.BLACK
                  strokeWidth: 4
                  fill: Color.BLUE
              }
          }
      }


        Attachments

          Activity

            People

            • Assignee:
              tdv Dmitri Trembovetski (Inactive)
              Reporter:
              gramachasunw Girish Ramachandran (Inactive)
            • Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:
                Imported: