MantisBT - opensim
View Issue Details
0007960opensim[REGION] Script Functionspublic2016-07-09 09:532019-02-06 11:30
Total Sorbet 
Total Sorbet 
normalmajoralways
closedfixed 
debiantesting
 
 
OSgrid 0.9.0.0 (Dev) 259824f: 2016-07-04 git hash : 259824fbc4d86ad624f0b146c3e04ea850b0b8b6
Grid (Multiple Regions per Sim)
Other
Mono / Linux64
trunk
0007960: llAttachToAvatarTemp() child prims not rezzing as part of hud
If llAttachToAvatarTemp() is used to attach hud to someone other than hud creator only the root prim is rezzed. Quite often no prims are rezzed. On occasion attachment will displace cam viewpoint.
Rez 6 small prims 0.05 x 0.05 x 0.05 and stack them on top of one another to make vertical tower. Link them.

Then place following script inside root:

key gAttachTo=NULL_KEY; //key of avatar to attach to
integer gCountPerm=0; //permission request counter
integer gPrims; //number of prims in linkset

grab_perms()
    {
    ++gCountPerm;
    llRequestPermissions(gAttachTo,PERMISSION_ATTACH);
    }

default
    {
    timer()
        {
        llSetLinkPrimitiveParams((integer)llFrand(gPrims)+1,[PRIM_COLOR,ALL_SIDES,<llFrand(1.0),llFrand(1.0),llFrand(1.0)>,1.0]);
        }
    state_entry()
        {
        gPrims=llGetObjectPrimCount(llGetKey());
        llSetTimerEvent(0.5);
        }
    on_rez(integer n)
        {
        llResetScript();
        }
    touch_start(integer n)
        {
        if(gAttachTo==NULL_KEY)
            {
            gAttachTo=llDetectedKey(0);
            grab_perms();
            }
        }
    run_time_permissions(integer p)
        {
        if(p & PERMISSION_ATTACH)
            {
            if(gCountPerm==1)
                {
                llAttachToAvatarTemp(35);
                grab_perms();
                }
            else if(gCountPerm==2)
                {
                llSay(0,"Attached!");
                }
            }
        else
            {
            llSay(0,"Not attached, permission denied.");
            gAttachTo=NULL_KEY;
            }
        }
    }

Set perms on object and script to copy/trans

Take copy into inventory :)

Click object to attach.

You should see the cubes attached vertically to centre hud and changing colour randomly.

My alt only ever sees the root prim on centre hud. Child prims are not visible. Sometimes nothing is visible.

Strangely if the attachment point is changed to the alts right hand llAttachToAvatarTemp(6); both the alt and object creator will see all 6 prims yet only the root prim will change colour. This is not the case if the object is attached to object creators hand where both alt and creator see all 6 prims changing colour.
$ mono -V
Mono JIT compiler version 4.2.1 (Debian 4.2.1.102+dfsg2-8)
Copyright (C) 2002-2014 Novell, Inc, Xamarin Inc and Contributors. www.mono-project.com
        TLS: __thread
        SIGSEGV: altstack
        Notifications: epoll
        Architecture: amd64
        Disabled: none
        Misc: softdebug
        LLVM: supported, not enabled.
        GC: sgen

No tags attached.
Issue History
2016-07-09 09:53Total SorbetNew Issue
2016-07-09 10:29Total SorbetSeverityminor => major
2016-07-09 10:29Total SorbetReproducibilityhave not tried => always
2016-07-09 16:54Total SorbetSteps to Reproduce Updatedbug_revision_view_page.php?rev_id=5656#r5656
2016-07-10 04:24Total SorbetOS => debian
2016-07-10 04:24Total SorbetOS Version => testing
2016-07-10 04:24Total SorbetAdditional Information Updatedbug_revision_view_page.php?rev_id=5658#r5658
2016-07-10 09:27danbannerNote Added: 0030892
2016-08-16 08:28Total SorbetNote Added: 0031032
2016-08-16 08:28Total SorbetMono VersionOther => trunk
2016-08-16 08:28Total SorbetStatusnew => resolved
2016-08-16 08:28Total SorbetResolutionopen => fixed
2016-08-16 08:28Total SorbetAssigned To => Total Sorbet
2019-02-06 11:30BillBlightNote Added: 0034500
2019-02-06 11:30BillBlightStatusresolved => closed

Notes
(0030892)
danbanner   
2016-07-10 09:27   
This seems to work correctly in simulators running in .net. The issue seems to only occur in simulators running with mono and reverting to a known working version does not resolve the issue now. Could this be related to recent changes in robust code?
(0031032)
Total Sorbet   
2016-08-16 08:28   
Tested using
OSgrid 0.9.0.0 (Dev) 259824f: 2016-07-04
git hash : 259824fbc4d86ad624f0b146c3e04ea850b0b8b6

this issue appears to be resolved now :)
(0034500)
BillBlight   
2019-02-06 11:30   
Marked as Resolved but never closed, can be reopened if needed.