Skip to main content

JDK6 Display Problem

10 replies [Last post]
schrott
Offline
Joined: 2006-10-13

There's a problem I've encountered with some jars
in Windows XP with JDK6 (using latest b102):

Good example is Cinderella:

http://www.cinderella.de
http://cinderella.de/files/release/install.jar

Here's two Screenshots, first one with JDK6-rc-b102,
second one with 1.5.0_09

http://img156.imageshack.us/my.php?image=clipboard2lu1.png
http://img156.imageshack.us/my.php?image=clipboard3pv6.png

How to reproduce: Run cinderella, Press Ctrl-I

There were some occurences with other programs, but
this one is the easiest to reproduce.

Since JDK6 is considered fully(?) backwards compatible,
I think this should be fixed.

If anyone can confirm this please post, so I can be sure it's not a problem specific to my machine.

Regards,
S.

Reply viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.
schrott
Offline
Joined: 2006-10-13

Okay, here is some more information.

Unfortunately I have no java source for cinderella, but I did a bit of logging with:

-verbose -Dsun.java2d.noddraw=true -Dsun.java2d.trace=log

Here's the relevant bits from the log.

First one running in JDK5:

sun.java2d.loops.Blit$GeneralMaskBlit::Blit(IntArgb, SrcOverNoEa, IntRgb)
sun.java2d.loops.MaskBlit::MaskBlit(IntArgb, SrcOver, IntRgb)
sun.java2d.loops.Blit$GeneralMaskBlit::Blit(IntArgb, SrcOverNoEa, IntRgb)
sun.java2d.loops.MaskBlit::MaskBlit(IntArgb, SrcOver, IntRgb)
sun.java2d.loops.Blit::Blit(IntRgb, SrcNoEa, IntRgb)
sun.awt.windows.Win32GdiBlitLoops::Blit(IntRgb, SrcNoEa, "GDI")
sun.java2d.loops.FillRect::FillRect(OpaqueColor, SrcNoEa, AnyInt)
sun.java2d.loops.Blit$GeneralMaskBlit::Blit(IntArgb, SrcOverNoEa, IntRgb)
sun.java2d.loops.MaskBlit::MaskBlit(IntArgb, SrcOver, IntRgb)
sun.awt.windows.Win32GdiBlitLoops::Blit(IntRgb, SrcNoEa, "GDI")

Second one in JDK6:

sun.java2d.loops.MaskBlit::MaskBlit(IntArgb, SrcOver, IntArgb)
sun.java2d.loops.Blit::Blit(ByteIndexed, SrcNoEa, IntArgb)
sun.java2d.loops.Blit$GeneralMaskBlit::Blit(IntArgb, SrcOverNoEa, IntArgb)
sun.java2d.loops.MaskBlit::MaskBlit(IntArgb, SrcOver, IntArgb)
sun.java2d.loops.FillRect::FillRect(AnyColor, SrcNoEa, AnyInt)
sun.java2d.loops.FillRect::FillRect(AnyColor, SrcNoEa, AnyInt)
sun.java2d.loops.Blit::Blit(IntRgb, SrcNoEa, IntRgb)
sun.java2d.windows.GDIBlitLoops::Blit(IntRgb, SrcNoEa, "GDI")

Note that noddraw does not fix anything.
Anyway, maybe this helps.

trembovetski
Offline
Joined: 2003-12-31

Is this reproducible every time?
Does it manifest on many machines?
Did it work with earlier JDK6 builds?
It seems that you're using some non-standard XP skin - does the problem manifest with the default skin?

If the noddraw=true doesn't help it's likely to be Swing issue.

Could you please try with -Dswing.bufferPerWindow=false and see if it helps?

Thanks,
Dmitri
Java2D Team

Message was edited by: trembovetski

Message was edited by: trembovetski

schrott
Offline
Joined: 2006-10-13

>Is this reproducible every time?
Yes

>Does it manifest on many machines?

Only two ones I have checked here, still need confirmations from others
- it's really quick to test, install jar, hit ctrl+I, done

>Did it work with earlier JDK6 builds?

I had the same problem with a build a few weeks ago.

>It seems that you're using some non-standard XP skin -
>does the problem manifest with the default skin?

I have just verified the problem using standard skin,
standard explorer setup etc.

http://img483.imageshack.us/my.php?image=clipboard4jz8.png

In this screenshot I have also disabled any hardware acceleration,(Desktop->Setttings->Advanced->Troubleshoot->Hardware Acceleration: None), so I don't think it can be driver issues.

>Could you please try with -Dswing.bufferPerWindow=false >and see if it helps?

Hm, doesn't help apparently.

Regards,
S.

Message was edited by: schrott

trembovetski
Offline
Joined: 2003-12-31

> it's really quick to test, install jar, hit ctrl+I, done

Unfortunately the installer for some reason didn't install the launcher app on my machine (failed with some permission problem), so I can't start the app.

Do you happen to know the command line parameters for running it (like the main class, etc) - could you check with jconsole or something?

Thanks,
Dmitri

schrott
Offline
Joined: 2006-10-13

Here's what you can enter at the cmd.exe prompt from the
Cinderella base directory:

cd lib
ren *.zip *.jar
java -cp "*;..\Languages" de.cinderella.Cindy

When the app has launched, you can hit Ctrl+i and Ctrl+5 to see two manifestations of the issue.

Regards,
S.

Message was edited by: schrott
There was an error in the classpath - Fixed!

Message was edited by: schrott

trembovetski
Offline
Joined: 2003-12-31

Ok, I can reproduce it now, thanks.

Looks like this regression was introduced in b32.

Unfortunately a lot of stuff was changed in b32
(https://jdk6.dev.java.net/files/documents/5490/39010/jdk6-b32.html)
so it's not easy to tell what would be the cause.

I'll try to track it down and file a bug.

Do you work for this company? Any chance we can take a look at the code (at least for those dialogs)? Please let me know offline at: tdv at sun dot com.

Thanks,
Dmitri

kortenkamp
Offline
Joined: 2006-10-17

> Do you work for this company? Any chance we can take
> a look at the code (at least for those dialogs)?
> Please let me know offline at: tdv at sun dot com.

Hi Dmitri,

schrott told me about this discussion - I am one of the developers at Cinderella. I'll contact you offline.

Ulli

trembovetski
Offline
Joined: 2003-12-31

I can also reproduce it on Solaris as well, with different pipelines (OpenGL, X11), so this is most likely a Swing issue introduced with the Gray Rect fix.

Swing folks are looking into this and will file a bug.

Dmitri

schrott
Offline
Joined: 2006-10-13

When you've nailed it down, could you
post the bug id here so we can keep track of things

Regards,
S.

zixle
Offline
Joined: 2004-07-22

An update.

I was able to diagnose what's going on. Changes to Swing's painting in 1.6 require getWidth/getHeight on top levels (anything extending Window) to return the correct value. The test app had a case where getWidth on a Window subclass was returning 0, which caused painting not to occur. Once the app was changed to return the real size, all was well.

-Scott