Cool VL Viewer forum

View unanswered posts | View active topics It is currently 2017-05-30 11:11:22



Reply to topic  [ 4 posts ] 
@getoutfit returns unbaked outfit instead of current outfit 
Author Message

Joined: 2015-02-09 19:41:55
Posts: 5
Reply with quote
Hi, when calling @getoutfit upon login after RLV is detected, it returns the state of the unbaked outfit (only skin, shape, eyes and hairbase) instead of the outfit in the Current Outfit folder. If this is intentionally designed like this, I'd like to know a way how to detect the avatar is baked in Cool Viewer without just forcing a long delay to sit out the baking process. Cool VL Viewer is the only viewer reporting the avatar as nude.

Example code. Put in a prim, attach then relog.
Code:
integer g_iRlvOn = FALSE;

integer g_iTimerLogin;

integer RLV_VERSION_CH = 9934004;
integer g_iRlvVersionHandle = 0;
integer RLV_OUTFIT_CH = 9934002;
integer g_iRlvOutfitHandle = 0;
integer RLV_ATTACH_CH = 9934005;
integer g_iRlvAttachHandle = 0;

default
{
    state_entry()
    {
    }
   
    attach(key kID)
    {
        if (kID==llGetOwner()) llRequestPermissions(llGetOwner(), PERMISSION_ATTACH);       
    }
   
    run_time_permissions(integer iPerms)
    {
        if (iPerms & PERMISSION_ATTACH) {
            g_iRlvOn = FALSE;
            g_iRlvOutfitHandle = llListen(RLV_OUTFIT_CH, "", llGetOwner(), "");
            g_iRlvAttachHandle = llListen(RLV_ATTACH_CH, "", llGetOwner(), "");
            g_iRlvVersionHandle = llListen(RLV_VERSION_CH, "", llGetOwner(), "");
            llOwnerSay("@versionnew="+(string)RLV_VERSION_CH);
            g_iTimerLogin = llGetUnixTime()+30;
            llSetTimerEvent(0.5);
        }
    }
   
    listen(integer ch, string name, key id, string msg)
    {
        if (ch==RLV_VERSION_CH) {
            llListenRemove(g_iRlvVersionHandle);
            g_iRlvOn = TRUE;
        }
        if (ch==RLV_OUTFIT_CH) {
            llOwnerSay("getoutfit: "+msg);
        }
        if (ch==RLV_ATTACH_CH) {
            llOwnerSay("getattach: "+msg);
        }
    }
   
    timer()
    {
        integer iTimeStamp = llGetUnixTime();
       
        if (iTimeStamp < g_iTimerLogin) {
            vector vAgentSize = llGetAgentSize(llGetOwner());
            if(vAgentSize.z!=1.9 && g_iRlvOn==TRUE) {
                llSetTimerEvent(0);
                llOwnerSay("rlv detected; agentsize is "+(string)vAgentSize.z+", most likely de-ruthed");
                llOwnerSay("@getoutfit="+(string)RLV_OUTFIT_CH);
                llOwnerSay("@getattach="+(string)RLV_ATTACH_CH);
           }
        } else {
            llSetTimerEvent(0);
            llOwnerSay("no rlv detected");
        }
    }
}


