Why all those profile-image display things broke

Here is a fact about LSL, the Linden Scripting Language that drives so many clever and wonderful (and also boring and annoying) things in second Life:

There is no LSL function to allow a script to get or display the profile picture associated with a random Resident’s profile.

But, but, I hear you say, what about all those profile-pic boards in stores and clubs and things that display the profile pics of random vistors (sometimes after asking you for your permission, sometimes not). What about them?

Ah, I reply, those work by some clever hacks, using LSL’s ability to read web pages in order to read some stuff from pages off the web and, in a way that usually happens to work, infer from that the ID of the texture that is the profile pic of a given Resident, which can then be displayed on the face of a prim.

And note the “usually happens to work” in the above. As is clear from a recent JIRA entry, it doesn’t always work, and in fact it has recently stopped working, mostly or somewhat, in various ways.

The Hack

First, I will natter on a bit about the clever trick that’s used to display profile images. I was amazed when I first saw one, because I knew very well there was no direct LSL “get me the profile image for resident XYZ” function (although it’d be nice if there were).

On the other hand, there is an afaik little-known Web copy of Resident profiles and various other things, on the host world.secondlife.com. I don’t know how you get to them via the Web normally, from say the main SL website, but I do know that if you stick the ID of any Resident who hasn’t turned off “show in search” on their profile, after the URL stem “http://world.secondlife.com/resident/”, you’ll find the Web copy of their profile.

For instance, my SL ID is 8a123731-b0cb-47e7-90c0-6ed49aeaff58, and so if you follow this link you will find the Web copy of my profile.

On that Web copy of my profile there is a Web copy of my profile pic (aren’t I attractive?). If you look at the HTML for the page, or otherwise ask your browser nicely, it will reveal that the URL of the image is something like:

http://secondlife.com/app/image/48cc0f84-7f35-3013-c05d-eb05237942f7/1

Now that “48cc” thing there looks like an ID itself, and in fact it is, and if you stick a script into a prim that says:

llSetTexture(“48cc0f84-7f35-3013-c05d-eb05237942f7”,ALL_SIDES);

that fortunate prim will be covered by my profile pic.

And now, since LSL does contain a function for reading web pages (well, to be strictly accurate, for reading the first 2048 characters of web pages), it seems that once a script has a Resident’s key (which is easy to get if the Resident is anywhere nearby), it can fetch the Resident’s Web profile page, read that to find the image URL of their profile pic, extract just the key part, and stick it on one or more faces of a prim for display. (Assuming that the image key is always in a recognizable place, and always in the first 2048 characters of the page.)

And that is in fact exactly how they work!

And that “assuming” there is exactly why they recently stopped working. :)

The Breakage

There were actually two reasons these scripts stopped working: first the Lindens did something wrong in their firewall rules or something, and scripts couldn’t get to world.secondlife.com at all to load the profile pages. That seems to have been mostly fixed now, although it’s still happening here and there.

But more fatally, the Lindens also added lotsa juicy shiny fancy eyecandy HTML to the Web profile pages, and that pushed the image URLs out past the 2048 limit, so that scripts couldn’t get them anymore. Whoever made the change seems to have realized that it might cause problems, or just generally got an attack of neatness, because they also added a brand-new line, near the top of the HTML, explicitly giving the key for the Resident’s profile pic, as in:

<meta name=”imageid” content=”48cc0f84-7f35-3013-c05d-eb05237942f7″ />

This is easier to find and read than the messier HTML down where the image is actually loaded, but still it is different, and while it’s easy to change a profile-pic script to read the new one instead of the old one if you happen to be a scripter with some HTML knowledge and the ability to change the script, there are still dozens upon thousands of already-purchased and already-deployed devices out there whose scripts are now broken.

Is this a Horrible Linden Crime? I don’t think so, really. Anyone who wrote a script that depended on this trick would have known they were using an unsupported interface, and that it might fail at any time. As I wrote on the Jira:

For the people who are complaining that they bought things that have stopped working, you should probably complain to the people you bought them from, rather than to the Lindens. And to the people who are complaining that they sold something that then broke, you knew that could happen when you coded to a completely undocumented and unsupported interface.

It’s nice of the Lab to be working on fixing it, but you know very well that they don’t have to.

If you write a script that only works as long as there’s a “q” in column 17 of line 147 of http://www.secondlife.com/, you have only yourself to blame when someday that q changes…

I do hope and expect that the Lab will fix this, and it’s certainly good customer service for them to do so. On the other hand, people who are getting all angry at the lab and acting as though some actually supported interface was needlessly broken… Well, get a grip. :)

And if that seems a little snooty, I also posted a code snippet showing how to fix at least one popular script, and suggested to the Lindens a way that they could extend that “meta” tag a bit to restore at least many of the existing scripts that look for the full image URL to working order again.

’cause I am awesome that way. :)

