Silverlight 2 (beta 2) and Firefox 3... so happy together... - Jon Galloway

Silverlight 2 (beta 2) and Firefox 3... so happy together...

Silverlight loves the Fox like Joanie loves Chachi!If you've been holding off on using Silverlight 2 or Firefox 3 because they weren't playing well together, it's safe to come out now. One of the best "undocumented" features in Silverlight 2 Beta 2 is that it now works with Firefox 3.

I've been following this issue on Bugzilla (Bug 421217) for a few months. It reads innocently enough: "NPRuntime object reference counting is violated by NPObjWrapperPluginDestroyedCallback causing Silverlight 2.0 beta: crashes when closing tab/window [@ JS_SetPrivate - NPObjWrapperPluginDestroyedCallback]". Here's what that means in plain English:

You could view Silverlight 2 (Beta 1) objects in Firefox 3, but when you closed the tab, it would crash the entire browser process.

There's a lot of back and forth on the Bugzilla thread. It appears that something changed in the way that Firefox disposes objects on the move from Firefox 2 to 3, as Wilco Bauwer's comment indicates:

...the problem is that we're calling ReleaseObject from a call to DeallocateObject (which is called by FF). Apparently FF3's ReleaseObject implementation crashes when an object is passed in that FF3 believes to be dead. The reason why we do this is related to how reference counting works in FF2. In our experience, FF2 calls DeallocateObject on our NPObjects when *it* no longer references that NPObject. It ignores the reference count.

The Firefox team clearly didn't want to be bothered with this issue, despite the fact that it was near the top of the list of topcrash bugs for Firefox 3. After a bit of back and forth, it was apparent that the Silverlight team would be the ones making modifications so that they'd handle both Firefox 2 and 3's different behaviors. So we've been waiting on a Silverlight 2 update for it to run Firefox 3. That didn't prevent the (futile) flurry of questions on every Firefox 3 release: "Does this one work with Silverlight 2?"

So we're good now. Silverlight 2 Beta 2 works on Firefox 3.

But, about that crashy thing...

Note that Wilco raised some questions for the Firefox team which don't really sound like they've been solved:

For us it's important that the reference counting rules are followed strictly for our NPObjects, because we allow you to pass them from one plugin to another. Unless we'd rip out our entire HTML/JS bridge, this would be an easy way for developers to write apps that crash a browser or cause other type of unexpected behavior.

And it's not a Silverlight specific issue. As I read the Bugzilla thread Firefox 3 has kind of broken reference counting in a way that makes it easy for any plugin to (accidentally or maliciously) crash the browser by calling ReleaseObject on a null or destroyed object. That seems like a problem, because Firefox 2, Safari (and all other WebKit based browsers), Opera, and IE apparently implement the Netscape Plugin API in a way that respects reference counting, and now Firefox 3 no longer follows that. Presumably Silverlight's doing some internal reference counting or checking to work around this issue, and anyone else that wants to write a plugin that allows for communication between instances in a page (or communication with other plugins on a page) will need to do the same. I guess it's not my problem, and clearly the Firefox team has decided it's not theirs, either.

Published Sunday, June 08, 2008 3:18 PM by Jon Galloway

Comments

# re: Silverlight 2 (beta 2) and Firefox 3... so happy together...

wow, that bugzilla report reads like a soap opera "no you fix, no you fix it...we're not going to fix it regardless of how many people say it is our fault" -- close the bug because someone made a workaround instead of fixing the core issue...yikes...good times.

Sunday, June 08, 2008 6:58 PM by timheuer

# re: Silverlight 2 (beta 2) and Firefox 3... so happy together...

Jon,

I just upgraded to Silverlight 2b2 earlier today and finally got it working in FF3. Very cool that they got this worked out. It doesn't seem to be documented, but Silverlight 2b2 also works with Safari on Windows.

Chris

Sunday, June 08, 2008 7:01 PM by Chris Sutton

# Silverlight 2 (beta 2) and Firefox 3... so happy together...

You've been kicked (a good thing) - Trackback from DotNetKicks.com

Sunday, June 08, 2008 7:09 PM by DotNetKicks.com

