RLV and Garbage Collection (AKA why some attachments get kicked off during login)
Note: This applies only to Marine Kelley’s RLV implementation version 2.9.33.0 and above (included in Kokua 6.6.11 and above). This is not applicable to Kitty Barnett’s RLVa implementation
RLV has a Garbage Collector which previously fired at 200 frames after the viewer entered STATE_STARTED and the loading screen gave way to the world view and then every 100 frames afterwards.
During this period the viewer may apply various blinding effects and other restrictions to prevent any interaction which would be prevented once attachments and the relay have loaded and got started.
RLV restrictions which were stored during start-up are applied prior to this point, however there are some exceptions made to allow attachments to be attached without getting kicked off by a RLV restriction prior to the first run of the garbage collector. RLV’s start-up does not include any inbuilt restrictions to attaching/wearing however incoming restrictions from worn items/inworld items via relay may do.
However, the viewer can easily vary between under 20 and over 100 frames per second which can mean that the time before the first garbage collection and object attaching restrictions being enforced can be highly variable.
Attachments can fail to attach if they arrive after the first garbage collection and a no attach restriction is now in effect. More exactly, they will try to attach and then be kicked off by the RLV restriction now in effect.
The timings for the garbage collection were not adjustable making it very hard to troubleshoot situations where an avatar frequently logged in with some attachments kicked off during login due to this behaviour.
In addition, Marine’s RLV, Kokua FTRLV and Kokua RLV (if the option is enabled) apply a blinding effect during login to prevent any interactions before worn items have had a chance to get worn and start up. More precisely, this runs from the point where the stored restrictions mentioned above are applied until the first garbage collection cycle.
The new approach
The garbage collector timings are now in seconds measured from the STATE_STARTED point mentioned above. There are two variables:-
Initial delay before the first garbage collection. This is hard coded at 5 seconds plus an additional time (default 5 seconds) from
RestrainedLoveInitialGarbageCollectionAdditionalWait
Time between subsequent garbage collection cycles. This is hard coded at 2 seconds plus an additional time (default 8 seconds) from
RestrainedLoveGarbageCollectionAdditionalInterval
So, with the default settings the garbage collector will wait 10 seconds from STATE_STARTED and then run every 10 seconds thereafter
If problems are being experienced with items being kicked off during login extend the initial delay or turn on the First Fully Visible settings described below.
First Fully Visible
The viewer sends around an internal notification when the avatar first de-clouds. Although this is a good indication that the avatar is visible, attachments may continue arriving afterwards however it can provide a useful timing point to hold off on starting garbage collection cycles until some time after First Fully Visible has been achieved. There are three variables that control this feature:-
Setting
RestrainedLoveGarbageCollectionIgnoreFirstFullyVisible
(default 1) to 1 disables the First Fully Visible timing, ie the timing is solely based around STATE_STARTED as it has been historically. Set it to 0 to enable First Fully Visible timingRestrainedLoveGarbageCollectionFirstFullyVisibleDelay
(default 15) sets the minimum number of seconds after First Fully Visible before the garbage collection can start. The garbage collector will then wait for the Initial Delay described above before running the first timeRestrainedLoveGarbageCollectionFirstFullyVisibleTimeout
(default 45) is the number of seconds from STATE_STARTED after which the viewer will stop waiting for First Fully Visible - this provides a safety feature for times when an avatar fails to de-cloud because an essential wearable is absent
These settings can be used to ensure the garbage collector waits until a chosen time after the avatar first de-clouds for additional control over timing when problems with attachments being kicked off are being experienced.
Improved blinding experience
Since these tunable features can result in longer times before blinding ends and the first garbage collection run the blinding feature has been enhanced to make it harder to interact with the avatar before the first garbage collection run
Additional RLV restrictions are now applied during the blinding experience; in particular inventory is denied, detaching clothing/attachments is denied and touching of all items (HUDs included) is denied
The viewer UI (the top menu bar, the side/bottom toolbar icons) will not appear until after garbage collection starts
Avatars will not be drawn until after the garbage collection starts
Avatar movement is prevented
Optional Settings
RestrainedLoveHideAvatarUntilGarbageCollection
is usually set to 1 and disables drawing avatars until the first garbage collection. However this can the disabled for troubleshooting (eg watching wearables arrive) by setting it to 0 (note Kokua FTRLV ignores this setting and always hides the avatar)RestrainedLoveUseNewGarbageCollectionTiming
is usually set to 1 and enables the new time-based timings. It can be set to 0 to return to the frame count based methodRestrainedLoveUseStrictGarbageCollectionRestrictions
is usually set to 1 and enables the Improved blinding experience features. It can be set to 0 for the original RLV-restriction only behaviour (note that Kokua FTRLV again ignores this setting and always uses the Improved blinding experience)
Exceptions to the touchhud restriction during login
There are a small number of HUDs which need to be clickable as soon as they appear such as the Tiny Empires and Tiny Empires 3000 game HUDs by Ultralite Soleil which show a ‘while you were away’ summary at login. A whitelist is included to allow Tiny Empires HUDs to work normally during the Improved blinding experience. Other HUDs may be added on request providing that their function doesn’t allow for changing anything which might be the subject of restrictions once login is complete.