Skip to main content

Alpha Start Delay (Bug?)

3 replies [Last post]
Joined: 2006-07-18

We're using Java3D 1.4.0 and we've recently been having problems with Alpha objects starting late; that is, value() continues to return 0 long after the start time has passed. This depite the fact that triggerTime, phaseDelay, and alphaAtZeroDuration are all set to 0. And the delay is irregular. Usually it's around 2-5 seconds, but I've seen delays as bad as 37 seconds. Sometimes when the application starts up, everything is fine, and sometimes it starts up with the delay sickness. When afflicted by delays, every Alpha instance in the app is effected, and the delay gets steadily worse overall as time goes on. Furthermore, this problem is at at its worst when I first log in to my account; after I've restarted the app a half-dozen times or so it seems to go away, and I have to log out and back in to reproduce it again. And it only seems to happen on my machine (P4 3GHz running XP).

Thinking that we might be somehow corrupting the state of our own Alpha instances, I made the following crude test class:

public class AlphaTester {
public synchronized void startTest() {
if (_testRunning)
_alpha = new Alpha(1,5000);
_testRunning = true;

public synchronized void eachFrame() {

long now = System.currentTimeMillis();
if (_alpha.getStartTime() > now)

if (_testStartTime == -1)
_testStartTime = now;

if (_alpha.value() > 0) {
long delay = now - _testStartTime;
System.out.println("Alpha start delay = " + delay);
_testRunning = false;
_testStartTime = -1;

private Alpha _alpha;
private long _testStartTime = -1;
private boolean _testRunning = false;

I kick off this test at the same time the app begins an animation. The eachFrame() method is being called every frame by a Behavior. Note that the test creates a new Alpha instance each time it runs, to ensure the state is pristine. This class reports a steadily increasing delay whenever I see delays in the rest of the system.

Any ideas what might be causing this? Having read that the Alpha object now depends internally on a native-code-based nanosecond timer, I began to wonder if this might not be a bug. Any help is greatly appreciated.

- Jake

Reply viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.
Joined: 2008-02-26

forget what i wrote about my little test. I always forget that currentSystemtime is counted in ms since a long time ago.

But with a little rudimental alpha my animations are working great.

Joined: 2008-02-26

I have the same problem as jake4d with Java3D 1.5.X.
Inspired by what jake4ds written i performed a very short test: I started my computer and a few minutes later my application. When i first use an Alpha i checked the starttime of this Alpha with alpha.getStarttime. To my surprise i got this value: 122002096371. This would mean a starttime over a day ago. So for me its a bug. The only question is: Is it a Java3D bug or a Windows bug?

Have somebody a workaround despite implementing an own Alpha class??


Joined: 2004-03-17

This sounds like it could be a bug. Could you please file an issue and attach the complete test program to the bug report?


-- Kevin