Mantis Bug Tracker

View Issue Details Jump to Notes ] Issue History ] Print ]
IDProjectCategoryView StatusDate SubmittedLast Update
0006640opensim[REGION] Script Functionspublic2013-05-15 09:432013-05-16 12:39
ReporterMata Hari 
Assigned Tojustincc 
PrioritynormalSeveritymajorReproducibilityalways
StatusclosedResolutionfixed 
PlatformOSOS Version
Product Versionmaster (dev code) 
Target VersionFixed in Versionmaster (dev code) 
Summary0006640: osMakeNotecard using list data throws exception if a list element is a vector or rotation
DescriptionosMakeNotecard() throws an exception when the type is list and the list contains either a vector or rotation value in it. (Text of the exception message is in the additional information)

If the list contains only types string and/or float and/or integer the function works perfectly, but if any single element in a list is either a vector or rotation an error is thrown. The message is the same for both, except a rotation value will point to a different line in the server stack trace than the line number given with type vector.

Dumping the list to string and then saving the resulting string will work properly even if the list contains a vector or rotation.
Steps To Reproduce1. Enable osMakeNoteCard in the test region
2. Drop this script in a prim
3. Set useString=FALSE to have it try to store the list directly to notecard
   or set to TRUE to dump to string before storing the string
4. Uncomment one (or more) of the lines in state_entry()

list dataPoints;
integer useString=FALSE;
rotation testRotation=<1.0,1.0,1.0,1.0>;
vector testVector=<1.0,1.0,1.0>;
float testFloat=1.0;
integer testInteger=1;
string testString="12345";

default
{
    state_entry()
    {
        // uncomment one of the following lines and set useString to FALSE above
        dataPoints+=[testRotation];
        // dataPoints+=[testVector];
        // dataPoints+=[testFloat];
        // dataPoints+=[testInteger];
        // dataPoints+=[testString];
        // dataPoints+=[testRotation,testVector,testFloat,testInteger,testString];
        
        llSay(0, "Touch me to test with current useString setting of "+(string)useString+" and using dataPoints list of: "+llDumpList2String(dataPoints,"\n"));
    }
    touch_end(integer num)
    {
        if(useString)
        {
            string dataToStore=llDumpList2String(dataPoints,"\n");
            osMakeNotecard("test notecard",dataToStore);
        }
        else osMakeNotecard("test notecard",dataPoints);
        llSay(0,"Notecard stored");
    }
}
Additional Information(my Opensim is launched using the 32bit launcher)


EXCEPTION MESSAGE:

System.Reflection.TargetInvocationException: Exception has been thrown by the target of an invocation. ---> System.InvalidCastException: Specified cast is not valid.

Server stack trace:

   at OpenSim.Region.ScriptEngine.Shared.LSL_Types.list.GetLSLStringItem(Int32 itemIndex) in c:\Users\Aine\Downloads\opensim-ff03327\opensim-ff03327\OpenSim\Region\ScriptEngine\Shared\LSL_Types.cs:line 610

   at OpenSim.Region.ScriptEngine.Shared.Api.OSSL_Api.osMakeNotecard(String notecardName, list contents) in c:\Users\Aine\Downloads\opensim-ff03327\opensim-ff03327\OpenSim\Region\ScriptEngine\Shared\Api\Implementation\OSSL_Api.cs:line 1749

   at System.Runtime.Remoting.Messaging.StackBuilderSink._PrivateProcessMessage(IntPtr md, Object[] args, Object server, Int32 methodPtr, Boolean fExecuteInContext, Object[]& outArgs)

   at System.Runtime.Remoting.Messaging.StackBuilderSink.PrivateProcessMessage(RuntimeMethodHandle md, Object[] args, Object server, Int32 methodPtr, Boolean fExecuteInContex
TagsNo tags attached.
Git Revision or version numberr/22711 opensim-ff03327
Run Mode Standalone (Multiple Regions)
Physics EngineODE
Environment.NET / Windows64
Mono VersionNone
ViewerFirestorm
Attached Files

- Relationships

-  Notes
(0023900)
justincc (administrator)
2013-05-15 14:11

Thanks for the test script. It now works as of git master 177a53f
(0023905)
Mata Hari (reporter)
2013-05-16 12:39

tested with r22740 and confirmed fixed

Thanks Justin

- Issue History
Date Modified Username Field Change
2013-05-15 09:43 Mata Hari New Issue
2013-05-15 14:11 justincc Note Added: 0023900
2013-05-15 14:11 justincc Status new => resolved
2013-05-15 14:11 justincc Resolution open => fixed
2013-05-15 14:11 justincc Assigned To => justincc
2013-05-16 12:39 Mata Hari Note Added: 0023905
2013-05-16 12:39 Mata Hari Status resolved => closed
2013-05-16 12:39 Mata Hari Fixed in Version => master (dev code)


Copyright © 2000 - 2012 MantisBT Group
Powered by Mantis Bugtracker