AnimEventListener.onAnimCycleDone() never called

AnimEventListener.onAnimCycleDone() never called.

but onAnimChange() was ran correctly.

**Product Version:** jMonkeyEngine SDK v3.2.1-stable-sdk3

**Updates:** jMonkeyEngine SDK is updated to version [NetBeans 8.2 Patch 2](

**Java:** 1.8.0_161; Java HotSpot(TM) 64-Bit Server VM 25.161-b12

**Runtime:** Java(TM) SE Runtime Environment 1.8.0_161-b12

Did you add an AnimEventListener using AnimControl.addListener()?

1 Like

yes. onAnimChange() was ran correctly.

1 Like

If I had access to your source code, I would run it in the debugger, with a breakpoint in AnimChannel.update() to see whether notifyAnimCycleDone() is getting invoked.

1 Like

I added a break point in AnimChannel.update() but in DebuggerConsole:
Listening on javadebug
User program running
Not able to submit breakpoint LineBreakpoint : 322, reason: No executable location available at line 322 in class com.jme3.animation.AnimChannel.
Invalid LineBreakpoint : 322

Line 322:

void update(float tpf, TempVars vars) {

You can’t submit a line breakpoint there. Try a different line, or use a method breakpoint.

ok I did it with a method breakPoint , so how can I detect notifyAnimCycleDone() is invoked or not in debugger? I pressed step Over button and the green Line goes down to next line and also the line of control.notifyAnimCycleDone(this, animation.getName()); was green. is it mean notifyAnimCycleDone invoked? I never used debugber…

Typical use for a debugger is to step through code one line at a time until you see it take an unexpected path. You’ll want to check key variables occasionally for unexpected values.

If I reached the line where notifyAnimCycleDone() is invoked, then I’d want to “Step Into (F7)” that method and examine the value of listeners.

1 Like