Open sl-service-account opened 6 years ago
Chaser Zaks commented at 2018-08-28T18:39:42Z, updated at 2018-08-28T18:41:18Z
I put a thingy west bound of http://maps.secondlife.com/secondlife/Testylvania%20Sandbox/108/161/21 which appears to reproduce this from the description. Object and scripts are full perm and shared with the Testylvanian group if need be to poke at the thing.
From a web development standpoint, updating(not replacing) the URL in CEF would make sense as it follows anchor links and triggers the "hashchange" window event in javascript. Example implementation on how this would be fixed(in pseudo code):
//Example URL: https://secondlife.com/example/document.htm?key=value#anything
//Splitting it into a "path" would cause:
//origin: <protocol>://<host>[:port] (https://secondlife.com)
//pathname: [slash separated string] (/example/document.htm)
//querystring: [?[key=value[&...]]
//hashstring: [#[anything]]
path currentUrl;
media change message(path url)
if(url.origin == currentUrl.origin && url.pathname == currentUrl.pathname && url.querystring == currentUrl.querystring)
if(url.hashstring != currentUrl.hashstring)
update url(Cause the "hashchange" window event, don't cause a navigation event(refresh/reload/etc))
//else do nothing
else
replace url(Cause navigation event)
currentUrl = url;
Whirly Fizzle commented at 2018-08-28T21:06:29Z
Confirmed Chaser's test page at https://felix.softhyena.com/BUG-225356.htm reproduces the bug on post-Alex Ivy viewers but not on pre-Alex Ivy viewers.
Clicking on the bottom ?test link followed by the top #test link.
Oz Linden commented at 2018-09-05T16:03:55Z, updated at 2018-09-05T22:20:58Z
Can you make a simple LSL script that illustrates the problem without picking up all of a HUD?
and it would appear from Chasers demo that appending/modifying a query parameter does still generate the Changed event. Is there a reason why you can't use that? There's nothing wrong with the server ignoring parameters it doesn't care about.
Whirly Fizzle commented at 2018-09-07T14:33:32Z
Rez a box & make it a suitable size for a media screen.
Add the following script to the box
list sites = [
"https://felix.softhyena.com/BUG-225356.htm?test=0.8990316884092033"
];
string currentUrl;
setupMedia(string url){
llSetPrimMediaParams(2, [
PRIM_MEDIA_ALT_IMAGE_ENABLE, FALSE,
PRIM_MEDIA_CONTROLS, PRIM_MEDIA_CONTROLS_STANDARD,
PRIM_MEDIA_CURRENT_URL, url,
PRIM_MEDIA_HOME_URL, url,
PRIM_MEDIA_AUTO_LOOP, TRUE,
PRIM_MEDIA_AUTO_PLAY, TRUE,
PRIM_MEDIA_AUTO_SCALE, TRUE,
PRIM_MEDIA_AUTO_ZOOM, FALSE,
PRIM_MEDIA_FIRST_CLICK_INTERACT, TRUE,
PRIM_MEDIA_WIDTH_PIXELS, 1024,
PRIM_MEDIA_HEIGHT_PIXELS, 1024,
PRIM_MEDIA_WHITELIST_ENABLE, FALSE,
PRIM_MEDIA_WHITELIST, "",
PRIM_MEDIA_PERMS_INTERACT, PRIM_MEDIA_PERM_ANYONE,
PRIM_MEDIA_PERMS_CONTROL, PRIM_MEDIA_PERM_ANYONE
]);
}
setMediaUrl(string url){
llSay(0, "Media set to "+url);
llSetPrimMediaParams(2, [
PRIM_MEDIA_CURRENT_URL, url
]);
}
list getChanges(integer change){
list evt;
if((CHANGED_INVENTORY&change) == CHANGED_INVENTORY)evt = evt + "CHANGED_INVENTORY";
if((CHANGED_COLOR&change) == CHANGED_COLOR)evt = evt + "CHANGED_COLOR";
if((CHANGED_SHAPE&change) == CHANGED_SHAPE)evt = evt + "CHANGED_SHAPE";
if((CHANGED_SCALE&change) == CHANGED_SCALE)evt = evt + "CHANGED_SCALE";
if((CHANGED_TEXTURE&change) == CHANGED_TEXTURE)evt = evt + "CHANGED_TEXTURE";
if((CHANGED_LINK&change) == CHANGED_LINK)evt = evt + "CHANGED_LINK";
if((CHANGED_ALLOWED_DROP&change) == CHANGED_ALLOWED_DROP)evt = evt + "CHANGED_ALLOWED_DROP";
if((CHANGED_OWNER&change) == CHANGED_OWNER)evt = evt + "CHANGED_OWNER";
if((CHANGED_REGION&change) == CHANGED_REGION)evt = evt + "CHANGED_REGION";
if((CHANGED_TELEPORT&change) == CHANGED_TELEPORT)evt = evt + "CHANGED_TELEPORT";
if((CHANGED_REGION_START&change) == CHANGED_REGION_START)evt = evt + "CHANGED_REGION_START";
if((CHANGED_MEDIA&change) == CHANGED_MEDIA)evt = evt + "CHANGED_MEDIA";
return evt;
}
default{
state_entry(){
llSetLinkPrimitiveParamsFast(1, [
PRIM_TEXT, "BUG-225356 Repro", <1,1,1>, 1,
PRIM_LINK_TARGET, 2,
PRIM_TEXT, "Click to reset URL", <1,1,1>, 1,
PRIM_LINK_TARGET, 3,
PRIM_TEXT, "Click to append \"#test=<random>\" via LSL", <1,1,1>, 1
]);
currentUrl = llList2String(sites, llFloor(llFrand(llGetListLength(sites))));
setupMedia(currentUrl);
}
touch_start(integer total_number){
integer i = llDetectedLinkNumber(0);
if(i == 2){
currentUrl = llList2String(sites, llFloor(llFrand(llGetListLength(sites))));
setMediaUrl(currentUrl);
}else if(i == 3){
setMediaUrl(currentUrl+"#test="+(string)llFrand(1));
}
}
changed(integer c){
llSay(0, "I received change event "+(string)c+" ("+llDumpList2String(getChanges(c), "|")+")");
}
}
On the media face, click the bottom ?test link & observe in local chat that a CHANGED_MEDIA event is fired.
Click the top #test link & observe that no CHANGED_MEDIA event is fired.
On Pre-Alex Ivy viewers, both the ?test and the #test links produce a CHANGED_MEDIA event.
Please refer to this discussion on the forums: https://community.secondlife.com/forums/topic/426794-scripts-not-communicating-for-a-specific-user/
Short summary of the problem from the HUD creator
The system begins with a single prim with media (website) on a single face. When buttons on the webpage are pressed, the event is reflected in the webpage's URL through the addition of a '#' followed by some text - just like the use of internal links. A script in the hosting prim uses the 'changed' event to detect 'changed media'. When this event detects the addition of a '#', the text following it is parsed to interpret the command the script is to execute.
With the recent update, the changed media event is not firing when the URL is amended by a '#'.
I'm afraid my scripting isn't good enough to recreate a simple repro object, so the steps below show how to recreate the bug with the HUD created by @Vindictii.
Steps To Reproduce
Purchase the following HUD: https://marketplace.secondlife.com/p/Bridge-CH-Multi-service-HUD/14666990
Make sure media is enabled in the viewer & attach the HUD "Bridge CH v1.0b"
Click on one of the buttons on the HUD phone face, for example the Marketplace button. See Fig 1 attached.
You will see a large SL icon appear on the screen - see Fig 2 attached.
Left click on the large SL icon.
Observed Behaviour
When left clicking on the large SL icon, nothing happens.
The same problem reproduces no matter which "app" you choose to run from the phone HUD.
Expected Behaviour
This bug only reproduces on viewers with the Alex Ivy code merged in.
To see the expected behaviour, you can test on http://wiki.secondlife.com/wiki/Release_Notes/Second_Life_Release/5.0.7.328060
Click on one of the app icons, for example the Marketplace.
The large SL icon appears on screen.
Left click on the large icon.
A media window pops out from the phone and loads the Second Life Marketplace URL.
See Fig 3 gif showing expected behaviour.
Other Information
Bug does not reproduce on http://wiki.secondlife.com/wiki/Release_Notes/Second_Life_Release/5.0.7.328060 This viewer was default LL release before Alex Ivy RC viewer appeared.
Bug does reproduce on http://wiki.secondlife.com/wiki/Release_Notes/Second_Life_Release/5.1.0.508209 This was one of the early LL Alex Ivy RC viewer builds.
Attachments
Original Jira Fields
| Field | Value | | ------------- | ------------- | | Issue | BUG-225356 | | Summary | Changed media event is not firing when the URL is amended by a '#' on post-Alex Ivy viewers. | | Type | Bug | | Priority | Unset | | Status | Accepted | | Resolution | Accepted | | Reporter | Whirly Fizzle (whirly.fizzle) | | Created at | 2018-08-28T17:08:35Z | | Updated at | 2018-09-07T14:33:32Z | ``` { 'Build Id': 'unset', 'Business Unit': ['Platform'], 'Date of First Response': '2018-08-28T13:39:42.070-0500', "Is there anything you'd like to add?": 'Bloody bloody media bugs', 'ReOpened Count': 0.0, 'Severity': 'Unset', 'System': 'SL Viewer', 'Target Viewer Version': 'viewer-development', 'What just happened?': 'Media....', 'What were you doing when it happened?': 'Bloody media...', 'What were you expecting to happen instead?': 'Seriously, bloody media....', 'Where': 'Any region', } ```