In Java3D we have this call in DirectionalLightRetained
which extends LightRetained
public void update(long ctx, int lightSlot, double scale) {
super.update( ctx, lightSlot, scale) ;
...
}
where LightRetained is an abstract class with empty body,
public void update(long ctx, int lightSlot, double scale){}
It was found that under jdk1.4-rc-b89, when
DirectionalLightRetained is invoked 1500 times the JVM will
crash at super.update( ctx, lightSlot, scale) ;
without any stacktrace.
There are two workarounds, either
(1) Avoid invoking the super method when the body is empty
OR
(2) Add some content in the LightRetained.update()
so that it is not empty (e.g. System.out.println)
I've hack in another Java3D version in the attachment to
make the above class and method public and contruct
a test program as follows
import javax.media.j3d.*;
public class Test extends Thread {
Test(){
}
public void run() {
// This force J3D.dll library load
VirtualUniverse v = new VirtualUniverse();
DirectionalLightRetained t = new DirectionalLightRetained();
int i = 0;
while (true) {
System.out.println( "" + i);
t.update(0, 0, i++);
}
}
public static void main(String[] args) {
(new Test()).start();
}
}
Under win2K (I'm using 2 cpu), the call will crash when i=1500.
It is probably the hotspot compiler kick it at that time that
cause the crash.
To reproduce, please put the attach library and dll under
your JDK path jre/ext/lib and jre/bin
and run
java Test
Note that this problem did not exists in jdk1.3.1
- duplicates
-
JDK-4587517 Incorrect FP code being generated on x86
-
- Closed
-