• 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 have read, understood, and agreed to those terms.
Issue Details (XML | Word | Printable)

Key: SVC-1421
Type: Bug Bug
Status: Closed Closed
Resolution: Fixed
Priority: Normal Normal
Assignee: Babbage Linden
Reporter: Siann Beck
Votes: 1
Watchers: 1
Operations

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

Mono: Code after unconditional function return causes compile error or run-time error

Created: 02/Feb/08 08:06 AM   Updated: 08/Sep/08 12:33 AM
Component/s: Scripts
Affects Version/s: Mono Beta
Fix Version/s: None

Issue Links:
Relates

Linden Lab Issue ID: DEV-12986


 Description  « Hide
Certain ll* function calls, placed after an unconditional return in a function result in a "UThread injection failed" message. Not all functions do. Other code after a return causes a run-time error. Possibly related to SVC-1328. Examples (assume the same default state and state_entry event for each example):

// Compile error
test() {
integer x;
return;
llSetColor(ZERO_VECTOR, ALL_SIDES);
}

default {
state_entry() { test(); }
}

// Run-time error
test() {
integer x;
return;
x+=1;
}

// Compiles and runs with no problem
test() {
integer x;
return;
x = llListFindList(["a"], ["a"]);
}

// Compiles and runs with no problem
test() {
integer x;
if (TRUE) return;
x+=1;
}

The run-time error is

[7:55] Donation Box: System.InvalidProgramException: Invalid IL code in LSL_0a331708_ce87_231f_2701_e40594700fa9:test (): IL_000d: nop

at LSL_0a331708_ce87_231f_2701_e40594700fa9.defaultstate_entry () [0x00000]
at LSL_0a331708_ce87_231f_2701_e40594700fa9defaultstate_entryFrame.ResumeVoid () [0x00000]
at LindenLab.SecondLife.UThread.UThread.Run () [0x00000]
at LindenLab.SecondLife.Script.Run (ScriptEvent evt) [0x00000]



 All   Comments   Change History      Sort Order: Ascending order - Click to sort in descending order
Vektor Linden added a comment - 01/Apr/08 04:24 PM
Confirmed present as of Mono beta refresh 6