History | Log In     View a printable version of the current page.  
  • All submissions to this site are governed by Second Life Project Contribution Agreement. By submitting patches and other information using this site, you acknowledge that you've read, understood, and agreed to those terms.
Issue Details (XML | Word | Printable)

Key: SVC-1372
Type: Bug Bug
Status: Resolved Resolved
Resolution: Fixed
Priority: Normal Normal
Assignee: Scouse Linden
Reporter: Ashrilyn Hayashida
Votes: 0
Watchers: 4
Operations

If you were logged in you would be able to see more operations.
2. Second Life Service - SVC

Mono Beta - Duplicate events in Mono script cause compilation failure, while LSL only runs the last duplicate event

Created: 30/Jan/08 04:55 PM   Updated: 20/Jun/08 02:35 AM
Component/s: Scripts
Affects Version/s: Mono Beta
Fix Version/s: None

Issue Links:
Duplicate
Relates
 

Linden Lab Issue ID: DEV-13083
Linden Lab Internal Branch: mono-based-on-1-19-1-server-82811


 Description  « Hide
Try entering this example script.
Compile it in LSL first. It compiles for me. Check that only the second state_entry, touch_start, and on_rez fire.
Now try compiling it in Mono. It just gives me an error, "Unable to upload" .. "due to the following reason: Assemble to CIL failed. Please try again later."

I ran into this because I added to a script of mine to test something, and it failed to compile in Mono. Oops, I had added a duplicate on_rez event.

Example script:

default
{
    touch_start(integer num_detected)
    {
        llSay(0,"First touch.");
    }
    state_entry()
    {
        llSay(0,"First state_entry.");
    }
    touch_start(integer num_detected)
    {
        llSay(0,"Second touch.");
    }
    state_entry()
    {
        llSay(0, "Second state_entry.");
    }
    on_rez(integer start_params)
    {
        llSay(0,"First on_rez");
    }
    on_rez(integer start_params)
    {
        llSay(0,"Second on_rez");
    }
}



 All   Comments   Change History      Sort Order: Ascending order - Click to sort in descending order
Lex Neva - 31/Jan/08 09:01 AM
To be perfectly honest, I'm much happier with a compilation error than with it silently ignoring the first event handler of each type. If you've got a lot of events in a state, it's easy to lose track of one and accidentally redeclare it... this can be a debugging nightmare. I know we're purely looking for and reporting differences between the old and new systems, though.

Periapse Linden - 31/Jan/08 02:18 PM
Speaking of duplicate states....
This is a dupe of SVC-1359. I'll resolve this one in favor of the earlier reported issue.

Note: This would be a good office hour topic. I'd like to hear input on whether we should "fix" this, fix LSL2, or just leave things the way they are. There are arguments either way...

Ashrilyn Hayashida - 31/Jan/08 07:00 PM
I didn't even know it's possible in LSL2 system to have multiple events, until finding this. I agree, actually. In my opinion a compilation error is better than it accepting duplicate events.

Siann Beck - 21/Mar/08 04:29 PM
OK, both this and SVC-1359 were closed as duplicates, but the issue still exists.

default
{
    state_entry() {
        
    }
    state_entry() {
        
    }
}

"Assemble to CIL failed."

I'm re-opening this one, as it's the more general one -- the problem occurs with any duplicate event handler, not just state_entry.

Scouse Linden - 03/Apr/08 03:45 AM
Compiler fix. That is it will cause a compile error for both LSL and Mono

Siann Beck - 05/Apr/08 03:31 PM
Close, but no cigar:

default
{
    state_entry() {
        
    }
}

state Two {
    state_entry() {
        
    }
}

ERROR: Name previously declared within scope

Scouse Linden - 05/Apr/08 04:12 PM
Oh damn, that's pretty bad. We'll look at this first thing monday.

Babbage Linden - 07/Apr/08 05:40 AM
New LSL compiler deployed to Mono beta hosts.