GNOME Bugzilla – Bug 456634
gnome-sound-recorder shuts down recording pipeline prematurely
Last modified: 2015-01-19 11:34:09 UTC
Please describe the problem: The function stop_cb() in gsr-window.c shuts the recording pipeline without waiting for and EOS message, which, leads to loss of data if the shutdown happens before it arrives. Steps to reproduce: Can be reporduce on low-powered hardware, such as Sharp Zaurus: simply click record, then stop, then play; every so often the playback does not work. Actual results: Expected results: Does this happen every time? Other information: This is trivial to fix, simply remove the call to set_pipeline_state_to_null() at line 1260 of gsr-window.c (the pipeline is then correctly shutdown by the eos callback function).
That sounds reasonable. Could you cook up a patch? Ronald, does that sound right?
Yeah, that's correct.
(In reply to comment #0) <snip> > Other information: > This is trivial to fix, simply remove the call to set_pipeline_state_to_null() > at line 1260 of gsr-window.c (the pipeline is then correctly shutdown by the > eos callback function). That doesn't actually works, it never gets the eos callback. Could you please provide a tested patch?
Created attachment 108492 [details] Segfault trace
Created attachment 108494 [details] Screenshot of recorder and settings
*** Bug 629291 has been marked as a duplicate of this bug. ***
bug 629291 shows how bug 456634 causes gnome-sound-recorder to generate invalid wav files. I have just checked that git head gnome-sound-recorder generates invalid wav files.
A little more from running gnome-sound-recorder with GST_DEBUG=3: 0:00:11.628103134 23404 0x14c7010 INFO GST_STATES gstelement.c:2220:gst_element_continue_state:<record-pipeline> continue state change PAUSED to READY, final READY 0:00:11.628236812 23404 0x14c7010 INFO GST_STATES gstelement.c:2238:gst_element_continue_state:<sink> completed state change to READY 0:00:11.628273129 23404 0x14c7010 INFO GST_STATES gstelement.c:2251:gst_element_continue_state:<sink> posting state-changed PLAYING to READY 0:00:11.628312939 23404 0x14c7010 INFO GST_STATES gstbin.c:2425:gst_bin_change_state_func:<record-pipeline> child 'sink' changed state to 2(READY) successfully 0:00:11.628466452 23404 0x14c7010 WARN wavenc gstwavenc.c:731:gst_wavenc_change_state:<enc> warning: Wav stream not finished properly 0:00:11.628500185 23404 0x14c7010 WARN wavenc gstwavenc.c:731:gst_wavenc_change_state:<enc> warning: Wav stream not finished properly, no EOS received before shutdown
gnome-media has been obsolete since the release of GNOME 3, nearly 4 years ago. Furthermore, the gnome-sound-recorder program in gnome-media has been replaced by the stand-alone, rewritten, gnome-sound-recorder program which has a different interface. The new program should not be affected by the bugs you filed, however, please make sure to file new bugs against the gnome-sound-recorder product.