MantisBT - opensim
View Issue Details
0006530opensim[REGION] Scripting Enginepublic2013-02-02 18:142014-07-29 13:42
mewtwo0641 
justincc 
normalminoralways
closedfixed 
master (dev code) 
 
Master
Standalone (Multiple Regions)
ODE
.NET / Windows64
None
All
0006530: Animations appear to not stop when being stopped via a list of UUIDs
When attempting to stop animations via llGetAnimationList() it appears to not work until another animation is played after stopping (i.e. Avatar walk, run, crouch, turn, etc.)

A code example of this would be:

list anims_playing = llGetAnimationList(llGetOwner());
        
integer i = 0;
       
for(i; i < llGetListLength(anims_playing); i++)
{
    string name = llList2String(anims_playing, i);
    llStopAnimation(name);
    llOwnerSay("Stopping anim: " + name);
}
1. Load up the animtest.iar file to your inventory and attach it to your avatar (it should default to HUD Center)

2. The prim should be colored red once attached. If you click it it will turn green and will play the animation in the object inventory named "tpose"
    a. Walk around a moment to verify that the tpose animation should always be playing no matter what.

3. Without moving your avatar or otherwise triggering a different animation, click the HUD again and it will turn back to red and execute the stop_all_list() function. (You will be given a small list of UUIDs in chat as it attempts to stop any playing animations.)
    a. Should notice that even though the stop command was processed, the tpose animation seems to still be playing.
    b. On rare occasion it will appear to work correctly with out the need for playing another animation to "pop" it out of place; I have only seen this on small occasions and usually it does not work. If this happens just move around and click the HUD a few times and the issue will eventually show up.

4. While the prim is colored red, play another animation or simply start walking and the tpose animation will finally quit.
I have located where the issue first starts to show up; Commit b977f9 (r/20586). I also tested a couple of commits before it to be certain and in those commits the issue does not appear.

Have also noticed that while in step 4 (before playing an animation or walking) that if I stand still and play an animation from my inventory and then stop it, the avatar will appear to be frozen in that new animation until I move around or play a different animation.

I have placed some comments in the HUD script of some of my observations notably, stopping an animation via object inventory name appears to work while stopping via animation UUID does not. There's a few (noted) lines in the script that can be uncommented to test for this.

Tested using animations from here: http://www.lindakellie.com/Creations/LK-ANIMATIONS.zip [^] But it also happens with (as far as I can tell) all other animations.

During testing I am not using any scripted AOs (aside from the test HUD in animtest.iar) or the client side AO.
No tags attached.
? animtest.iar (6,525) 2013-02-02 18:14
http://opensimulator.org/mantis/file_download.php?file_id=3475&type=bug
Issue History
2013-02-02 18:14mewtwo0641New Issue
2013-02-02 18:14mewtwo0641File Added: animtest.iar
2013-02-02 18:16mewtwo0641Additional Information Updatedbug_revision_view_page.php?rev_id=1006#r1006
2013-02-02 18:18mewtwo0641Additional Information Updatedbug_revision_view_page.php?rev_id=1007#r1007
2013-02-02 18:24mewtwo0641Additional Information Updatedbug_revision_view_page.php?rev_id=1008#r1008
2013-02-05 17:55justinccNote Added: 0023518
2013-02-05 17:55justinccAssigned To => justincc
2013-02-05 17:55justinccStatusnew => feedback
2013-02-06 01:27mewtwo0641Note Added: 0023526
2013-02-06 01:27mewtwo0641Statusfeedback => assigned
2013-02-06 17:34justinccNote Added: 0023533
2013-02-06 17:34justinccStatusassigned => resolved
2013-02-06 17:34justinccResolutionopen => fixed
2014-07-29 13:42chi11kenStatusresolved => closed

Notes
(0023518)
justincc   
2013-02-05 17:55   
Hi mewtwo. I replicated this behaviour on OpenSimulator as of commit dfe5826.

However, I believe this new behaviour is more correct as I can reproduce exactly the same thing with your script (avatar stops in mid animation) on the LL grid as well. It's also implied by [1] where it says

"If the animation stopped is the only playing animation (as found via llGetAnimationList), it will continue to play to it's end (if looped it will continue indefinitely)"

In the same way, I can also reproduce on both systems the behaviour you previously reported where an avatar in this 'animationless' state will also return to it once a script has finished playing from inventory.

As this behaviour matches that seen on the 'reference' grid then I'm afraid it's the OpenSim specific scripts that would have to change. One solution here would be to only stop animations that the script itself started.

[1] http://wiki.secondlife.com/wiki/LlStopAnimation [^]
(0023526)
mewtwo0641   
2013-02-06 01:27   
Ahhh alright. My apologies :) I don't do an exorbitant amount of work with animations on the LL grid so this one sort of took me by surprise. Many thanks for checking it out for me though Justin.

To be clear, I should try to stop animations by their inventory name when possible? Or if I must use llGetAnimationList; code around it with starting and stopping of the default stand animation?
(0023533)
justincc   
2013-02-06 17:34   
No, it shouldn't matter how you stop them (whether by inventory name, default name or asset ID), just that the pre-existing ones are not stopped.