United StatesChange Country, Oracle Worldwide Web Sites Communities I am a... I want to...
Bug ID: 6525997 OGL: VM crash when drawing a general path on screen and repainting it a few times, Win32
6525997 : OGL: VM crash when drawing a general path on screen and repainting it a few times, Win32

Details
Type:
Bug
Submit Date:
2007-02-16
Status:
Closed
Updated Date:
2011-03-08
Project Name:
JDK
Resolved Date:
2011-03-08
Component:
client-libs
OS:
windows_xp
Sub-Component:
2d
CPU:
x86
Priority:
P3
Resolution:
Fixed
Affected Versions:
7
Fixed Versions:
7

Related Reports
Backport:
Relates:

Sub Tasks

Description
Run the attached test with JDK7-b08 2D PIT build (with OGL flag turned on) on a WinXP machine with ATI Radeon 9600 series. A general path should appear in blue color. The actual behavior is as follows -

1. Frame appears blank. General Path is not appearing.
2. Maximize the frame and move the mouse horizontally a few times, within the frame. 
You would see a VM crash. 

This is not reproducible on JDK7-b07. This is not reproducible on JDK6. Not reproducible on the default pipeline with the PIT build. Hence this seems to introduced in JDK-b08 PIT. 

The testcase is creating the offscreen image everytime the canvas is repainted, which is not a right thing to do but it should not crash the VM. 

I have attached the testcase and the log file having the crash dump.

                                    

Comments
EVALUATION

It looks like part of the fix for 5066318 tripped over yet another ATI driver
bug (which is ironic because that fix was supposed to help workaround some
other ATI driver bugs).  One part of that fix was to use the
WGL_ARB_make_current_read extension (and the wglMakeContextCurrentARB() method)
for making contexts current for a given src/dst pair.  It appears that on
ATI drivers under certain circumstances, if srcHDC==dstHDC, this method will
cause a crash in ATI's drivers.  Ugh.  I don't fully understand why this crash
occurs sometimes but not others (e.g. I can run SwingSet2 or Java2Demo just fine
and never experience a crash, but testcases like the one attached here or
test/sun/java2d/OpenGL/GradientPaints.java crash reliably everytime).

Fortunately we can workaround the bug quite easily.  We only need to use the
wglMakeContextCurrentARB() method when the two surfaces are different; when they
are the same surface, we can simply use the old wglMakeCurrent() method to
make the context current to the single destination surface.  I've verified
that this "fix" works around the problem at hand, and now there are no more
crashes for either -Dsun.java2d.opengl.fbobject=true or fbobject=false.
                                     
2007-02-27



Hardware and Software, Engineered to Work Together