This will output:
Code:
[20:38]  ruth test: rlv detected; agentsize is 1.589590, most likely de-ruthed
(note that we're still a cloud even though llGetAgentSize.z != 1.9)
[20:38]  ruth test: getattach: 01100101111100011000000010010100100000100000000000000000
[20:38]  ruth test: getoutfit: 0000000001111000
(getoutfit returned total nude despite wearing clothes in current outfit)
[20:38]  Sugar Kawaii Collar: RLV ready!
(Note: still clouded until the next line:)
[20:38]  Your avatar's outfit is now fully restored

(re-attach test object after we're baked:)
[20:39]  ruth test: rlv detected; agentsize is 1.589590, most likely de-ruthed
[20:39]  ruth test: getoutfit: 1011101101111110
[20:39]  ruth test: getattach: 01100101111100011000000010010100100000100000000000000000


Version info:
Code:
Cool VL Viewer v1.26.20.21, 64 bits, May 13 2017 10:32:56
RestrainedLove viewer v2.09.21.21
Release Notes

You are at 2637363.3, 2457819.7, 3000.5  in Oaks Plains located at
sim2.lotix.nl (173.212.202.139:30000)
OpenSim 0.9.1.0 Dev        lotix ce7310996d: do 04-05-2017   (Unix/Mono)

CPU: Intel(R) Core(TM) i5-4460  CPU @ 3.20GHz (3200.02 MHz)
Memory: 16122MB
OS version: Microsoft Windows 8 64-bit  (Build 9200) compatibility mode. Real version: 10.0 (Build 10586)
Memory manager: OS native
Graphics card vendor: NVIDIA Corporation
Graphics card: GeForce GTX 750 Ti/PCIe/SSE2
Windows graphics driver version: Loading...
OpenGL version: 4.5.0 NVIDIA 376.53
Detected VRAM: 2048MB
J2C decoder: OpenJPEG: 1.4.0.635d
Audio driver: FMOD Ex v4.44.64
Networking backend: libcurl/7.47.0 OpenSSL/1.0.1h zlib/1.2.8
Embedded browser: CEF3 plugin v1.5.3c-(CEF-WIN-3.2526.1347-32)
Packets lost: 0/14038 (0.0%)

Built with: MSVC v1800

Compile flags used for this build:
/O2 /Oi /MD /MP /DNDEBUG /D_SECURE_SCL=0 /D_HAS_ITERATOR_DEBUGGING=0 /DWIN32 /D_WINDOWS /W3 /GR /EHsc /Oy- /GS /fp:fast /TP /W2 /Zc:forScope /Zc:wchar_t- /c /nologo /DLL_WINDOWS=1 /DUNICODE /D_UNICODE /DWINVER=0x0600 /D_WIN32_WINNT=0x0600 /DXML_STATIC /DBOOST_ALL_NO_LIB /DLL_LUA=1 /DLL_FMODEX=1 /DAPR_DECLARE_STATIC /DAPU_DECLARE_STATIC /DCURL_STATICLIB=1 /DLIB_NDOF=1



Attachments:
File comment: Log file
CoolVLViewer.zip [30.14 KiB]
Downloaded 1 time
2017-05-15 04:58:08
Profile

Joined: 2009-03-17 18:42:51
Posts: 3565
Reply with quote
This is in no way a bug. It is totally normal that a non-baked avatar wears nothing till it gets baked after login. It's also normal, when changing outfit, that any @getoutfit occurring during baking will return a stale list of wearables or nothing but the four mandatory body parts as worn.

The "current outfit folder" (COF) is in no way a reliable description of what your avatar is wearing: the Cool VL Viewer can (and actually will, by default) function without the COF at all on OpenSim grids: the COF is only needed for the baking process in SL, but what the avatar actually wears is kept track on the server side, and mirrored by the viewer internal data: that's what the Cool VL Viewer exclusively relies upon (and what makes it totally immune to the shitload of race condition bugs that cause all LL-based v2 viewers to suffer from, such as attachments falling off the avatar on TP, which in turn made LL add yet another shitload of ugly code to work around the race conditions, only opening more cases for new race conditions: the coding of the COF code in LL's viewer is so poor and uselessly convoluted, that I rewrote it from scratch): the Cool VL Viewer algorithm is designed to first send all server requests to wear the outfit, to wait (and retry if necessary) till the sever says every item is worn, the viewer updating the COF accordingly in the mean time; once both the viewer and the server agree on what is worn, the Cool VL Viewer finally launches a baking request (in case of a bake failure, the request is retried; in case of more failures, the COF is refreshed (to increment its version number), and a new request is launched, etc).

Normally, any properly scripted RestrainedLove device will wait for some time after login before checking what the avatar wears or changing what it wears (a dozen of seconds after the on_rez() event is usually more than enough: from your log, a two seconds delay would have been enough). That's what your scripted device should do...

I'll however try to think about a better solution (i.e. extend the RestrainedLove spec with a new feature): perhaps the viewer could delay the @getoutfit reply (thus "pausing" RLV) till the avatar is fully baked, for example...


2017-05-15 07:31:43
Profile WWW

Joined: 2015-02-09 19:41:55
Posts: 5
Reply with quote
The 'safe' delay i always use for @getoutfit after much testing (for a HUD I wrote) seems to be just under 30 seconds. That is with an already populated inventory. Clearing the cache would cause @getoutfit to report nude after the time-out because the viewer doesn't know yet what's in the COF.

Then I had a 2nd look at the old non-COF system you mentioned and was amazed by the speed the avi baked directly on login while the inventory started populating from scratch (clean cache). So this is what I'll be using from now on with OpenSim, and if possible also on other viewers that allow the COF to be turned off.

I can only imagine the COF put an enormous load on any inventory service, including Linden Lab's own service because on OsGrid the delays are sometimes so large when attaching/wearing things that it queues up and sometimes only after a minute the links are made/removed in the COF.


2017-05-15 12:09:43
Profile

Joined: 2009-03-17 18:42:51
Posts: 3565
Reply with quote
I changed the command queuing logic in today's release: all the commands (but @version* ones) received during a rebake/outfit change are now delayed until the avatar is fully baked.


2017-05-20 09:00:06
Profile WWW
Display posts from previous:  Sort by  
Reply to topic   [ 4 posts ] 

Who is online

Users browsing this forum: No registered users and 1 guest


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
cron
Powered by phpBB® Forum Software © phpBB Group
Designed by ST Software.