views:

761

answers:

6
A: 

Swing isn't thread safe, so if you're doing the rendering anywhere other than the GUI thread, you can expect this sort of thing.

Paul Tomblin
The rendering is only done in the GUI thread. The program works fine on thousands of other computers.
Vince
+1  A: 

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.

Michael Borgwardt
A: 

I have seen corrupted graphics like that, but never in java. The places i've seen it were in windows draw/etc code, and the tiling and snow look generally indicated something like telling the image draw code that you were going to draw an image of a certain size and bit depth, but then filling the image buffer with a different bit depth. like filling the byte array with data from an integer RGBA source and putting it into an integer RGB destination?

but from the screen shot, the user looks like they're also running some other kind of app too, as there's an extra button by the minimize/maximize/close buttons, so some other third party application is modifying the window. Maybe that's messing with it?

Otherwise i'd say driver issue. There's always some solutions like disabling d3d drawing or some other draw optimizations that the VM does automatically now, maybe that solves it?

John Gardner
+2  A: 

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.

Joachim Sauer
I had a related issue in which -Dsun.java2d.d3d=false solved the issue.See http://stackoverflow.com/questions/848481/problem-with-painting-in-java-swing-app-in-java-1-6
Avrom
+2  A: 

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

Slavcho
The user updated his graphics card driver and it fixed the problem.
Vince
A: 
* -Dsun.java2d.opengl=true
* -Dsun.java2d.d3d=false
* -Dsun.java2d.noddraw=true

These options helped me with the same problem. Thank you!

Boris