Defusing one of the most annoying bugs in Ubuntu Hardy Heron: Stop Flash from killing Firefox

Using Hardy Heron for about 2 months, I'm happy to say that it's a great piece of software. Rock solid and with a lot of useful features.

Unfortunately, there's one really annoying bug:

If you start using Firefox 3 with Flash, odds are good that you'll experience Firefox crashing every few minutes while loading Flash. It seems Pulseaudio (Hardy's new sound system) is triggering a bug in Flashplayer, which causes Firefox to crash. Since Flash is closed-source software, there's no chance Ubuntu is able to fix the problem in time for Hardy Heron's release.

So here's how you work around the bug:

1) Current Ubuntu policy:

Package libflashsupport (which connects Flash to Pulseaudio) will no longer be installed as a dependency on flashplayer-nonfree. Without libflashsupport, Flashplayer directly sends it's audio to ALSA. This works great, as long as your sound card supports hardware mixing of multiple audio streams. If it doesn't, you'll get no sound at all from Flashplayer.

If you installed Hardy due it's beta cycle, you may want to remove libflashsupport and check if Flash stops crashing your Firefox.

sudo apt-get remove libflashsupport

2) Alternative workaround

Since my onboard sound card does not support hardware mixing, I was quite unsatisfied with the currect Ubuntu policy. I do understand that it's Adobe who needs to fix this bug, but the current workaround is hardly a "fix" for the problem.

Fortunately, Conn O'Griofa introduced a second workaround, which works much better for me.

He utilizes nspluginwrapper as a interface layer between libflashsupport and Pulseaudio. What makes it special, is that nspluginwrapper originally serves as a wrapper to include 32bit Flash into 64bit Firefox. It wasn't meant to run at 32bit Ubuntu, but it still works. To give proper credits: It seems this idea was born at the Fedora Project.

To use his work around, follow these steps:

1) Close Firefox
2) Install Conn's nspluginwrapper package

wget http://launchpadlibrarian.net/13470096/nspluginwrapper_0.9.91.5-2ubuntu2... dpkg -i nspluginwrapper_0.9.91.5-2ubuntu2_i386.deb

3) Remove flashplugin-nonfree

sudo apt-get remove --purge flashplugin-nonfree

4) Install flashplugin-nonfree again

sudo apt-get install flashplugin-nonfree

I had one Firefox crash since testing Conn's workaround, immediately after installing his package. Flash still crashs from time to time, immediately after starting a video for example. You'll be presented with a grey box where your video used to be, but you just need to reload the page to fix that problem. Not a single crash of Firefox since hours of testing.

Thanks for the great solution, Conn!

Update: If you're using Ubuntu for AMD64, you don't need the alternative workaround, since you're already running nspluginwrapper. One drawback: Scrolling over Flash with your mouse wheel no longer works. This was one great feature I will miss much. Let's hope Adobe fixes this bug ASAP.

Comments

Is libasoundflash the same as

Is libasoundflash the same as libflashsupport? If so, you need that otherwise Flash will not let go of sound for normal desktop apps to use it, and they won't let go of sound for Flash to use it. I've had no problems with Flash crashing Firefox with that library installed, but then I never had that issue in the past either. It seems everyone but me sees it all the time. I don't get it. On WebAssign.net (a site for a popular Calculus textbook where you can submit your homework), I've had Flash starting up on the math palette (thing to make LaTeX-like equations) make Firefox go grey for a few seconds (Compiz *thinks* Firefox is crashing, but it's wrong) and then come back. That's the extent of it. I'd like to find out why it is that my computer seems to be the only one on which Flash+Firefox+Linux is stable.

No, I just didn't pay enough

No, I just didn't pay enough attention. It's libflashsupport of course. :-)
I changed the post.

"One drawback: Scrolling over

"One drawback: Scrolling over Flash with your mouse wheel no longer works. This was one great feature I will miss much."
That just happens in AMD64 or in x86 too?

