Terrible re-display problem in 1.4.x

M

Mickey Segal

As illustrated with a tiny applet with full source code at:
http://segal.org/java/ReDisplay/
the Sun JVM can exhibit terrible delays in re-displaying components. This
occurs when a component has been shown already and is subsequently
re-displayed.

I first saw the problem in some Java 1.3.x versions on Windows 98, but it is
gone on 1.4.x on Windows 98. However it is present on 1.4.2_02 on Windows
XP.

This is such a common situation that others must have seen this. Is this a
known bug? Are there simple workarounds?

The only workaround I've found is to make new objects each time so there is
never any re-display, but this would be a very difficult workaround to
implement in existing code.
 
J

John C. Bollinger

Mickey said:
As illustrated with a tiny applet with full source code at:
http://segal.org/java/ReDisplay/
the Sun JVM can exhibit terrible delays in re-displaying components. This
occurs when a component has been shown already and is subsequently
re-displayed.

I first saw the problem in some Java 1.3.x versions on Windows 98, but it is
gone on 1.4.x on Windows 98. However it is present on 1.4.2_02 on Windows
XP.

This is such a common situation that others must have seen this. Is this a
known bug? Are there simple workarounds?

The only workaround I've found is to make new objects each time so there is
never any re-display, but this would be a very difficult workaround to
implement in existing code.

Have you tried not invalidating the Panels after adding them to the
Applet? It should not be necessary to do so, as you are already
revalidating the whole Applet.


John Bollinger
(e-mail address removed)
 
M

Mickey Segal

John C. Bollinger said:
Have you tried not invalidating the Panels after adding them to the
Applet? It should not be necessary to do so, as you are already
revalidating the whole Applet.

Not invalidating the Panels doesn't help. Also, further tinkering to assist
in reporting some less severe Macintosh problems with this applet
(http://segal.org/java/ReDisplay2/) shows that the Panel is being painted
but the button is not appearing.
 
M

Mickey Segal

John C. Bollinger said:
Have you tried not invalidating the Panels after adding them to the
Applet? It should not be necessary to do so, as you are already
revalidating the whole Applet.

Not invalidating the Panels doesn't help. Also, further tinkering to assist
in reporting some less severe Macintosh problems with this applet
(http://segal.org/java/ReDisplay2/) shows that the Panel is being painted
but the button is not appearing.
 
M

Mickey Segal

Mickey Segal said:
Not invalidating the Panels doesn't help. Also, further tinkering to assist
in reporting some less severe Macintosh problems with this applet
(http://segal.org/java/ReDisplay2/) shows that the Panel is being painted
but the button is not appearing.

I've reported this as a bug but Sun won't even decide on whether to give
this a bug number for three weeks. Versions of Sun's JRE with this bug will
be around for years, so this looks like one of those problems we have to
code around. This increases the "write once, debug everywhere" problem,
which is not good for Java. It is too bad one can't count on and specify a
well-written JRE such as those from IBM or Microsoft.
 
C

Cowboy Bob

Mickey said:
As illustrated with a tiny applet with full source code at:
http://segal.org/java/ReDisplay/
the Sun JVM can exhibit terrible delays in re-displaying components. This
occurs when a component has been shown already and is subsequently
re-displayed.

I first saw the problem in some Java 1.3.x versions on Windows 98, but it
is
gone on 1.4.x on Windows 98. However it is present on 1.4.2_02 on Windows
XP.

This is such a common situation that others must have seen this. Is this
a
known bug? Are there simple workarounds?

The only workaround I've found is to make new objects each time so there
is never any re-display, but this would be a very difficult workaround to
implement in existing code.

It works perfectly normally on 1.4.2_02 on Linux. You sure this isn't some
kind of Microsoft conspiracy? :)

Bob
 
M

Mickey Segal

Cowboy Bob said:
It works perfectly normally on 1.4.2_02 on Linux. You sure this isn't some
kind of Microsoft conspiracy? :)

It also works half-decently on 1.4.2_02 on Windows 98SE. I don't know why
this problem occurs, but Sun should think twice about releasing a JRE on one
of the most common platforms if it has problems of this magnitude. This
same bug came and went on versions of sun's JRE on Windows 98, and Sun
officials have publicaly agonized over their inability to stamp out problems
that sounded a lot like this. It would be nice it if got solved, but in the
meantime we have to work around it, particularly if Sun's attitude is to
signal that they don't care a lot about bug reports.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,755
Messages
2,569,537
Members
45,020
Latest member
GenesisGai

Latest Threads

Top