Mantis Bug Tracker

View Issue Details Jump to Notes ] Issue History ] Print ]
IDProjectCategoryView StatusDate SubmittedLast Update
0008240opensim[REGION] Script Functionspublic2017-09-13 18:172017-09-17 12:02
ReporterGwyneth Llewelyn 
Assigned ToGwyneth Llewelyn 
PlatformPCOSUbuntu LinuxOS Version16.04.3 LTS
Product Versionmaster (dev code) 
Target VersionFixed in Version 
Summary0008240: llSetObjectName() gets confused with more than 63 characters and sets object name to empty string
DescriptionFrom the LSL Wiki:

'The name is limited to 63 characters. Longer prim names are cut short.'

This happens on rezzed objects on the ground — but if an object is attached, and changes its name before being detached, then the name appearing on the Inventory is unpredictable, but most likely empty. As a consequence, the item in Inventory appears just with the icon (even though it's fully functional!).

Under Second Life, the name is properly truncated to 63 characters before detachment occurs.
Steps To Reproduce1. Rez an object on the ground and place the following script inside:

    attach(key avatar)
        if (avatar) {
            llOwnerSay("Object name is now '" + llGetObjectName() + "'");
        } else {
            llSetObjectName("This is certainly going to be far more than 63 characters and so it ought to be properly truncated.");
            llOwnerSay("Object name is now '" + llGetObjectName() + "'");

2. Right-click and select Wear
3. Detach it
4. Notice the chat messages (the llSetObjectName() shows a new name that is usually empty
5. Notice how it gets saved to Inventory
Additional InformationPossibly this happens only when the overall grid has slow posts and there hasn't been enough time for the new name to have propagated to the central servers before it gets detached — a racing condition that sometimes also happens (or happened) in Second Life, which got the name set to "(Waiting)".

A simple workaround (also found on the LSL Wiki for the llGetObjectName()) is to place a loop waiting until the object name changes to what is expected.

Note that this _only_ happens with names with more than 63 characters; those within the limit will be correctly changed before detachment.

Mono version used for compilation was 4.2.1.
TagsNo tags attached.
Git Revision or version numberOpenSim Dev (fe276e4)
Run Mode Grid (Multiple Regions per Sim)
Physics EngineBulletSim
EnvironmentMono / Linux64
Mono VersionOther
ViewerFirestorm 5.0.7 (52912)
Attached Files

- Relationships

-  Notes
UbitUmarov (administrator)
2017-09-13 19:39

- if (avatar) does not work on opensim, it is a known bug, (or should say a feature by now.
Please use if (avatar != NULL_KEY)
think this explains why name is deleted.

- we do store the full length and it is displayed on inventory
- At SL this script does not change the name on inventory.
- With opensim it seems unreliable
UbitUmarov (administrator)
2017-09-13 19:48

Guess any changes to a object done on script attach event are unreliable, not only name.
tampa (reporter)
2017-09-13 21:48

Just tested: if (avatar != NULL_KEY) and that works as intended on latest master.
Name is set to the full length as well, not cut.
UbitUmarov (administrator)
2017-09-14 03:45

yes, but it is not reliable because script events processing is async with the rest of the attachment processing. So its lottery...
Gwyneth Llewelyn (reporter)
2017-09-17 12:00

Oh, I see. I confirmed that if (avatar != NULL_KEY) works, and the name is correctly set in the inventory. Thanks, Ubit & tampa :) I will mark this as resolved.
Gwyneth Llewelyn (reporter)
2017-09-17 12:02

The problem was in the LSL script (incorrect semantics!), not on the OpenSimulator code, which works as intended once the LSL script was corrected.

- Issue History
Date Modified Username Field Change
2017-09-13 18:17 Gwyneth Llewelyn New Issue
2017-09-13 19:39 UbitUmarov Note Added: 0032292
2017-09-13 19:48 UbitUmarov Note Added: 0032293
2017-09-13 21:48 tampa Note Added: 0032294
2017-09-14 03:45 UbitUmarov Note Added: 0032295
2017-09-17 12:00 Gwyneth Llewelyn Note Added: 0032296
2017-09-17 12:02 Gwyneth Llewelyn Note Added: 0032297
2017-09-17 12:02 Gwyneth Llewelyn Status new => resolved
2017-09-17 12:02 Gwyneth Llewelyn Resolution open => fixed
2017-09-17 12:02 Gwyneth Llewelyn Assigned To => Gwyneth Llewelyn

Copyright © 2000 - 2012 MantisBT Group
Powered by Mantis Bugtracker