jogl
  1. jogl
  2. JOGL-67

Java/Jogl app hangs some systems, not others, during reshape.

    Details

    • Issuezilla Id:
      67

      Description

      I have been trying to track down a strange jogl lighting problem on some systems which can also
      reliably cause some of them to hang. The problem is fairly consistent on a 1.33 Ghz Powerbook with
      the latest OS, Java, tools, and Gregory Pierce's version of jogl (Feb 17, Optimized, but the problem has
      been there for at least several weeks, if not all along). I also see the problem with the Sep 2003 Win32
      libray from the games games-core jogl site.

      The systems it has hung are new Mac 15" & 17" PB's, a dual cpu G5, and a Win2K system with an ATI
      Rage 128 VR card. It does not seem to be a problem on Mac 12" PB, iMac, or iBook.

      You can see the problem by running the JWS app:

      http://agileimage.com/html/statistics/TimeMachine.jnlp

      Lighting:

      In the Window menu, select the last entry (bea/USPopulation.csv) and observe that only three states
      appear to be lit properly - the rest have just ambient light. Move the slider at the bottom and see the
      lighting fix itself when Alaska and Hawaii appear. Move the slider back to the beginning and the
      problem reappears. Select the View/Display/Top 30 and about half are lit ok, Bottom 30 and just 2 are
      ok, etc.

      Reshape hangs sytem:

      Resize the window larger and the familiar old resize bug appears where some of the window is not
      being rendered, no big deal. But move the split pane divider to make the map less than 32 pixels high,
      and some systems will hang so that the mouse still moves, but nothing responds. I have to reboot.
      There is a System.err output to report the reshape size so you can tell when you are close.

      I'm trying to get some idea of how to track down these problems. I use the Animator, changing the
      model in the AWT event thread and then updating a reference to the set of call lists to be displayed by
      the Animator. The display code for each state (one call list per state) is this, where the color c is defined
      by the state (unless highlighted or hidden):

      gl.glPushMatrix();
      gl.glScaled( xScale, yScale, visible? zScale * value / maxValue: 0.0 );
      gl.glTranslatef( -longCenter, -latCenter, 0f );
      gl.glMaterialfv(GL.GL_FRONT, GL.GL_AMBIENT_AND_DIFFUSE, c);
      gl.glCallList( j );
      gl.glPopMatrix();

      The directional light source is Light0Position =

      { -1.0f, 2.0f, 2.0f, 0.0f }

      ;

      The reshape code was lifted fairly directly from the Jogl Gears demo.

      1. bad.jpg
        17 kB
      2. good.jpg
        16 kB

        Activity

        Hide
        kbr added a comment -

        Is this problem still reproducible? Many bugs have been fixed since this issue
        was reported, including a workaround for ATI cards that reduces OpenGL rendering
        to running on a single thread. The latest CVS sources contain a bug fix to Issue
        97, which turned out to be a bug in this single-threaded workaround. The current
        JOGL seems to be fairly robust on my ATI Radeon 9800 Pro. (There is still an
        outstanding issue with multiple GLCanvas creation on ATI cards: Issue #118.)

        If the problem is still reproducible, could you please attach a test case to
        this bug report? Thanks.

        Show
        kbr added a comment - Is this problem still reproducible? Many bugs have been fixed since this issue was reported, including a workaround for ATI cards that reduces OpenGL rendering to running on a single thread. The latest CVS sources contain a bug fix to Issue 97, which turned out to be a bug in this single-threaded workaround. The current JOGL seems to be fairly robust on my ATI Radeon 9800 Pro. (There is still an outstanding issue with multiple GLCanvas creation on ATI cards: Issue #118.) If the problem is still reproducible, could you please attach a test case to this bug report? Thanks.
        Hide
        kbr added a comment -

        Comments from pdjensen:


        I apologize for not following up earlier. Most of the issues described in this
        bug report are fixed now with the exception that on my Mac 17" 1.33 GHz
        PowerBook, the repaint leaves sections that are garbage.

        The lighting problem was my bug.

        The crashes when resizing to less than a dozen pixels in height no longer happen
        with JOGL of Nov 19, 2004 on either the PowerBook or my Win2K system. (By the
        way, I am looking forward to signed JOGL libraries with versions - I'm still
        re-signing your stuff to maintain control over which version I use).

        The repaint problem has been with me for as long as I've used JOGL. It does
        appear that it is no longer a problem on my Win2K system. I am attaching
        snapshots of the problem. "bad.jpg" is the result of making the application
        window larger. "good.jpg" is the correct view after moving the divider between
        the JOGL pane and Swing pane just slightly. The width did not change despite the
        snapshots - the two images were scaled differently when I converted the tiff
        screen captures.

        The video card on the PowerBook is an ATI MOBILITY RADEON 9600.


        Show
        kbr added a comment - Comments from pdjensen: I apologize for not following up earlier. Most of the issues described in this bug report are fixed now with the exception that on my Mac 17" 1.33 GHz PowerBook, the repaint leaves sections that are garbage. The lighting problem was my bug. The crashes when resizing to less than a dozen pixels in height no longer happen with JOGL of Nov 19, 2004 on either the PowerBook or my Win2K system. (By the way, I am looking forward to signed JOGL libraries with versions - I'm still re-signing your stuff to maintain control over which version I use). The repaint problem has been with me for as long as I've used JOGL. It does appear that it is no longer a problem on my Win2K system. I am attaching snapshots of the problem. "bad.jpg" is the result of making the application window larger. "good.jpg" is the correct view after moving the divider between the JOGL pane and Swing pane just slightly. The width did not change despite the snapshots - the two images were scaled differently when I converted the tiff screen captures. The video card on the PowerBook is an ATI MOBILITY RADEON 9600.
        Hide
        kbr added a comment -

        Created an attachment (id=34)
        Screenshot of bad behavior on ATI adapter

        Show
        kbr added a comment - Created an attachment (id=34) Screenshot of bad behavior on ATI adapter
        Hide
        kbr added a comment -

        Created an attachment (id=35)
        Screenshot of proper behavior

        Show
        kbr added a comment - Created an attachment (id=35) Screenshot of proper behavior
        Hide
        kbr added a comment -

        With the latest changes to the GLCanvas's resizing code on Mac OS X in JOGL 1.1
        b11 I believe all remaining resizing issues should be fixed. Could you please
        retest your application? Thanks.

        Show
        kbr added a comment - With the latest changes to the GLCanvas's resizing code on Mac OS X in JOGL 1.1 b11 I believe all remaining resizing issues should be fixed. Could you please retest your application? Thanks.
        Hide
        kbr added a comment -

        Submitter has indicated that the recent fix on Mac OS X to always update the
        context even if the GLCanvas has not been resized has solved all remaining problems.

        Show
        kbr added a comment - Submitter has indicated that the recent fix on Mac OS X to always update the context even if the GLCanvas has not been resized has solved all remaining problems.

          People

          • Assignee:
            jogl-issues
            Reporter:
            pdjensen
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved: