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

OGL: Resizing, menus, and JFileChooser freeze paint if OpenGL pipeline enabled

    Details

    • Type: Bug
    • Status: Closed
    • Priority: P4
    • Resolution: Not an Issue
    • Affects Version/s: 6
    • Fix Version/s: None
    • Component/s: client-libs
    • Subcomponent:
      2d
    • CPU:
      x86
    • OS:
      windows_xp

      Description

      FULL PRODUCT VERSION :
      java version "1.6.0"
      Java(TM) SE Runtime Environment (build 1.6.0-b105)
      Java HotSpot(TM) 64-Bit Server VM (build 1.6.0-b105, mixed mode)
      java version "1.6.0_01"
      Java(TM) SE Runtime Environment (build 1.6.0_01-b06)
      Java HotSpot(TM) Client VM (build 1.6.0_01-b06, mixed mode, sharing)

      ADDITIONAL OS VERSION INFORMATION :
      Microsoft Windows [Version 5.2.3790] (Windows XP Pro 64bits Edition)

      EXTRA RELEVANT SYSTEM CONFIGURATION :
      NVIDIA GeForce 6800GT 256Mo (PCI Express 16x)
      Drivers NVIDIA ForceWare 93.71
      [I] OGLContext_IsFBObjectExtensionAvailable: fbobject supported

      A DESCRIPTION OF THE PROBLEM :
      Java applications doesn't work correctly with OpenGL pipeline enabled ( -Dsun.java2d.opengl=true) : when clicking on a menu in a JMenuBar, the popup menu doesn't show up, and the JFrame is not redrawn and remain dirty if another native window is dragged over.
      The only thing you can do is closing app with the crox. clicking on the dirty zone may hang application (the crox doesn't react anymore).

      Note : the problem as been detected first on fully accelerated JOGL demos (http://download.java.net/media/jogl/builds/archive/jsr-231-webstart-current/JRefract.jnlp)



      STEPS TO FOLLOW TO REPRODUCE THE PROBLEM :
      With a JNLP
      1) launch http://download.java.net/media/jogl/builds/archive/jsr-231-webstart-current/JRefract.jnlp
      2) try to select an action from the "Action" menu
      3) That's it !

      With a classic desktop application
      1)create a JFrame with a JMenuBar and at least one JMenu with at least one JMenuItem. Put any JComponent you want in the contentPane (JTextField, JList, JLabel...). The best is having a JFileChooser launched by a JmenuItem's action (like File->load ....).
      2) Launch it with -Dsun.java2d.opengl=true or -Dsun.java2d.opengl=True
      3) click on you menu : if it doesn't not hang immediately, click on the menu item that launch a JFileCooser. Another way to see the bug is to resize the window (user action, not programaticaly)

      EXPECTED VERSUS ACTUAL BEHAVIOR :
      EXPECTED -
      With http://download.java.net/media/jogl/builds/archive/jsr-231-webstart-current/JRefract.jnlp : the same result as http://download.java.net/media/jogl/builds/archive/jsr-231-webstart-current/JRefractNoOGL.jnlp

      With the classic desktop app :
      All is working as a classic swing app: clicking on the menu drops a popup-menu, clicking on the menu item invokes its action, and if it shows a JFileChooser, it displays its content (current directory list, open/cancel buttons, etc...). Resizing the window repaint it with a larger content.

      Both :
      dragging another window over the Java desktop or JNLP application doesn't erase the display of the Java window.
      ACTUAL -
      With http://download.java.net/media/jogl/builds/archive/jsr-231-webstart-current/JRefract.jnlp :
      clicking on the "Action" menu seems to freeze all paint operations.

      With a Java desktop app : clicking on a menu result in freezing paint operations. If not, when clicking on the menu item to open a file dialog, the JFilChooser shows only the native window borders. the content of the dialog is empty. You can close the JFileChooser and you app, but the content of all window remain dirty and is not painted any more. Resizing the window doesn't repaint the extended area, and if you set the env variable J2D_TRACE_LEVEL=4 you get error messages

      Note : any action opening a new window seems to freeze window painting.

      ERROR MESSAGES/STACK TRACES THAT OCCUR :
      *** Note : messages shown on window resize only ! ***

      [E] WGLSD_MakeCurrentToScratch: could not make current
      [E] OGLSD_InitTextureObject: actual (w=64665600 h=667105992) != requested
      [E] OGLSurfaceData_initFBObject: could not init texture object

      REPRODUCIBILITY :
      This bug can be reproduced always.

      ---------- BEGIN SOURCE ----------
      import java.awt.event.*;
      import javax.swing.*;

      public class OpenGLPipelineBug{

      public static void main(String[] args){
      final JFrame f=new JFrame("Test OpenGLPipelineBug");
      JMenuBar menuBar=new JMenuBar();
      JMenu fileMenu=new JMenu("File");
      JMenuItem open=new JMenuItem("Open");
      open.setAccelerator(KeyStroke.getKeyStroke(KeyEvent.VK_E,KeyEvent.CTRL_MASK));
      final JFileChooser fc=new JFileChooser();
      ActionListener al=new ActionListener(){
      public void actionPerformed(ActionEvent e){
      int answer=fc.showOpenDialog(f);
      System.out.println(answer);
      }
      };
      open.addActionListener(al);
      fileMenu.add(open);
      menuBar.add(fileMenu);
      f.setJMenuBar(menuBar);
      f.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
      f.pack();
      f.setVisible(true);
      }

      }
      ---------- END SOURCE ----------

      CUSTOMER SUBMITTED WORKAROUND :
      If you want to use -Dsun.java2d.opengl=true, you may try -Dsun.java2d.opengl.fbobject=false
      It works for me, but is is strange since J2D Trace says FBO is supported...

        Attachments

          Activity

            People

            • Assignee:
              campbell Christopher Campbell (Inactive)
              Reporter:
              ryeung Roger Yeung (Inactive)
            • Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:
                Imported:
                Indexed: