When I am watching streaming movies on Firefox 4.0.1 running on Ubuntu 11.04 (Ubuntu classic desktop), firefox is stuck/hung, and I am unable to close/kill it through GUI such as closing the window etc.
However, sometimes I could hear the dialogues of the movie, but the firefox is still hanging. Rebooting seems to be the only option in this situations. Therefore, I needed to go to console (through CTRL+ALT F1) and need to reboot the machine.
Please let me know a solution for this problem.
That's possibly an issue with Adobe Flash. I've especially had problems when switching between fullscreen and normal view and OSD (On Screen Display). Even debugging with strace locked up the GUI with the cursor being the only moving thing on the screen.
If you've running a 64-bit version of Ubuntu, consider installing the 64-bit version of Flash. Although it's still in the "testing" stage, I find it more stable than the 32-bit version of Flash on a 64-bit system. See the question Flash player for 11.04 64bit for an how-to on installing Flash 64-bit.
Instead of rebooting the machine, you can kill the GUI too (to be precise: killing all programs in the current virtual console): Alt + SysRq + R. Warning: this kills all applications forcibly without a warning.