# re: Silverlight 2 (beta 2) and Firefox 3... so happy together...

Don't worry its only FF3 rc2, they still have time to break it yet again.  Now the real question is if it wasn't Microsoft 's product would they care a little more?

Sunday, June 08, 2008 7:58 PM by Aaron Fischer

# re: Silverlight 2 (beta 2) and Firefox 3... so happy together...

@Aaron Fischer

Or the question should be, how vilified would MS be if it was IE and a FF branded plugin.

Monday, June 09, 2008 10:09 PM by Mike

# re: Silverlight 2 (beta 2) and Firefox 3... so happy together...

Open Source Silverlight Chart Visifire is now compatible with Silverlight 2 Beta 2

Tuesday, June 10, 2008 7:10 AM by Davis

# re: Silverlight 2 (beta 2) and Firefox 3... so happy together...

I have Silverlight 2.0.30523.6 + Firefox 3 (Mozilla/5.0 (Windows; U; Windows NT 6.0; en-US; rv:1.9) Gecko/2008052906 Firefox/3.0) installed and Firefox is still crashing for me - all the time! MSN.com, for example. I'm sure it's related to this issue, but this issue is supposedly resolved? No, it's not!

Tuesday, June 10, 2008 4:10 PM by Sarah

# re: Silverlight 2 (beta 2) and Firefox 3... so happy together...

The real funny thing is that when a hacker uses this to crash Firefox with a Silverlight application, who do you think will get blamed? FF or MSFT? :)

Thursday, June 12, 2008 4:44 AM by Laurent

# re: Silverlight 2 (beta 2) and Firefox 3... so happy together...

Well, I certainly won't be helping them with their record breaking attempt.

It would appear that they have now entered the arrogance stage that MS have just come out of the other side of....

C

Tuesday, June 17, 2008 12:00 PM by Carl

# Firefox 3 and Silverlight

Firefox 3 and Silverlight

Tuesday, June 17, 2008 12:19 PM by Method ~ of ~ failed

# re: Silverlight 2 (beta 2) and Firefox 3... so happy together...

It seems like a few people on the FF3 team are taking it seriously...but there are some obvious trolls in there who seem to just want to pass it over for no good reason, except possibly that it's involving MSFT.

Tuesday, June 17, 2008 2:14 PM by Scopique

# re: Silverlight 2 (beta 2) and Firefox 3... so happy together...

Just downloaded FireFox 3 and the latest version of Silverlight 2.0.30523.6 and it certainly doesn't work on http://www.itv.com/

Tuesday, June 17, 2008 9:03 PM by PdeJ

# re: Silverlight 2 (beta 2) and Firefox 3... so happy together...

Now the silverlight 2 (background) sound doesn't work - very nice.

Tuesday, June 17, 2008 10:56 PM by Frank

# FireFox 3 Releases! Finally.. plays nice with Silverlight 2 b2..

By Don Burnett It can't be said that the Mozilla folks don't know what drama is with bugs.. Over at Jon Galloway's blog , he has a great article chronicling the drama getting Silverlight fixed and working with FireFox version 3. If the blog entry can

Tuesday, June 17, 2008 11:18 PM by TrackBack

# re: Silverlight 2 (beta 2) and Firefox 3... so happy together...

There is no such thing as FF and FireFox. The proper name and abbreviation is Firefox and Fx.

I have no idea why most of the people always write FF...

Wednesday, June 18, 2008 6:02 PM by Luke

# Firefox 3 and Silverlight

Firefox 3 and Silverlight

Friday, June 20, 2008 2:04 PM by RTur.net

# re: Silverlight 2 (beta 2) and Firefox 3... so happy together...

Crashes for me every single time.  Silverlight 2 Beta 2 and Firefox 3 official release.  How freaking annoying.

Friday, June 20, 2008 4:53 PM by skain

# re: Silverlight 2 (beta 2) and Firefox 3... so happy together...

Hmmm, justice  :)

MS just got a taste of it's own medicine, the kings of creating 'features' in IE that cause my web apps to break because they don't follow standards, they make their own.

But, glad to see it's working, Silverlight is pretty cool

