Mantis Bug Tracker

View Issue Details Jump to Notes ] Issue History ] Print ]
IDProjectCategoryView StatusDate SubmittedLast Update
0006246opensim[REGION] Scripting Enginepublic2012-08-24 05:242012-08-24 06:51
ReporterSignpostMarv 
Assigned To 
PrioritynormalSeverityminorReproducibilityalways
StatusnewResolutionopen 
PlatformOSOS Version
Product Versionmaster (dev code) 
Target VersionFixed in Version 
Summary0006246: XEngine allows bools to be stored in lists instead of using 1 or 0
Descriptionbool is not a valid LSL type therefore LSL lists should never contain bools, however it seems that XEngine does allow bools to be stored in lists, resulting in some behaviour inconsistent with the Second Life implementation

While it is possible to hunt through all functions that deal with lists and apply workarounds (e.g. 0006243 & 0006245) this is undesirable in the long-term since:
1) slapping band-aids (e.g. 0006245) onto a project instead of fixing the underlying issue is never a good thing
2) Some workarounds may break existing functionality (e.g. 0006243).
Steps To Reproducedefault
{
    touch_start(integer t){
        llSay(0,llList2CSV([
            1.0 > 0,
            1.0 < 0
        ]));
        llSay(0, llList2String([1.0 > 0], 0));
    }
}
TagsNo tags attached.
Git Revision or version number
Run ModeStandalone (1 Region) , Grid (1 Region per Sim)
Physics EngineBasicPhysics
Script Engine
Environment.NET / Windows32, .NET / Windows64
Mono VersionNone
Viewer
Attached Files

- Relationships
parent of 0006243closedmelanie LSL operations that equate to a c# boolean cannot be used where floats are valid 
parent of 0006245patch included llList2CSV in OpenSim (under XEngine) does not behave as it does in Second Life 
Not all the children of this issue are yet resolved or closed.

-  Notes
(0022440)
SignpostMarv (reporter)
2012-08-24 06:51

Got another repro:

default
{
    state_entry()
    {
        vector foo = <1,1,1>;
        vector bar = <1.0, 1.0, 1.0>;
        
        list tests = [
            foo.x == 1,
            foo.x == 1.0,
            bar.x == 1,
            bar.x == 1.0
        ];

        integer test1 = llList2Integer(tests, 0);
        integer test2 = llList2Integer(tests, 1);
        integer test3 = llList2Integer(tests, 2);
        integer test4 = llList2Integer(tests, 3);
        
        list output = [
            "vector property comparison tests"
        ];
        
        if(test1){
            output += ["Test 1: passed"];
        }else{
            output += ["Test 1: failed"];
        }
        
        if(test2){
            output += ["Test 2: passed"];
        }else{
            output += ["Test 2: failed"];
        }
        
        if(test3){
            output += ["Test 3: passed"];
        }else{
            output += ["Test 3: failed"];
        }
        
        if(test4){
            output += ["Test 4: passed"];
        }else{
            output += ["Test 4: failed"];
        }
        
        llOwnerSay(llDumpList2String(output, "\n"));
    }
}

- Issue History
Date Modified Username Field Change
2012-08-24 05:24 SignpostMarv New Issue
2012-08-24 05:24 SignpostMarv Relationship added parent of 0006243
2012-08-24 05:24 SignpostMarv Relationship added parent of 0006245
2012-08-24 06:51 SignpostMarv Note Added: 0022440


Copyright © 2000 - 2012 MantisBT Group
Powered by Mantis Bugtracker