So that is the current inneresting little story of the broken profile-pic displayers. And if you happen to have a broken profile-pic script (that you can see and edit the code inside of!), and you are one of the first N people to ask me (where N is the point at which I become overwhelmed and run away), I’d be glad to suggest how you might fix it. Just drop me an IM!

Update: According to a previous JIRA, the Lab did do pretty much exactly my backward-compatibility suggestion (before I’d even made it!), back in December. But apparently someone undid it recently. So, hem hem, I’m sure it’ll be fixed any minute now…

Advertisements

Giant Ghost Robot Captured On Film!

News Flash: the mysterious fleeting rushing-about giant robot mentioned here recently has been captured in a snapshot by a vigilant Resident (me).

Giant Robot Caught On Film!

The exciting detail:

Although I’ve seen it only fleetingly, my impression is that it looks just like the robot that joey is riding in, but it shows up on the minimap as a small clump of prims with no associated AV (a few dark pixels moving, with no green dot), and (most bizarrely of all) it seems to originate from roughly where joey is, rush rapidly outward, and go out of sight in under a second.

Spooky, eh?

Dale goes to Boston

I am apparently going to SLCC! (That’s the annual Second Life Community Convention, where for some reason a bunch of Residents all meet in the “RL” virtual world and do unspecified things.)

I can tell I am going because I have now spent Quite A Bit Of Money for the right and ability to attend. If it weren’t for that it would seem pretty unlikely, since I’ve never gone before, nor felt any strong inclination to. But Boston is relatively easy to get to from here, and my threshold for being tempted into new odd things seems rather low these days…

The convention is held in RL rather than SL, I gather, both for a change of pace and because in RL you can get a really huge number of AVs into the same region, and it’s all high-res and multi-sensory and all (although due to some glitch in my viewer I haven’t been able to get “smell” working for a long time). Still, the disadvantages are also considerable, and I’m not looking forward to two days of interacting only in voice (!), having no TPs or profiles, and being unable to fly or rez stuff. I mean, sheesh…

But anyway! I’m hoping it will be fun. There are various businessy tracks that I currently intend to ignore, and some music and art and social tracks that I will investigate. Or maybe I will just hang out with the geeks and talk about interop for hours. :)

Hughes Rise Haunted By Giant (Spinning) Robot!

The other day there was this giant robot in the Rise, just (ummmmm) west of the Park, with the front of it sort of embedded in some banlines, and I thought “Poor robot, I bet it is stuck in those banlines!’.

But, quite a few days later, it is still there!

GiantRobot_001

And, stranger still, there is a person inside! A person named joey!

GiantRobot_002

(joey is indicated by the red arrow in the picture above, in which we have turned off prim rendering in order to see him.)

Here is joey seen close-up:

GiantRobot_003

Grey, isn’t he? Is he a prisoner? A passenger? Might he be the actual operator of the robot?

We sent him an IM, asking if he was there on purpose. Oddly, we got the “User is offline” message, even though he was right there at the time. Later, we got an offline reply from him, helpfully saying “who are you?”.

Here is a robot-centric view of the Rise, with helpful labels:

GiantRobot_004

(1) is the new roadside extension of the Park, with Welcome sign.

(2) is some of the Park proper, visible over the ugly-built arcane-stuff store. (Just beyond the park and the Dreamliner is visible the ugly-built costume shop.)

(3) is the giant (spinning) robot, with joey inside.

(The robot wasn’t originally spinning, it was just hovering there. Then Violet an’ Michele an’ me went over and sat on it for awhile out of curiosity, and when we stood up it began spinning around. It’s been spinning ever since.)

But that’s not the weird thing! The weird thing is that, when just sitting around in the Rise, every once in awhile I see, out of the corner of my eye, a giant robot zoom past! I don’t know if it’s joey, or a ghost of joey, or perhaps some other giant robots, maybe relatives of joey, looking for him. (Although if they were looking for him you’d think they would have found him by now, him being rather hard to miss.)

And that’s very strange. So far I have not been able to snap any pictures of these zooming phantom giant robots, but I may someday! The Truth Is Out There!

In the meantime joey makes a scenic (if somewhat dizzying, with the spinning) place to watch the sunset…

GiantRobot_005

Alpha Tribe, Green Chaos

A couple of different friends had mentioned Alpha Tribe to me lately, so I just had to go.

They have the most amazing stuff!
Alpha Tribe, Green Chaos
(Yeah, that’s me! Click for larger lightboxed version.)

A fantastic (hehe see what I did there?) reminder of what SL can be, after too many long days of tall tan 90210-style humans…

(Also not cheap. :) Now I gotta buy Lindens again!)

Weblog: alphatribe.wordpress.com/
Main store: slurl.com/secondlife/Klein/55/116/63

“Democracy” you say…

