Mantis Bug Tracker

View Issue Details Jump to Notes ] Issue History ] Print ]
IDProjectCategoryView StatusDate SubmittedLast Update
0004429opensim[REGION] OpenSim Corepublic2009-12-06 18:142014-07-29 13:39
Assigned ToBlueWall 
PlatformOperating SystemOperating System Version
Product Versionmaster (dev code) 
Target VersionFixed in Version 
Summary0004429: llGiveInventory fails if receiver is not known by script region or if user is not logged in
DescriptionScripts that use llGiveInventory to give users an object fail, if the receiving user is not known by the region (if the user is not in the same or a neighboring region) or if the user if logged out while llGiveInventory is executed.

This is surprising, inventory items dropped onto user profile windows get delivered properly, independent where the users is or if that user even is logged out.
TagsNo tags attached.
Git Revision or version number4338f4e1d7c841ba447eb2d7481daaa009182bc7
Run Mode Grid (1 Region per Sim)
Physics EngineODE
Script Engine
EnvironmentMono / Linux32
Mono Versiontrunk
Attached Files

- Relationships
duplicate of 0004528closedmelanie llGivenInventory fails to deliver object if recipient is offline 
parent of 0005451closedmelanie llGiveInventory only working in same or neighbor SIM. 
related to 0005228closedmelanie llGiveInventory doesnt deliver items marked as next owner cannot transfer in other regions 
related to 0005496closedMichelle Argus llGiveInventory() - Can't find item to give. Nothing given. 

-  Notes
Snoopy (administrator)
2009-12-07 11:12

Melanie told me that this bug in the trunk versions is known. It is caused by ongoing refactoring of OpenSim code (messaging and inventory). Regions servers do not cache user inventories locally anymore and as a consequence, the described functionally is broken temporarily.

Melanie said that fixing this bug after Xmas has high priority for her.
Fly-Man- (developer)
2010-09-06 03:28

Is this still an open issue Snoopy, I can't seem to reproduce this issue on master
thomax (reporter)
2010-10-29 23:57

yes, this still is not working and i saw it never working before.

llGiveInventory should work grid wide. llGiveInventory is not only a function related to a region it should be a function which involves the asset, inventory and message server as well.

from the implementation in Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs:

// check if destination is an avatar
if (World.GetScenePresence(destId) != null)

that if conditional checks for the existence of the destId in the regions scene only. if destId is not in the list of m_scenePresenceArray of Region/Framework/Scenes/SceneGraph.cs it will not get delivered.

so the function llGiveInventory is a function which only works in the current region scene where the object is rezzed.

from the linden lab wiki:

Function: llGiveInventory( key destination, string inventory );

Give inventory to destination.
• key destination – avatar or prim UUID
• string inventory – an item in the prim's inventory

If destination is an object then it must be in the same region.
If destination is an avatar they do not have to be in the same region.

this function is for sure not implemented in the way the linden lab defined it so i would call it incompatible in best case.



Pepper (reporter)
2010-11-20 03:47

I don't know which version of opensim this is from but in the 0.7x this works.
It doesn't work fully however, objects that have been set to next owner cannot transfer will not be delivered in another region. They will get delivered in the same region however. Full perm objects and others as long as they dont have 'next owner cannot transfer' are delivered as they should, in whatever region the receiver is in.
Michelle Argus (reporter)
2011-03-24 10:10

Is there any news on progress? Will we in the "normal" opensim ever see this function work across regions?
melanie (administrator)
2011-04-25 06:27

It should be working. Pepper, please supply a test case.
Michelle Argus (reporter)
2011-04-25 07:16

Melanie, i just testet Peppers "owner cannot transfer" issue, in the current OSgrid version.

- Items set to not transferable by previor owner are not trasfered, thats good
- Items set by current owner to not trasferable can be transfered, also good.
 I would say its working as it should, atleast in gridmode using mono.

Only thing thats still not working is sending items to unknown regions/user or offline Users.... as posted in the original Mantis.
BlueWall (administrator)
2011-04-25 08:39
edited on: 2011-04-25 09:32

Test for inter-region llGiveInventory:

    Uses a server listening on http for a request to send the inventory and a client that transmits the request with the uuid of the receiving avatar to the server. The client also says the servers response in chat.
    prepare the server object: (scripts below) Drop server script in an object, add an item for it to give then edit the inventory variable to name the item. Touch the server and note the url in your local chat log.

    prepare the client object: Drop the client script in an object and say the url on channel 5. Touch the client to test.

You will get the chat response from the server along with the inventory object and normal dialog message if: 1) you are in the same region as the server or, 2) an adjacent region running in the same instance as the server or, 3) an adjacent region running in a separate instance.

You will get a chat response only (no inventory or message) if you are in any non-adjacent region regardless of the instance it is running in.

// Server
string url;

// Drop an item in the prim content
// Set this to your inventory item...
string inventory = "TPoseStand";

// ###############################################
// Routine to parse a string sent through the
// http server via post.
// parsePostData(theMessage)
// Returns a strided list with stride length 2.
// Each set has the key and then its value.
list parsePostData(string message) {
    list postData = []; // The list with the data that was passed in.
    list parsedMessage = llParseString2List(message,["&"],[]); // The key/value pairs parsed into one list.
    integer len = ~llGetListLength(parsedMessage);
    while(++len) {
        string currentField = llList2String(parsedMessage, len); // Current key/value pair as a string.
        integer split = llSubStringIndex(currentField,"="); // Find the "=" sign
        if(split == -1) { // There is only one field in this part of the message.
            postData += [llUnescapeURL(currentField),""];
        } else {
            postData += [llUnescapeURL(llDeleteSubString(currentField,split,-1)), llUnescapeURL(llDeleteSubString(currentField,0,split))];
    // Return the strided list.
    return postData ;
default {
    state_entry() {
        //Requesting a URL
    touch_start( integer _det) {
        if(llDetectedKey(0) == llGetOwner()) {
    changed(integer What) {
        //Region restarted
        if (What & CHANGED_REGION_START) {
            //Request new URL
    http_request(key ID, string Method, string Body) {
        if (Method == URL_REQUEST_GRANTED) {
            url = Body;
        } else if (Method == URL_REQUEST_DENIED) {
            llOwnerSay("No URLs free !");
        } else if (Method == "POST") {
            list params = parsePostData(Body);
            integer id = llListFindList(params,["UUID"]);
            key uuid;
            if ( id != -1)
                uuid = llList2Key(params, id + 1);
            llHTTPResponse(ID, 200, "Hello there ! " + uuid);
            llGiveInventory(uuid, inventory);

// end Server


// Client
string url;

        llSetText("Tell me the server url on channel 5\nThen touch me to get the item",<0,1,0>, 1.0);
    touch_start(integer _det) {
                "&UUID=" + llDetectedKey(0));
    listen(integer _ch, string _nm, key _id, string _msg) {
        url = _msg;
        llInstantMessage(_id, "URL is: " + _msg);
    http_response(key _rid, integer _stat, list _mdat, string _body) {

melanie (administrator)
2011-05-22 19:02


- Issue History
Date Modified Username Field Change
2009-12-06 18:14 Snoopy New Issue
2009-12-06 18:14 Snoopy Git Revision => 4338f4e1d7c841ba447eb2d7481daaa009182bc7
2009-12-06 18:14 Snoopy SVN Revision => 11624
2009-12-06 18:14 Snoopy Run Mode => Grid (1 Region per Sim)
2009-12-06 18:14 Snoopy Physics Engine => ODE
2009-12-06 18:14 Snoopy Environment => Mono / Linux32
2009-12-06 18:14 Snoopy Mono Version => trunk
2009-12-07 11:12 Snoopy Note Added: 0014433
2010-09-05 15:38 justincc Relationship added duplicate of 0004528
2010-09-06 03:28 Fly-Man- Note Added: 0016762
2010-09-06 03:28 Fly-Man- Status new => feedback
2010-10-29 23:57 thomax Note Added: 0017178
2010-10-29 23:57 thomax Status feedback => confirmed
2010-11-20 03:47 Pepper Note Added: 0017345
2010-11-20 18:36 Pepper Relationship added related to 0005228
2011-03-24 10:10 Michelle Argus Note Added: 0018167
2011-04-25 05:42 Michelle Argus Relationship added parent of 0005451
2011-04-25 06:27 melanie Note Added: 0018313
2011-04-25 07:16 Michelle Argus Note Added: 0018314
2011-04-25 08:39 BlueWall Note Added: 0018316
2011-04-25 09:32 BlueWall Note Edited: 0018316
2011-05-20 13:23 BlueWall Status confirmed => assigned
2011-05-20 13:23 BlueWall Assigned To => BlueWall
2011-05-22 19:02 melanie Status assigned => resolved
2011-05-22 19:02 melanie Resolution open => fixed
2011-05-22 19:02 melanie Note Added: 0018483
2011-05-23 11:16 Michelle Argus Relationship added related to 0005496
2014-07-29 13:39 chi11ken Status resolved => closed

Copyright © 2000 - 2012 MantisBT Group
Powered by Mantis Bugtracker