Welcome to the Second Life Forums Archive

These forums are CLOSED. Please visit the new forums HERE

Asset server woes?

Shyotl Kuhr
Registered User
Join date: 15 Jun 2005
Posts: 105
08-24-2006 19:00
Something seems to have gone wrong in the last few weeks. LSL functions related to inventory have been hit and miss latley, and it seems to have broken many products. Often GiveInventory fails to find items in the inventory, when they really are there, and llGetScriptName() seems to randomly return Null. I've tossed together a quick script to mess around and see how broken the system really is. Most my observations are tossed into the comments.

Also, items removed from the inventory like to reappear in the objects after a few minutes. After running this script several times, I relogged, and had atleast 20 scripts named "Old Script" in the objects inventory. All of those scripts gave a database error when opened. Along with those, there were several old, removed yet returned, copies of 'InvTest'(the name of the included script), all of which opened with no problem. This suggests that RemoveInventory, even when given a valid script (or object?) name, still fails to remove the script completley.

Nothing horribly complex, just testing functions. Requires the key of another object, and said object to have its Script Pin set to 9999.

Script name : InvTest
CODE

key target = "72ac3020-2dcd-67ef-dbc2-81cbdb3ce405";
default
{
state_entry()
{
string extra = "source";
integer param = llGetStartParameter();
if(param) extra = "target";
llSetObjectName(extra);
llOwnerSay("Testing : " + extra);
llOwnerSay("GetScriptState = \"" + (string)llGetScriptState("InvTest") + "\"");
//Likley to return an incorrect state ( 0 when it should be 1 )

llOwnerSay("GetInventoryType = \"" + (string)llGetInventoryType("InvTest") + "\"");
//Seems to always return 10, which is correct,
//but it seems odd, as nothing else is working


llOwnerSay("llGetScriptName = \"" + llGetScriptName() + "\"");
// Likley to reurn NULL

llGiveInventory(llGetKey(),"InvTest");
// Occasionally not found

if(llGetStartParameter() != 1)
{
llRemoteLoadScriptPin(target,"InvTest",9999,TRUE,1);
//Seems to work, although sometimes only on 2nd try. It also
//takes several minutes for changes to the script to get
//noticed by this function. The target seems to get an old
//compile of the script.


llSleep(2);
}

else
llSleep(5);
llOwnerSay("Removing...");
llRemoveInventory(llGetScriptName());
// Sometimes works after delay.
//Still seems unreliable. llGetScriptName often returns NULL
//and a warning message will appear when it cant find inventory with that name.
//Also. scripts seem to reappear after they are removed!
//Half the time the reappearing scripts are called "Old Script", which are
//missing from the asset server when you try to open them.

}
}

Now, I can add more sleeps into the script, which seems to help go along working, but even with large pauses, the functions are still rather intermittant. Does anyone have a clue what's going on, or is the asset server just slowly dying and dragging scripts down with it?

Edit: Example output when I run it.
source: Testing : source
source: GetScriptState = "1"
source: GetInventoryType = "10"
source: llGetScriptName = ""
target: Testing : target
target: GetScriptState = "0"
target: GetInventoryType = "10"
target: llGetScriptName = ""
source: Removing...
[Script error/warning source: Missing inventory item '' ]
target: Removing...
[Script error/warning target: Missing inventory item '' ]
April Heaney
The Evolution of Pants
Join date: 31 Dec 2005
Posts: 22
08-24-2006 19:38
I came here looking to see if anyone else was having issues with this, and I can confirm that:

llRemoveInventory(llGetScriptName());

and

llRemoveInventory("Script Name Here";);

is persistently failing, where it worked just fine before 1.12.

I'm bug reporting it right now...

-AH-
_____________________
Occam's Eraser: The philosophical principle that even the simplest solution is bound to have something wrong with it.
Shyotl Kuhr
Registered User
Join date: 15 Jun 2005
Posts: 105
08-24-2006 20:03
From: April Heaney
I came here looking to see if anyone else was having issues with this, and I can confirm that:

llRemoveInventory(llGetScriptName());


I recall llRemoveInventory(llGetScriptName()) failing before this update, but it was the exception to the rule. Now it seems to actually be the rule.
Kayla Stonecutter
Scripting Oncalupen
Join date: 9 Sep 2005
Posts: 224
08-25-2006 00:15
As I have posted in this thread:
/54/ef/131990/1.html

Any LSL function related to inventory has a delay before it can do anything with new items. Even a 0.1 second delay in the script is enough for the functions to work properly (might need to be more for laggy sims though).
_____________________
Tiarnalalon Sismondi
Registered User
Join date: 1 Jun 2006
Posts: 402
08-25-2006 05:05
I've also noticed lately that for some reason I randomly have sounds played or triggered once via a script will repeatedly play...seemingly with no pattern or cause.

These sounds were working and playing only when called not that long ago, and nothing concerning the sound's scripting has changed.
Shyotl Kuhr
Registered User
Join date: 15 Jun 2005
Posts: 105
08-25-2006 07:18
From: Tiarnalalon Sismondi
I've also noticed lately that for some reason I randomly have sounds played or triggered once via a script will repeatedly play...seemingly with no pattern or cause.

These sounds were working and playing only when called not that long ago, and nothing concerning the sound's scripting has changed.


" source: Removing...
[Script error/warning source: Missing inventory item '' ]
target: Removing...
[Script error/warning target: Missing inventory item '' ]"
Note that the removal was attempted after a full 5 seconds of sleep in a script. I innitally messed with a delay, and managed to have .1secs work, but it started requiring larger and larger delays as the script was ran more times.
Kayla Stonecutter
Scripting Oncalupen
Join date: 9 Sep 2005
Posts: 224
08-25-2006 15:39
There is a separate, but possibly related, bug regarding llRemoteLoadScriptPin() that is possibly the cause of the problems you're having with that (see this thread). Every test I did with other inventory functions worked fine after just a short delay, so llRemoteLoadScriptPin() might be making the problem worse when it gets used.
_____________________
WhiteFire Sondergaard
Registered User
Join date: 17 Jun 2005
Posts: 21
08-26-2006 05:00
I have a script that when initially started (default state entry) goes to a config state, reads a notecard, and only after doing that does it check the permissions on itself with the line:

integer perms = llgetInventoryPermMask(llGetScriptNmae(), MASK_OWNER);

That fails, unable to find the script, when I copy the script into the object. I have to go and reset he script afterward to get it to work.

This DIDN'T seem to happen with scripts compiled before 1.12, but is on all the new copies I'm working on. Not sure that's 100% the case, but all the new copies definatly are giving this error consistantly now.

Bleh. :P Never thought I'd have to check if llGetScriptName() existed in the inventory before getting info on it.
WhiteFire Sondergaard
Registered User
Join date: 17 Jun 2005
Posts: 21
08-26-2006 05:02
Note: this bug seems to have gone away after that last rolling update...