There’s been this meme going around the weblogs lately, on the notion that Second Life should (or shouldn’t, or could, or couldn’t) be, or contain, or support, or be structured as, a democracy.

I think this is a fun idea :) and will play with it here a little. This isn’t intended as a direct response to, or agreement or disagreement with, anything that anyone else has written. Well, except where it is.

Some folks have said that it’s really impossible, because you couldn’t have direct democracy because you couldn’t get all the Residents in one place to vote or whatever, and you couldn’t have representative democracy because who would decide which groups would get represented (furries? Goreans? dragons?), and anyway however you did it people would just cheat by creating additional accounts and additional Residents to get extra votes.

I think alot of that would really be not all that hard to get around. You could have direct democracy by just putting voting into the client or a web-page or whatever; no need to get all the Residents in one place inworld. Whatever question was up for vote could be voted on from wherever you happened to be when you felt like voting, and voting could be left open for a week or whatever.

You could have representative democracy, too, without having to establish an official set of interest groups, by doing it just like in the Atomic World. Representatives don’t represent Bowlers, or Married People, or Camera Buffs; they represent everyone who lives in a certain area. The idea being, presumably, that people who live near each other tend, as a general rule with countless exceptions, to have similar interests. In SL, this could be done by setting up election districts according to where people’s homes are set, say.

Or, acknowledging that people whose homes are set close to each other don’t necessarily have common interests even as a general rule, representatives could be by last name; since everyone with the same last name joined SL at about the same time (roughly, and with exceptions), they will have had about the same amount of SL experience and be at roughly the same stage of the enthusiasm / burnout / maturity cycle, and therefore be about as reasonable a group to be represented together as the people who happen to live in a particular suburb are in RL. (This idea makes me smile, although I’m not sure why; I realize it’s a bit oddball.)

Or, for that matter, we could not divide people up at all, but elect all representatives “At Large”. There are all sorts of clever voting schemes that lend themselves to this; cumulative voting, preferential voting, rank voting, instant-runoff voting… (See the Wikipedia article on voting systems for a variety.) Many of these have odd little quirks that have made people reluctant to actually try them out widely for electing actual governments; might be fun to see what happened if they were tried in a virtual world where people actually do care about the outcome, but no one was actually going to be shot or starved or imprisoned.

Who would actually get to vote? Well, that’s slightly tricky. Obviously you have to keep people from generating tons of anonymous alts just to vote. Sad to say, there might therefore have to be some sort of tie to RL identity; one vote per Premium account would at least make it expensive to generate lots of little fake voters, and one vote per instance of age-verification would solve things to the extent that that actually works (while at the same time disenfranchising people who can’t or don’t want to age-verify because of national or identity issues or not having a credit card or whatever I forget, which would be bad). One vote per 256m2 of land owned could work, but so blatantly giving power in rough proportion to wealth would probably not be popular.

And what would people and/or representatives be voting about? Whatever the Lindens decided to put up for vote! Or decided to allow other people to put up for vote. As many other people have said, SL is a private enterprise, and the owners can do what they like. So if they decide to institute some sort of democracy, they also get to decide which issues are democratically decided. All sorts of possibilities suggest themselves! We could vote on changes to the ToS, on the naming of new continents, on whether to have SL9B on PG or Adult land, on what color to pave Route 12. We could elect members of the G-team!

Probably we shouldn’t be allowed to vote on the banning or not-banning of particular people. :)

Whatever voting system was set up could also be used by sim (and even parcel?) owners, to hold local elections about local issues. Someone who owns a bunch of contiguous sims with a bunch of tenants could use it to hold an election about allowing the brothel to expand, or whether to change the blood in the fountain to water (or wine). The Blake Sea folks could hold an election (picking the eligible voters I’m not sure how) about expanding the tiny rezzing zones to be less tiny. (People who own land in Zindra could vote on whether to use the sim called “Zindra” for something actually useful in terms of helping people who come to it looking for information about Adult mainland in general, or to just plop down a generic Mole build there and forget about it. But that’s a whole nother can of worms…)

Anyway, could be fun! Chaotic! Full of unintended consequences and delightful surprises!

The stickiest thing, I think, would be preventing voter fraud without disenfranchising too many people. In fact at the moment I can’t think of a solution to the problem that would actually work. But maybe we will come up with something…

Explosions of Color!

Happy Fourth of July!

July 4th at Hughes Rise

Perpetual fireworks, trunks, sparkler, glowing white hair, Uncle Sam Hat, let’s see. Hat-rocket test in 3, 2, 1…

July 4th at Hughes Rise : Rocket hat!

Hat-rocket functional!

A little rest…

July 4th at Hughes Rise : Relaxing

… and off to fireworks at the beach!

SL Fireworks show

Foom! Whoosh!

SL Fireworks show

Ooooooh, ahhhhhhh!

SL Fireworks show

Quite satisfying all around. :)