Mantis Bug Tracker

View Issue Details Jump to Notes ] Issue History ] Print ]
IDProjectCategoryView StatusDate SubmittedLast Update
0006874opensim[REGION] Script Functionspublic2013-12-01 20:092013-12-01 20:14
ReporterKayaker Magic 
Assigned To 
PlatformServersOSWindows .NETOS Version0.7.5 PF b285
Product Version 
Target VersionFixed in Version 
Summary0006874: llSetPrimitiveParams has strange responces to bad types in rules list
DescriptionWhen you send the wrong data type in one of the elements of the rules list to llSetPrimitiveParams (or llSetLinkPrim...), it does not generate a run-time error like it should.
The following script should give the error message about sending a string in rule element no.1, but it does not. It just works as if that argument was set to 0 for face 0. However, if you give the resulting prim to someone else, it often starts spewing that error message to the new owner.

Here is a different problem, but I like this behavior. If you change the call to:


it does something very useful! The 0 (or any other integer) in the texture element of the rule causes the function to work to completion using the existing texture on face 0. Since this is what I wanted, I didn't notice that I had the NULL_KEY and the 0 reversed. I was looking for a way to change the other parameters of this call without knowing what the texture was and without changing it. It turns out if I had entered this correctly 0,NULL_KEY, it would have replaced the texture of the face with a blank texture (and then flipped it) which was not what I wanted at all. So the final version of MY code looks like this:


Which correctly changes the parameters on face 0 using the texture that is already there without replacing it. This is a useful feature that I have heard people ask for: A way to change one of the parameters in llSetPrimParam without always having to change several others at the same time.

I hope you don't fix this when fixing the type check on the face parameter. You would think that it would be possible to read all these parameters with llGetPrimitiveParameters, change the ones you want, then write them back out with llSetPrimParam. BUT THIS IS NOT ALWAYS TRUE! Getting the UUID of a texture map that you do not have permissions to use is not allowed, in this case llGetPrimParam returns a NULL_KEY for the texture, so a read-modify-write of the rest of the parameters is not possible. This happened to me when I built an object with a script in it that flipped one of the textures in place with a read-modify-write. Since I owned the texture, it worked in all my testing. Then when I gave the build to someone else, IT FAILED TO WORK! This was a very difficult bug to fix, and the use of the integer 0 in the texture UUID argument was the fix!
Steps To ReproducePut the script below in a prim. The num string is the UUID of some texture that you can tell if it is flipped horizontally by the 'side' value.
You will notice that the script flips the texture on face 0 back and forth. But it never gives the run-time error message that it should.
Additional Information//script should generate a run-time error but usually does not
integer side = 1;
string num="fa32d30a-8bf8-474e-9d75-9abf3d75cb64";
        side = -side;
TagsNo tags attached.
Git Revision or version number
Run Mode Grid (Multiple Regions per Sim)
Physics EngineBulletSim
Script Engine
Environment.NET / Windows64
Mono VersionNone
Attached Files

- Relationships

-  Notes
There are no notes attached to this issue.

- Issue History
Date Modified Username Field Change
2013-12-01 20:09 Kayaker Magic New Issue
2013-12-01 20:14 Kayaker Magic Description Updated View Revisions

Copyright © 2000 - 2012 MantisBT Group
Powered by Mantis Bugtracker