Monday, June 23, 2008 9:21 AM by Steve

# re: Silverlight 2 (beta 2) and Firefox 3... so happy together...

Bah, I just installed Silverlight 2 beta 2 and some sites (silverlight.net/.../communitygallery.aspx) crashed firefox 3 and others gave me the 'get silverlight' icon.  So i uninstalled silverlight so as not to risk a site crashing my ff when I don't expect it.

Tuesday, June 24, 2008 11:21 AM by inhahe

# re: Silverlight 2 (beta 2) and Firefox 3... so happy together...

@inhahe, @skain Can you let me know which site is still causing crashes for you? I'm not seeing any Silverlight related crashes in FF3.

@inhahae Those "Get Silverlight" icons are from sites which haven't updated their code from Silverlight 1.0 to Silverlight 2 yet. That only requires replacing Silverlight.js with an updated version; it's a very simple fix.

Tuesday, June 24, 2008 3:15 PM by Jon Galloway

# re: Silverlight 2 (beta 2) and Firefox 3... so happy together...

FF3 (final) installed with Silverlight2-B2 and I am getting either the "install silverlight" icon or the blank panel of death...

Mirosoft's Ch9 site and even the Microsoft Silverlight site doesn't work for me. I have created my own test application with the Silverlight Streaming Service, using the Silverlight.js from the B2 SDK... and it's a no-go with FF3 (install Icon) fine with IE7/8 and Safari, and it crashes Opera-9.

There is more to this than a simple yes/no state, and there must be other conditions under which FF3 + Silverlight2-B2 doesn't work.

Saturday, June 28, 2008 10:30 PM by John

# ie 7 closing tab crashes

Pingback from  ie 7 closing tab crashes

Sunday, June 29, 2008 8:55 PM by ie 7 closing tab crashes

# re: Silverlight 2 (beta 2) and Firefox 3... so happy together...

Jon Galloway-

FWIW, FF3 crashed on me today everytime I try to open video from NBCOlympics.com

IE obviously works fine with this site.

Monday, June 30, 2008 1:23 PM by Brandon

# re: Silverlight 2 (beta 2) and Firefox 3... so happy together...

Short of pulling my hair out. Silverlight is refusing to work on ITV.com

Anyone know what the problem is?

Saturday, July 05, 2008 7:06 AM by Chris

# re: Silverlight 2 (beta 2) and Firefox 3... so happy together...

Silverlight 2 Beta 2 for Firefox 3. will NOT work on itv.com in any way shape or form.

I get no crashes but keep being told to install.

Friday, July 11, 2008 4:46 PM by Peter Com

# re: Silverlight 2 (beta 2) and Firefox 3... so happy together...

Silverlight.... runs in circles..

Install it try to use it says exit browser and restart nbcolympics.som

Sliverlight 10 for 10 nogo...

rename product Silverloop and you would be fine.

Thursday, August 14, 2008 4:02 PM by Jeff Hoffman

# re: Silverlight 2 (beta 2) and Firefox 3... so happy together...

read the faq at website "wicrosoft will support firefox". I just hate those "will" (remember the framework on linux).

Sunday, October 12, 2008 9:07 AM by soap

# re: Silverlight 2 (beta 2) and Firefox 3... so happy together...

You must be a microsoft guy. Silverlight 2 still crashes Firefox 3

Thursday, October 23, 2008 4:54 PM by Daniel

# Firefox 3 and Silverlight

Firefox 3 and Silverlight

Saturday, December 13, 2008 1:13 AM by RTur.net

# Weight Loss » Blog Archive » re: Silverlight 2 (beta 2) and Firefox 3… so happy together…

Pingback from  Weight Loss  » Blog Archive   » re: Silverlight 2 (beta 2) and Firefox 3… so happy together…

# re: Silverlight 2 (beta 2) and Firefox 3... so happy together...

Hey are using Wordpress for your site platform? I'm new to the blog world but I'm trying to get started

and create my own. Do you need any coding expertise to make

your own blog? Any help would be really appreciated!

Sunday, January 06, 2013 11:26 PM by Aleman

Leave a Comment

(required) 
(required) 
(optional)
(required)