Last Comment Bug 691355 - Crash when headphones removed while listening to audio
: Crash when headphones removed while listening to audio
Status: RESOLVED FIXED
: crash, regression
Product: Core
Classification: Components
Component: Widget: Win32 (show other bugs)
: 7 Branch
: x86 Windows 7
: -- critical (vote)
: mozilla13
Assigned To: Brian R. Bondy [:bbondy]
:
: Jim Mathies [:jimm]
Mentors:
https://crash-stats.mozilla.com/repor...
Depends on: 731812
Blocks: 441197
  Show dependency treegraph
 
Reported: 2011-10-03 08:42 PDT by Nilay Chheda
Modified: 2012-03-01 20:43 PST (History)
6 users (show)
See Also:
Crash Signature:
QA Whiteboard:
Iteration: ---
Points: ---
Has Regression Range: ---
Has STR: ---


Attachments
Patch v1. (2.25 KB, patch)
2012-02-16 19:02 PST, Brian R. Bondy [:bbondy]
jmathies: review+
Details | Diff | Splinter Review

Description Nilay Chheda 2011-10-03 08:42:52 PDT
User Agent: Mozilla/5.0 (Windows NT 6.1; rv:7.0.1) Gecko/20100101 Firefox/7.0.1
Build ID: 20110928134238

Steps to reproduce:

I was watching a video on youtube. I had plugged in a head phone with my 32 bit laptop running windows 7 OS. My friend came, and he removed the headphone jack from laptop to listen the audio of the video I was watching on youtube.


Actual results:

This has happened now twice. First time automatically firefox crashed and report was submitted. I thought there might be some other problem. Today it happened again, and firefox 7 didn't crashed but hanged. On realizing, I plugged in jack again and then firefox responded back.


Expected results:

Firefox should not have hanged or crashed.
Comment 1 Matthias Versen [:Matti] 2011-10-03 15:46:23 PDT
This could be a bug in flash because the flash plugin plays audio and not Firefox.
Can you please post the crash id from about:crashes ?
https://developer.mozilla.org/en/How_to_get_a_stacktrace_for_a_bug_report
Comment 2 Nilay Chheda 2011-10-04 06:04:57 PDT
(In reply to Matthias Versen (Matti) from comment #1)
> This could be a bug in flash because the flash plugin plays audio and not
> Firefox.
> Can you please post the crash id from about:crashes ?
> https://developer.mozilla.org/en/How_to_get_a_stacktrace_for_a_bug_report

It may be bug with flash or may be with my laptop as well because in my friend's laptop, firefox 7 is working well.
But here is the crash report that I submitted just now ! 
https://crash-stats.mozilla.com/report/index/bp-3e3bae7a-75c5-4423-9efe-535782111004

I hope this may help.
This problem is happening with any other flash audio playing site. 
By killing plugincontainer.exe process manually, I can resume back the audio. 
This was not happening before firefox 7. So I think there is something wrong on firefox's side :) 
Happy firefoxing !
Comment 3 Matthias Versen [:Matti] 2011-10-04 07:02:23 PDT
>By killing plugincontainer.exe process manually, I can resume back the audio.
Firefox hangs if the plugin inside the plugincontainer hangs. The plugincontainer itself kills the hanging plugin only after a long time.

>This was not happening before firefox 7.
The plugincontainer doesn't do anything with audio, only the plugins that are running inside are accessing the windows audio devices.
I bet that this is caused by an update of the flash plugin.
Comment 4 Miłosz Kosobucki 2011-12-29 11:58:26 PST
I can confirm that. It's definitely not flash's fault. I just upgraded to firefox 9 and the promotional video opened (http://www.mozilla.org/en-US/firefox/9.0.1/whatsnew/). I unplugged my headphones and firefox crashed.

Note: It was in windows 7. I don't have any other output device so windows set Digital Audio (S/PDIF) as default playback device after I unplugged the headphones.
Comment 5 Miłosz Kosobucki 2011-12-29 11:59:13 PST
Hanged, not crashed to be exact.
Comment 6 Matthias Versen [:Matti] 2012-01-25 17:51:26 PST
>It's definitely not flash's fault.
Why are you sure this not the fault of the flash plugin ?
Comment 7 Miłosz Kosobucki 2012-01-26 01:37:25 PST
(In reply to Matthias Versen (Matti) from comment #6)
> Why are you sure this not the fault of the flash plugin ?
Because the video on the site I mentioned is _not_ using flash. It's embedded by html5 <video> tag.
Comment 8 Matthew Gregan [:kinetik] 2012-02-16 14:30:59 PST
I can reproduce this on Windows 7.  Visit http://www.mozilla.org/en-US/firefox/9.0.1/whatsnew/, click play, open the sound control panel, select the playback tab, right click the playing device, and select disable.

I get the following fatal assert in AudioSession::Start:

###!!! ABORT: State invariants violated: 'mState == UNINITIALIZED || mState == CLONED', file c:/work/mozilla-central/widget/windows/AudioSession.cpp, line 210

...where mState is currently STARTED and Start() has been called by AudioSession::OnSessionDisconnectedInternal().
Comment 9 Brian R. Bondy [:bbondy] 2012-02-16 16:43:42 PST
Nice, I reproduced using the steps in Comment 8.
Comment 10 Brian R. Bondy [:bbondy] 2012-02-16 19:02:17 PST
Created attachment 598099 [details] [diff] [review]
Patch v1.

Code has been this way since it was introduced last year in July in bug 441197
Comment 11 Brian R. Bondy [:bbondy] 2012-02-16 19:04:25 PST
The crash signature is not the same as the one indicated in the bug, but this fixes the crash mentioned in Comment 8.  Please let me know if I should post a new bug for this instead.
Comment 12 Scoobidiver (away) 2012-02-16 22:22:49 PST
(In reply to Brian R. Bondy [:bbondy] from comment #11)
> The crash signature is not the same as the one indicated in the bug, but
> this fixes the crash mentioned in Comment 8.  Please let me know if I should
> post a new bug for this instead.
Can you provide your crash ID in order to be added in the crash signature field and tracked in Socorro?
Comment 13 Brian R. Bondy [:bbondy] 2012-02-17 06:09:55 PST
http://crash-stats.mozilla.com/report/index/bp-e52f02bd-6ec8-4259-af46-332f92120217
Also updated the signature field above.
Comment 15 Ed Morley [:emorley] 2012-02-17 18:00:42 PST
https://hg.mozilla.org/mozilla-central/rev/174ce0df7cdd
Comment 16 Brian R. Bondy [:bbondy] 2012-03-01 20:43:17 PST
Fixed the crash signature that this fix was related to back to Comment 13.

Note You need to log in before you can comment on or make changes to this bug.