That happens in x86 as well,

That happens in x86 as well, if you're using nspluginwrapper. Quite annoying, but I'm counting on Adobe to fix this bug.

One more thing: on my HP

One more thing: on my HP DV2418, after following the procedure to keep Flash from hanging (by install nspluginwrapper), I found that I had no sound if I started Firefox after another program like Rhythmbox that used sound. This is, I guess, because my sound card doesn't support HW mixing. So I installed the libflashsupport, which adds PulseAudio support to the Flash plugin, which is wrapped by nspluginwrapper, which is ... ;) Anyway, initial tests have sound and no crashing.

Much appreciated.

I am running 64 bit Ubuntu

I am running 64 bit Ubuntu 8.04 and I was wondering if there was a way that I could get flash stuff to automatically load instead of having gray play arrows pop up for all flash content. Thanks in advance, and sorry....I'm a linux Noob.

Just disable the flashblock

Just disable the flashblock extension in firefox. I personally like it.

I had frequent running flash

I had frequent running flash under Firefox 2 on Ubuntu Feisty Fawn. The computer would freeze up. However, on 64bit Hardy Heron running Firefox 3 Beta 5, the issue seems to be resolved, possibly because nspluginwrapper is used, as you wrote in your update above. Unfortunately, a new bug arose. Sometimes Firefox won't load Flash, leaving a blank gray area. Does anybody have a solution for this problem? Thanks.

You're Flash plugin crashed

You're Flash plugin crashed if you're seeing a gray area while using nspluginwrapper. Unfortunately, I doubt there's a workaround. You might want to report this behavior to Adobe. I'd appreciate if you test this behavior with Flash 10 Beta, too.

I'm experiencing the same

I'm experiencing the same behaviour... some times(and apparently randomly) firefox seem to fail in loading the flash plugin. the problem is that refresh the page is useless and the only solution is to restart firefox itself. There's no other smarter way to associate the refresh with a new try of loading( I'm thinking to something like killing nspluginwrapper or similar)??
Tnx in advance

The second tip worked! Thank

The second tip worked! Thank you so much. btw I'm using a soundblaster x-fi something via oss.

We host on Ubuntu server and

We host on Ubuntu server and still use 7.10. Most of the reason is because the 8.04 has so many issues that we don't want to use it for development, and therefore want production and development to be the same. All software has some bugs, but I wouldn't call 8.04 Rock solid. At best it appears to be a Beta product waiting for more patches. The good news with this article - 1 down..
Thanks

Swiftweasel does not have the

Swiftweasel does not have the Flash problems that Firefox has. Only a masochist would stay with FF. You can download it here http://sourceforge.net/project/showfiles.php?group_id=195473&package_id=.... The Debian packager will install it automatically. It runs great on my Athlon AMD64 Hardy 8.04 server/desktop box.

I found that I had no sound

I found that I had no sound if I started Firefox after another program like Rhythmbox that used sound. This is, I guess, because my sound card doesn't support HW mixing.

All software has some bugs,

All software has some bugs, but I wouldn't call 8.04 Rock solid. At best it appears to be a Beta product waiting for more patches. The good news with this article - 1 down. There's no other smarter way to associate the refresh with a new try of loading( I'm thinking to something like killing nspluginwrapper or similar). Ones Vision is to always to it the same.

I love firefox because of it

I love firefox because of it plugins. It makes life so easy but it is true that lots of time especially with the new version of firefox, some software that we use on daily basis just become non-compatible or make firefox to crash. This flashplayer issue is not new and I had to uninstall my video downloading plugin as there was some issues with the flashplayer. I think adobe should look into this seriously and make sure that this flashplayer is totally bug free.

Post new comment

The content of this field is kept private and will not be shown publicly.
CAPTCHA
This question is for testing whether you are a human visitor and to prevent automated spam submissions.
Syndicate content