Bug 67 - Java/Jogl app hangs some systems, not others, during reshape.
Summary: Java/Jogl app hangs some systems, not others, during reshape.
Status: VERIFIED FIXED
Alias: None
Product: Jogl
Classification: JogAmp
Component: core (show other bugs)
Version: 1
Hardware: All all
: P1 normal
Assignee: Sven Gothel
URL: http://agileimage.com/html/statistics...
Depends on:
Blocks:
 
Reported: 2004-03-10 10:29 CET by Sven Gothel
Modified: 2010-12-12 09:31 CET (History)
0 users

See Also:
Type: DEFECT
SCM Refs:
Workaround: ---


Attachments
Screenshot of bad behavior on ATI adapter (16.52 KB, image/jpeg)
2005-01-31 00:10 CET, Sven Gothel
Details
Screenshot of proper behavior (15.62 KB, image/jpeg)
2005-01-31 00:11 CET, Sven Gothel
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Sven Gothel 2010-03-24 07:46:21 CET


---- Reported by pdjensen 2004-03-10 10:29:49 ----

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.



---- Additional Comments From kbr 2005-01-28 19:35:52 ----

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.




---- Additional Comments From kbr 2005-01-31 00:09:36 ----

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. 
----




---- Additional Comments From kbr 2005-01-31 00:10:39 ----

Created an attachment
Screenshot of bad behavior on ATI adapter




---- Additional Comments From kbr 2005-01-31 00:11:11 ----

Created an attachment
Screenshot of proper behavior




---- Additional Comments From kbr 2005-05-11 09:43:22 ----

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.




---- Additional Comments From kbr 2005-05-12 09:24:48 ----

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.




--- Bug imported by sgothel@jausoft.com 2010-03-24 07:46 EDT  ---

This bug was previously known as _bug_ 67 at https://jogl.dev.java.net/bugs/show_bug.cgi?id=67
Imported an attachment (id=18)
Imported an attachment (id=19)

The original submitter of attachment 18 [details] is unknown.
   Reassigning to the person who moved it here: sgothel@jausoft.com.
The original submitter of attachment 19 [details] is unknown.
   Reassigning to the person who moved it here: sgothel@jausoft.com.