• 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-2036
Type: Bug Bug
Status: Closed Closed
Resolution: Fixed
Priority: Major Major
Assignee: kelly linden
Reporter: Pale Spectre
Votes: 7
Watchers: 2
Operations

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

llSetPrimitiveParams miss-applies textures when the number of faces increases.

Created: 03/Apr/08 02:45 PM   Updated: 29/Apr/08 07:47 AM
Return to search
Component/s: Scripts
Affects Version/s: 1.20.0 Server
Fix Version/s: None

Environment: Not Applicable
Issue Links:
Duplicate
 
Relates
 

Linden Lab Issue ID: DEV-13259


 Description  « Hide
Stick this script in a plain cube.

A single click will toggle the prim between the two llSetPrimitiveParams settings given in solid() and hole(). A double click will reapply the current llSetPrimitiveParams setting.

A single click will screw up the texture on the one face (the landscape). A double click will restore that texture.

It appears that as the number of faces increases the final face is being given the wrong texture. I believe this is a result of the H4 roll-out..

integer toggle;
integer click;

solid()
{
llSetPrimitiveParams([
9, 0, 0, <0.000000, 1.000000, 0.000000>, 0.000000, <0.000000, 0.000000, 0.000000>, <1.000000, 1.000000, 0.000000>, <0.000000, 0.000000, 0.000000>,
19, 0, 0, 0,
18, 0, <1.000000, 1.000000, 1.000000>, 1.000000,
20, 0, 0,
17, 0, "1911f90a-241d-6ba6-186c-58ec62b7bd3e", <3.000000, 2.000000, 0.000000>, <1.000000, 0.000000, 0.000000>, -1.570844,
19, 5, 0, 0,
18, 5, <1.000000, 1.000000, 1.000000>, 1.000000,
20, 5, 1,
17, 5, "3a7cdf10-37de-0c77-7239-c09007d31d29", <1.000000, 1.000000, 0.000000>, <0.000000, 0.000000, 0.000000>, -1.570844
]);
}

hole()
{
llSetPrimitiveParams([
9, 0, 16, <0.000000, 1.000000, 0.000000>, 0.949000, <0.000000, 0.000000, 0.000000>, <1.000000, 1.000000, 0.000000>, <0.000000, 0.000000, 0.000000>,
19, 0, 0, 0,
18, 0, <1.000000, 1.000000, 1.000000>, 1.000000,
20, 0, 0,
17, 0, "1911f90a-241d-6ba6-186c-58ec62b7bd3e", <3.000000, 2.000000, 0.000000>, <1.000000, 0.000000, 0.000000>, -1.570844,
19, 5, 0, 0,
18, 5, <1.000000, 1.000000, 1.000000>, 1.000000,
20, 5, 1,
17, 5, "1911f90a-241d-6ba6-186c-58ec62b7bd3e", <0.050000, 15.000000, 0.000000>, <0.000000, 0.000000, 0.000000>, -1.570844,
19, 6, 0, 0,
18, 6, <1.000000, 1.000000, 1.000000>, 1.000000,
20, 6, 1,
17, 6, "3a7cdf10-37de-0c77-7239-c09007d31d29", <1.000000, 1.000000, 0.000000>, <0.000000, 0.000000, 0.000000>, -1.570844
]);
}

default
{
state_entry()

{ llSetScale(<10.0, 10.0, 0.2>); llSetLocalRot(<-0.50000, -0.50000, -0.50000, 0.50000>); solid(); }

touch_start(integer total_number)
{
if (click)

{ llSetTimerEvent(0.0); click = FALSE; if (toggle) hole(); else solid(); }

else

{ llSetTimerEvent(0.5); click = TRUE; }

}

timer()

{ llSetTimerEvent(0.0); click = FALSE; if (toggle = !toggle) hole(); else solid(); }

}



 All   Comments   Change History      Sort Order: Ascending order - Click to sort in descending order
Harleen Gretzky added a comment - 03/Apr/08 09:03 PM
Probably has something to do with SVC-38, changing the script this way makes it work:

integer toggle;
integer click;

solid()
{
llSetPrimitiveParams([
9, 0, 0, <0.000000, 1.000000, 0.000000>, 0.000000, <0.000000, 0.000000, 0.000000>, <1.000000, 1.000000, 0.000000>, <0.000000, 0.000000, 0.000000>,
19, 0, 0, 0,
18, 0, <1.000000, 1.000000, 1.000000>, 1.000000,
20, 0, 0,
17, 0, "1911f90a-241d-6ba6-186c-58ec62b7bd3e", <3.000000, 2.000000, 0.000000>, <1.000000, 0.000000, 0.000000>, -1.570844,
19, 5, 0, 0,
18, 5, <1.000000, 1.000000, 1.000000>, 1.000000,
20, 5, 1
]);
llSetPrimitiveParams([
17, 5, "3a7cdf10-37de-0c77-7239-c09007d31d29", <1.000000, 1.000000, 0.000000>, <0.000000, 0.000000, 0.000000>, -1.570844
]);
}

