-
Bug
-
Resolution: Duplicate
-
P4
-
None
-
1.3.0
-
generic
-
generic
Name: skT45625 Date: 05/09/2000
java version "1.3.0rc1"
Java(TM) 2 Runtime Environment, Standard Edition (build 1.3.0rc1-T)
Java HotSpot(TM) Client VM (build 1.3.0rc1-S, mixed mode)
MediaTracker.waitForID(...) fails to recover from blocked images when waittime
is set to zero!
This is a bug in the waitForID(...) method itself the following code segment
from MediaTracker.waitForID(...) shows the problem:
while (true) {
int status = statusID(id, first, first);
if ((status & LOADING) == 0) {
return (status == COMPLETE);
}
first = false;
long timeout;
if (ms == 0) {
timeout = 0;
} else {
timeout = end - System.currentTimeMillis();
-> if (timeout <= 0) {
-> return false;
-> }
}
wait(timeout);
if ms is 0 and (status & loading) stay equal to 0, then an endless loop will
result, because in this case the marked (->) statements will never be reached!
The same bug is also in the waitForAll(long ms).
(Review ID: 102835)
======================================================================
- duplicates
-
JDK-4332685 AbstractButton.getDisabledIcon can cause the VM to hang! (dual-processor box)
- Closed