Mantis Bug Tracker

View Issue Details Jump to Notes ] Issue History ] Print ]
IDProjectCategoryView StatusDate SubmittedLast Update
0002418opensim[REGION] Scripting Enginepublic2008-10-17 17:222012-07-02 13:25
Reportermirceakitsune 
Assigned To 
PriorityhighSeverityminorReproducibilitysometimes
StatusnewResolutionopen 
PlatformPentium 4OSWindows XP Media CenterOS VersionSP3 32bit
Product Version 
Target VersionFixed in Version 
Summary0002418: xEngine - llPlaySound and llTriggerSound loop continuously when triggered in touch_start()
DescriptionI made a door using the following script and two different sounds named doorOpen and doorClose:

vector ClosedPos = <163.000,17.125,22.414>;
vector ClosedRot = <0,0,0>;

vector OpenPos = <164.500,18.25,22.414>;
vector OpenRot = <0,0,247.50>;

default
{
    state_entry()
    {
        llPreloadSound("doorOpen");
        llPreloadSound("doorClose");
        
        llSetPos(ClosedPos);
        llSetRot(llEuler2Rot(ClosedRot * DEG_TO_RAD));
        llSetTouchText("Open");
        llSleep(5);
    }
    
    touch_start(integer avatar)
    {
        llPlaySound("doorOpen", 0.75);
        state open;
    }
}

state open
{
    state_entry()
    {
        llSetPos(OpenPos);
        llSetRot(llEuler2Rot(OpenRot * DEG_TO_RAD));
        llSetTouchText("Close");
        llSleep(5);
    }
    
    touch_start(integer avatar)
    {
        llPlaySound("doorClose", 0.75);
        state default;
    }
}

Every time I touch this door the sounds keep playing forever instead of only being triggered once, just as if llPlaySound was a llLoopSound.
Additional InformationThe same issue may exist for llTriggerSound and llSound. I also tried resaving and restarting the script but the sound kept playing from the point where the primitive was at when it began. This doesn't seem to happen in scripts where I have llPlaySound on a timer event.
TagsNo tags attached.
Git Revision or version number
Run Mode Grid (1 Region per Sim)
Physics EngineODE
Script Engine
Environment.NET / Windows32
Mono VersionNone
Viewer
Attached Files

- Relationships

-  Notes
(0006317)
mirceakitsune (reporter)
2008-10-18 04:09

[UPDATE] Just noticed today when I logged back in but without restarting the simulator that the door now works correctly. With the same script llPlaySound only plays once now and doesn't loop. Maybe that issue only happens sometimes in certain cases of lag?
(0006946)
mirceakitsune (reporter)
2008-11-06 08:40
edited on: 2008-11-06 08:41

Still happening in r7105. It seems that currently in xEngine in almost half of the cases, llPlaySound and llTriggerSound behave exactly like llLoopSound, even when not passing between states and llTriggerSound is in a simple touch_start event.

(0006970)
mirceakitsune (reporter)
2008-11-06 17:09

More info discovered on this; It seems that llPlaySound and llTriggerSound only act like this on scripts which are newly created before sim restarts. In other words, if you have a script that contains a llPlaySound or llTriggerSound in it around the sim and activate it after the sim has been restarted since the script's last save, it will work correctly. If you save a new script (or re-save that one) and activate it however, they will loop the sound forever instead of triggering it once until the sim restarts when. If you then return to the object afterward and touch it, it will work correctly.
(0008291)
mirceakitsune (reporter)
2008-12-21 17:18

Still noticing this in r7824, especially when triggering multiple llSomethingSound's from different prims simultaneously.
(0012411)
mirceakitsune (reporter)
2009-07-13 07:49

I can still confirm this issue in rev 10027. After saving a new script with llPlaySound in touch_start the prim spams the sound continuously until restarting the sim.

I did another test and noticed something interesting. It seems this may happen when there's also a llPreloadSound in the script. I tried resaving a script several times on new prims with only llPlaySound present and no issue, but once I added the llPreloadSound it started going on forever.
(0015004)
Revolution (reporter)
2010-02-14 20:42

Appears to work correctly as of 2c0c21d0a5fd89120d8be47cd959acd96b286fe3. Please give feedback.
(0015049)
mirceakitsune (reporter)
2010-02-23 04:08

I still experience it with some scripts in the latest revision. This is a script which still causes the issue (the object it's in is a single prim):

vector ClosedRot;
vector OpenRot = <0,0,-90>;

default
{
    state_entry()
    {
        ClosedRot = llRot2Euler(llGetRot()) * RAD_TO_DEG;
        llPreloadSound("doorOpen");
        llPreloadSound("doorClose");
        state closed;
    }
}

state closed
{
    state_entry()
    {
        llSetRot(llEuler2Rot(ClosedRot * DEG_TO_RAD));
        llSetTouchText("Open");
    }
    
    touch_start(integer avatar)
    {
        llPlaySound("doorOpen", 0.75);
        state open;
    }
}

state open
{
    state_entry()
    {
        llSetRot(llEuler2Rot((ClosedRot + OpenRot) * DEG_TO_RAD));
        llSetTouchText("Close");
    }
    
    touch_start(integer avatar)
    {
        llPlaySound("doorClose", 0.75);
        state closed;
    }
}
(0020508)
mirceakitsune (reporter)
2011-12-12 08:06

This just happened again last night, on my r/17539 sim. The issue is still there.
(0021648)
lmmz (reporter)
2012-06-15 14:51

This still seems to happen to me when using llPlaySound(), but not llTriggerSound(). OSGrid release 6/2/2012.

- Issue History
Date Modified Username Field Change
2008-10-17 17:22 mirceakitsune New Issue
2008-10-17 17:22 mirceakitsune SVN Revision => 6892
2008-10-17 17:22 mirceakitsune Run Mode => Grid (1 Region per Sim)
2008-10-17 17:22 mirceakitsune Physics Engine => ODE
2008-10-17 17:22 mirceakitsune Environment => .NET / Windows32
2008-10-17 17:23 mirceakitsune Description Updated
2008-10-18 04:09 mirceakitsune Note Added: 0006317
2008-10-18 04:09 mirceakitsune Reproducibility always => sometimes
2008-11-06 08:40 mirceakitsune Note Added: 0006946
2008-11-06 08:41 mirceakitsune Note Edited: 0006946
2008-11-06 10:50 mirceakitsune Priority normal => high
2008-11-06 10:50 mirceakitsune Summary xEngine - llPlaySound loops continuously when triggered in touch_start() => xEngine - llPlaySound and llTriggerSound loop continuously when triggered in touch_start()
2008-11-06 17:09 mirceakitsune Note Added: 0006970
2008-12-21 17:18 mirceakitsune Note Added: 0008291
2009-07-13 07:49 mirceakitsune SVN Revision 6892 => 10027
2009-07-13 07:49 mirceakitsune Mono Version => None
2009-07-13 07:49 mirceakitsune Note Added: 0012411
2009-07-13 07:49 mirceakitsune Description Updated
2009-07-13 07:49 mirceakitsune Additional Information Updated
2010-02-14 20:42 Revolution Note Added: 0015004
2010-02-14 20:42 Revolution Status new => feedback
2010-02-23 04:08 mirceakitsune Note Added: 0015049
2011-12-12 08:06 mirceakitsune Note Added: 0020508
2011-12-12 08:06 mirceakitsune Status feedback => new
2012-06-15 14:51 lmmz Note Added: 0021648


Copyright © 2000 - 2012 MantisBT Group
Powered by Mantis Bugtracker