Java Solaris Communities Sun Store Join SDN My Profile Why Join?
 
Bug Database
Bug Detail
Quick Lists
Top 25 Bugs
Top 25 RFE's
Recently Closed Bugs
Printable Page Printable Page


Bug Database
Bug ID: 4738111
Votes 8
Synopsis java crashes or hangs when display mode changes on Matrox g400 (Windows only)
Category java:classes_2d
Reported Against 1.4.1 , hopper , mantis-beta
Release Fixed 1.4.1_02
State 10-Fix Delivered, bug
Priority: 2-High
Related Bugs 4636548 , 4798194 , 4806658
Submit Date 28-AUG-2002
Description
With my desktop system (dual PIII-800, Matrox g400 dual head (only one
display set)), when I install an older driver (version 5.0.2195.1020, from 
the file w2k501.exe attached to this bug report, downloaded from matrox.com),
any java app crashes when I run another directX app fullscreen.  For example,
when I run the matrix-3d screen saver (also attached to this bug report).

To reproduce:
- install this driver version
- run notepad (java -jar Notepad.jar in demo/jfc/Notepad)
- run the screen saver (or another DirectX fullscreen app)
- note that Notepad quietly exited with no stack trace

This problem was first reported by another user with a similar setup, using
driver version 5.0.2195.1030.

-------------------------
I am able to reproduce similar problems with Java apps alone.  Run
DisplayModeTest, choose another display mode, and click "Set Display".
The app will quietly exit at this point.  A similar effect is seen in any
fullscreen Java app that attempts to set the display mode.

 xxxxx@xxxxx  2002-11-07

See the description to bug 4798194, which I just closed as a duplicate of this
bug.  Older matrox drivers cause Java to exit, but newer Matrox drivers have a different problem: Java simply hangs.  For example, run the SetDM app attached to this bug report.  On older drivers, the app simply exits, on newer drivers, the app hangs in fullscreen mode and you have to run the task manager to exit the app (alt-tab does not function correctly).

 xxxxx@xxxxx  2003-01-06
Work Around
Don't run an xxxxx  DirectX fullscreen app while java is running.  Note that the
usual noddraw flag does nothing to fix this problem.

Upgrade drivers to recent version.
Evaluation
Note that although the -Dnoddraw and -Dd3d flags do not affect this problem,
the problem does not exist on pre-1.4 versions of the jdk.
 xxxxx@xxxxx  2002-08-29

I verified with the submitter that the problem comes from an older Matrox
driver; when he upgraded to a more recent driver the problem went away.  Similarly, when I downgraded to an older version (close to the version used by the submitter), I was able to reproduce the problem.

So the ultimate fix here is to upgrade your video drivers to a more recent version; you can get newer drivers from www.matrox.com.  However, we should
still figure out what we are doing that is triggering this problem in the
driver.

When tracing the problem in standalone Java apps (see the updated Description),
I can see that the SetDisplayMode call works fine.  Later, the primary surface
is recreated without a problem as well.  Then the app exits sometime after that.
More investigation necessary.

 xxxxx@xxxxx  2002-11-07

As documented in bug 4798164, the fix is simple: don't call getDefaultPixID(screen) in Win32GraphicsDevice during the displayChanged() method.  The call is unnecessary and causes a call to ChoosePixelFormat, which is an OpenGL call which triggers the driver exit/hang bugs that we are seeing.

 xxxxx@xxxxx  2003-01-06

The root of the problem (the call to an OpenGL-related function) points out
why this bug cropped up with DirectX screen savers and not the default
OpenGL screen savers.  The problem (with the matrox driver) was not in
calling the pixel format function at all, but calling it while some
DirectX process (perhaps even our own) had fullscreen exclusive ownership
of the display.  If an OpenGL application owns the display (as it does
with the GL screen savers), there is no conflict.  But if DirectX owns
the display, the call to ChoosePixelFormat either hangs or fails outright.

 xxxxx@xxxxx  2003-01-06
Comments
  
  Include a link with my name & email   

Submitted On 15-SEP-2002
mdescher
I'm not sure if it is related to this, but (on Windows XP) 
nVidia's driver nv4_disp.dll version 6.13.10.4041 crashes with 
a bluescreen when running a Java GUI application and one of 
the 3D screensavers starts.


Submitted On 19-SEP-2002
krustyii
I have the same problem using j2sdk1.4.0_01 and Matrox 
G450 with driver version 5.12.01.1840


Submitted On 24-SEP-2002
dgkimpton
JDK 1.4, dual screen, matrox millenium G550, latest drivers,
Win2K, dual athlon mp, DirectX 8.1. Matrox driver revision
5.12.01.1220.

Also see this problem - error message is about a native code
exception.

Seems to occur when a directX app exits - I've checked any
java keeps running happilly whilst the directX app (in this
case http://www.serenescreen.com/ screensaver) is running. 
It only seems to be on directX shutdown that the problem
occurs.  Possibly as a result of resolution/colour depth
changes.

This is a very severe problem for distributing applications
written using JDK1.4 as it is not possible to force users to
avoid all DirectX apps.

I have also seen this on a PIII 450 with integrated graphics
chip (ATI I think).


Submitted On 08-OCT-2002
joshpassenger
I am voting for this bug as I have done for the 5 or 6 bugs all 
relating to the fact that full screen mode crashes all swing 
allications on Win32 systems when it exits.  Closing bugs 
because they are duplicates of other more obscure bugs is 
not helping the problem. Come on guys, bite the bullet and fix 
this one already.  It has nothing to do with drivers, you have 
the VM trace files.  How long are you going to step around 
this one?  Send me the source and I will fix it.  I notice that 
you have listed this bug as fixed on the 1.4.1 release notes 
and hope that you have indeed fixed it as all of the bug notes 
seem to indicate that no-one wants to touch this one and 
that it has just been buried under a pile of 'Bug closed as 
duplicate of blah blah'.  Frustrated with the whole bug 
reporting system at Sun I am.


Submitted On 08-OCT-2002
joshpassenger
Part 2

********************************************
4639735 - 38 votes
Raised 19/02/2002
Closed 11/06/2002 - duplicate of 4636548
********************************************

Sure this was fine, before 4636548 was closed without being 
fixed.  Shame that this bug has a code example and a VM 
dump log as its core bug report. Its interesting that the 
developer comments on this bug indicate that it is actually a 
bug and should be fixed but time resources are scarce.  Then 
it was closed as a duplicate but no detail carried forward.


********************************************
4702062 - 0 votes
Raised 13/06/2002
Closed 18/06/2002 - duplicate of 4636548
********************************************

The comments on this bug indicate a likely solution:

We're not doing all the right things on a display mode switch.  
In particular,
we are not switching the GraphicsConfiguration object in an 
important
situation.

In WVolatileImage.displayChanged(), we only change out the 
graphicsConfig
object if the surfaceDataHw object is not null.  But in the 
case described,
our app never rendered between the first switch (to the 
DisplayModeTest
setting) and the second (when DisplayModeTest ends), so we 
never replaced
the surfaceDataHw object.  The end result is that we replace 
graphicsConfig
the first time through but not the second, so when we get 
back control
after DMT exits, we are stuck with the GraphicsConfiguration 
object in
the intermediate DMT setting.

The fix is easy; simply take the graphicsConfig changing code 
out of the
(surfaceDataHw != null) condition so that we swap out the 
gc on every
display mode switch.  Then we will always be current to the 
new mode.
xxxxx@xxxxx 2002-06-13

Closing as a duplicate of 4636548; both problems come from 
the same base
cause (improper resetting of surfaceData state during display 
change events)
and should be fixed together.
xxxxx@xxxxx 2002-06-18

Was this implemented?  Or was this lost again through re-
assigning bugs.


********************************************
4738111 - 5 votes
Raised 28/08/2002
Status !In progress, bug! Surprisingly no related bug reports!!!
********************************************

While the comments indicate that the person who submitted 
this was not aware of the previous bugs reported for exactly 
the same issues, perhaps anyone working on this defect 
should consult bugs 4639735, 4702062, 4636548. There they 
will find code examples, VM dump files and many useful 
comments by people like myself who are frustrated at the 
time this defect is taking to resolve and the lengths that are 
being taken to hide its details.

At the very least this bug should be linked to these previous 
bugs.


Submitted On 08-OCT-2002
joshpassenger
I give this bug about another month before it's detail reaches 
critical mass and it will have to be closed as a duplicate of a 
more obscure bug. Otherwise, someone might just go and fix.


Submitted On 08-OCT-2002
joshpassenger
<pre>

Part 1

See the following bug ids if you want to see the full scale of 
effort that has gone into avoiding fixing this bug.  A lot of 
people want this bug fixed really badly and have invested 
time in reporting this bug over and over and over again to 
Sun.  Here is a trip down 'Memory Lane' since February 2002:

********************************************
4636548 - 60 votes
Raised 12/02/2002
Closed 30/08/2002 - closed, fixed - deffered to 4738111
********************************************

Why was this closed when the last comment indicates that it 
was not indeed fixed at all and how was this attributed to a 
driver problem.  Did they try the code sample from the 
duplciate 4636548?  The comments indicate a likely solution.

Some interesting comments on this bug:

I discovered several easy ways to reproduce this problem.  
Run a simple java
application (such as FullScreen/CapabilitiesTest) using 1.4 or 
later and then
launch a second fullscreen app.  The first app will crash.  This 
is a nasty bug
that will crash *any* java app simply whenever a Windows 
2000 app is launched
(such as a screensaver).  I'm raising the priority and have 
updated the
suggested fix.
xxxxx@xxxxx 2002-06-10

and then???

I have opened up a new bug against this old-driver problem: 
4738111.  In
general, we require use of the latest display drivers and it is 
not possible to
work around all display driver bugs.  However, we should at 
least figure out
why we are crashing and work around it if at all possible.
xxxxx@xxxxx 2002-08-30

Why was this closed if it was not fixed?  Its a shame the 
requested fix from 4702062 was not attempted.

</pre>


Submitted On 18-OCT-2002
dgkimpton
If more vm dumps would help anyone - I've got loads because
my java app that I'm writing bombs out every time my
screensaver kicks in... :(

Just mail me if you need em.


Submitted On 25-OCT-2002
kscriv
We have this same problem with netmeeting on Windows 2K


Submitted On 10-NOV-2002
joshpassenger
Re Evaluation 2002-11-07:

Look in the VM dump file, it certainly is not a silent exit, its 
fully logged.

I get this problem with a FireGL 1000 PRO and with a NVidia 
GForce 2 on Windows NT and Windows 2000.

Please read the customer comments and look at the linked 
bugs or you are wasting your time.


Submitted On 15-NOV-2002
chethaase
Note to everyone having this problem:
There are actually two distinct problems that this bug relates 
to.  One is reported in the closed bug 4636548.  The fix to 
this bug was released with jdk1.4.1, so if you are not running 
that release, I would suggest that you download it now and 
try it out.
- The second problem (what this bug report is about) is 
specific to older Matrox drivers.  We're trying to nail down 
what it is we are doing to trigger the bug, but in the 
meantime, go to www.matrox.com and get a more recent 
driver.

If you still experience a similar crash after the two 
suggestions above, then you are seeing an unrelated problem; 
please fiile (yet another) bug...


Submitted On 18-DEC-2002
mkeehan
I seem to have this bug as well! (And I am not using a Matrox 
card!) Win 2K, JDK 1.4.1_01, & latest Display Drivers. So I am 
voting to get it fixed.


Submitted On 10-JAN-2003
mguidix
Take a look at bugs 4749817 - 4713003. They might be 
related. Nearly 300 more voting. Looks like there are several 
interwoven problems (all related to video drivers).


Submitted On 18-AUG-2003
meyer_michael
Hi, I have a Matrx G550 and dual screen and exaclty the
behavier described. When starting a screen saver the swing
app hangs. We use jdk1.4.2 !!! 
So could it be that this bug should be reopened?


Submitted On 18-AUG-2003
meyer_michael
Hi, I have a Matrox G550 and dual screen and exaclty the
behavier described. When starting a screen saver the swing
app hangs. We use jdk1.4.2 !!! 
So could it be that this bug should be reopened?


Submitted On 22-AUG-2003
brendon9x
I have an entire trading floor of PCs here that hang on both XP 
and 2K on G400 dual-heads.  Using 1.4.2!


Submitted On 25-AUG-2003
chethaase
To comment-posters that are still having related problems as 
of 1.4.2 (such as meyer_michael and brendon9x):
There are obviously still problems here that need to be 
resolved.  The original bug _was_ fixed, but maybe there are 
additional problems that manifest themselves in similar ways.

In any case, since we have not seen these kinds of problems 
in-house, can I get your assistance in tracking down the 
problem(s)?

If you can, please reply to my email link with this comment 
and send me all available information like the following:
- What specific video card model do you have?
- Are you running multimon?
- What OS are you running?
- What bit-depth(s) are the screen(s)?
- What application(s) cause these crashes?  can you send me 
a sample app that crashes?
- If a screensaver is causing the crash, what screensaver are 
you running?
- Anything else you can think of that would enable me to 
start reproducing the problems in-house and tracking down 
the cause(s).

Thanks.  Problems like this should be fixed as soon as 
possible.  That was the goal when we fixed the bug the first 
time around...

Chet.
(Java2D team)



PLEASE NOTE: JDK6 is formerly known as Project Mustang