hole()
{
llSetPrimitiveParams([
9, 0, 16, <0.000000, 1.000000, 0.000000>, 0.949000, <0.000000, 0.000000, 0.000000>, <1.000000, 1.000000, 0.000000>, <0.000000, 0.000000, 0.000000>
]);
llSetPrimitiveParams([
19, 0, 0, 0,
18, 0, <1.000000, 1.000000, 1.000000>, 1.000000,
20, 0, 0,
17, 0, "1911f90a-241d-6ba6-186c-58ec62b7bd3e", <3.000000, 2.000000, 0.000000>, <1.000000, 0.000000, 0.000000>, -1.570844,
19, 5, 0, 0,
18, 5, <1.000000, 1.000000, 1.000000>, 1.000000,
20, 5, 1,
17, 5, "1911f90a-241d-6ba6-186c-58ec62b7bd3e", <0.050000, 15.000000, 0.000000>, <0.000000, 0.000000, 0.000000>, -1.570844,
19, 6, 0, 0,
18, 6, <1.000000, 1.000000, 1.000000>, 1.000000,
20, 6, 1,
17, 6, "3a7cdf10-37de-0c77-7239-c09007d31d29", <1.000000, 1.000000, 0.000000>, <0.000000, 0.000000, 0.000000>, -1.570844
]);
}

default
{
state_entry()

{ llSetScale(<10.0, 10.0, 0.2>); llSetLocalRot(<-0.50000, -0.50000, -0.50000, 0.50000>); solid(); }

touch_start(integer total_number)
{
if (click)

{ llSetTimerEvent(0.0); click = FALSE; if (toggle) hole(); else solid(); }

else

{ llSetTimerEvent(0.5); click = TRUE; }

}

timer()

{ llSetTimerEvent(0.0); click = FALSE; if (toggle = !toggle) hole(); else solid(); }

}


Pale Spectre added a comment - 04/Apr/08 01:05 AM
I agree it looks like the issues also being illustrated in SVC-38 - well spotted.

I can imagine there would be a workaround but unfortunately that often doesn't help with existing content (which is how I discovered it). llSetPrimitiveParams is already a bit of a monster to work with and I think it is very desirable for it to work properly and not include the added overhead of having to apply unintuitive logic to get it to work.

I just hope someone may find my repro useful in understanding the problem.


Darien Caldwell added a comment - 05/Apr/08 12:36 PM
I don't know, if this was related to SVC-38, wouldn't the symptoms have shown in the 1.19 Havok 1 server versions? This is a new problem which has only now surfaced under Havok4 server versions. If you try it on the beta grid in a Havok 1 v1.19 server, the issue is gone.

Harleen Gretzky added a comment - 05/Apr/08 12:42 PM
It may have shown up and been fixed and then the fix did not make it to 1.20.0, see SVC-1146.

Pale Spectre added a comment - 05/Apr/08 01:44 PM
So, as the bug clearly exists for 1.20.0 Server (1.19.1.4 Client) - and an internal fix may, or may not, exist - what is the Jira protocol for getting the bug back in the loop?

Harleen Gretzky added a comment - 05/Apr/08 03:30 PM
Since it hasn't been triaged yet, it will automatically show up on the Bug Triage Agenda on Monday.

BamBam Sachertorte added a comment - 06/Apr/08 09:32 AM
I filed a bug that turns out to be a duplicate of this bug. Here is my repro script. It demonstrates that this bug happens any time the face count changes, not just when it increases.

integer gState = 0;

default
{
state_entry()
{
}

touch_start(integer total_number)
{
if (gState & 2) { // open a path cut and set the cut faces to black, all others to white llSetPrimitiveParams( [PRIM_TYPE, PRIM_TYPE_SPHERE, PRIM_HOLE_DEFAULT, <0.1,0.9,0>, 0.9, <0,0,0>, <0.2,0.8,0>, PRIM_COLOR, 0, <0,0,0>, 1, PRIM_COLOR, 1, <1,1,1>, 1, PRIM_COLOR, 2, <1,1,1>, 1, PRIM_COLOR, 3, <0,0,0>, 1, PRIM_COLOR, 4, <1,1,1>, 1, PRIM_COLOR, 5, <1,1,1>, 1] ); } else { // close path cut, set hollow to black, all others to white llSetPrimitiveParams( [PRIM_TYPE, PRIM_TYPE_SPHERE, PRIM_HOLE_DEFAULT, <0,1,0>, 0.9, <0,0,0>, <0.2,0.8,0>, PRIM_COLOR, 0, <1,1,1>, 1, PRIM_COLOR, 1, <0,0,0>, 1, PRIM_COLOR, 2, <1,1,1>, 1, PRIM_COLOR, 3, <1,1,1>, 1] ); }

gState = (gState + 1) & 3;
}
}

Expected behavior:
1st touch: opens a path cut, paints the new cut faces black, paints all other faces white
2nd touch: no change
3rd touch: closes the path cut, paints the hollow face black, paints all other faces white
4th touch: no change

Actual behavior:
1st touch: opens a path cut, paints dimple end face and outside face black, paints all other faces white
2nd touch: paints the new cut faces black, paints all other faces white
3rd touch: closes the path cut, paints the outside face black, paints all other faces white
4th touch: paints the hollow face black, paints all other faces white


Eata Kitty added a comment - 07/Apr/08 02:35 AM
I have found BamBam to be correct as this same situation happens when changing from a box to a cylinder, no hollow involved.

kelly linden added a comment - 08/Apr/08 10:55 AM
I fixed this internally, thanks for all the great Repros.

Unfortunately due to timing this will not go out in the next server update (1.21) but should be in the one after.


Pale Spectre added a comment - 08/Apr/08 12:07 PM
Thank you for looking into this so quickly.

...would that all repro's could be scripted.


BamBam Sachertorte added a comment - 28/Apr/08 02:16 PM
Hi Kelly. This bug appears to be fixed. Is it true? Can we close the issue?

kelly linden added a comment - 28/Apr/08 02:20 PM
Yes, I believe it is.