Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Corrupted Java Swing Window

One of the users of a Java swing GUI program that I wrote is having an issue where the main swing window doesn't render to the screen properly and the GUI freezes up. Here's a comparison of the screenshot on his screen (top) and what is supposed to show up (bottom):

alt text http://www.shapecollage.com/temp/SwingCorruption.jpg

He is running Windows XP SP3 with Java 1.6.0_13 and his graphics card is an ATI X1600 with a dual monitor set-up.

The program (if you would like to test for yourself) is at:
www.shapecollage.com/download.html

I have several thousand users and no one else has reported this error and I have tested it thoroughly on Windows XP. Anything computational is done in a separate thread from that of the regular GUI thread and the program works on many other computers, so I don't think it's a problem with the program itself, but rather, something wrong with his particular set-up.

Has anyone seen this type of error before on a system or have any suggestions as to what might be wrong on this user's system that would cause such a problem?

Thanks,
Vincent

like image 529
Vincent Avatar asked May 15 '09 19:05

Vincent


3 Answers

Maybe there's a problematic interaction between Java and the graphics driver and/or graphics hardware.

There are several flags that can influence how Java draws to the screen.

You might want to try to start the applications with any of those flags:

  • -Dsun.java2d.opengl=true
  • -Dsun.java2d.d3d=false
  • -Dsun.java2d.noddraw=true

Those flags toggle the OpenGL pipeline, turn of using Direct3D and disable use of DirectDraw respectively.

If any of those solves your problem, then you might consider filing a Bug with sun, because then it's probably not the applications that's at fault here.

like image 185
Joachim Sauer Avatar answered Oct 16 '22 06:10

Joachim Sauer


We had a very similar problem, which was fixed by updating the graphics driver. The problem might come from the dual monitor setup leading to VRAM corruption, so your customer might try if it will work better with only a single monitor. While you might expect Java would not be very dependent on the hardware, our graphics-intensitive application always manages to BSOD when run through a particular projector type...

like image 2
Slavcho Avatar answered Oct 16 '22 05:10

Slavcho


I haven't seen that particular type of corrupted graphics, but I have seen Java graphics problems on Windows disappear when the hardware acceleration in the extended display control panel is reduced.

like image 1
Michael Borgwardt Avatar answered Oct 16 '22 04:10

Michael Borgwardt