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

3D: Creating a Canvas using non-default GraphicsConfiguration causes exception

    XMLWordPrintable

    Details

    • Subcomponent:
    • Resolved In Build:
      1.2rc2
    • CPU:
      sparc
    • OS:
      solaris_2.6
    • Verification:
      Not verified

      Description

      On Solaris, when a Canvas is created using a non-default GraphicsConfiguration
      object the following exception is generated:

      Exception in thread "main" java.lang.IllegalMonitorStateException: current thread not owner
              at sun.awt.motif.MCanvasPeer.create(Native Method)
              at sun.awt.motif.MComponentPeer.init(Compiled Code)
              at sun.awt.motif.MComponentPeer.<init>(Compiled Code)
              at sun.awt.motif.MCanvasPeer.<init>(Compiled Code)
              at sun.awt.motif.MToolkit.createCanvas(Compiled Code)
              at java.awt.Canvas.addNotify(Compiled Code)
              at TestCanvas.addNotify(Compiled Code)
              at java.awt.Container.addNotify(Compiled Code)
              at java.awt.Window.addNotify(Compiled Code)
              at java.awt.Frame.addNotify(Compiled Code)
              at java.awt.Window.show(Compiled Code)
              at gfx.main(Compiled Code)

      The attached test program demonstrates the problem. Run the program and it will
      display the list of X11GraphicsConfigs available on the system and then the
      program will create a window using the default X11GraphicsConfig object (by
      passing null to the Canvas(GraphicsConfiguration) constructor.

      Now run the program and give it the visualID (the "vis" parameter printed for
      each Configuration) of any of the X11GraphicsConfig objects except the
      first object (the default). The program will either hang or terminate with
      the above exception.

       1998-10-16 djp
      I have attached a modified verison of the test program that will run under beta4
      as well as FCS (oldgfx.java). This program works correctly under beta4-K
      but has the same problem described above with the FCS version. The difference
      in the two test programs is the oldgfx.java uses the getConfig() method to
      create the desired X11GraphicsConfig object while the original test program
      (gfx.java) chooses from the list of X11GraphicsConfig's returned from
      the GraphicsDevice.getConfigurations() method.

        Attachments

          Activity

            People

            Assignee:
            jwarzech Joe Warzecha (Inactive)
            Reporter:
            duke J. Duke (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved:
              Imported:
              Indexed: