After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 777123 - wavparse: CRITICAL warning with injected flush stop event in pull mode
wavparse: CRITICAL warning with injected flush stop event in pull mode
Status: RESOLVED FIXED
Product: GStreamer
Classification: Platform
Component: gst-plugins-good
git master
Other Linux
: Normal normal
: 1.10.3
Assigned To: GStreamer Maintainers
GStreamer Maintainers
Depends on:
Blocks:
 
 
Reported: 2017-01-11 07:54 UTC by Rahul Bedarkar
Modified: 2017-01-25 12:29 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
test wav file (1.39 MB, audio/wav)
2017-01-11 07:54 UTC, Rahul Bedarkar
  Details
Patch to fix warning (1.21 KB, patch)
2017-01-11 07:57 UTC, Rahul Bedarkar
committed Details | Review
Test program to reproduce issue (3.10 KB, text/x-csrc)
2017-01-24 11:37 UTC, Rahul Bedarkar
  Details

Description Rahul Bedarkar 2017-01-11 07:54:29 UTC
Created attachment 343277 [details]
test wav file

When playing local wav file, if we flush the pipeline using flush start/stop event, we get following CRITICAL warning:

CRITICAL **: gst_adapter_clear: assertion 'GST_IS_ADAPTER (adapter)' failed
Comment 1 Rahul Bedarkar 2017-01-11 07:57:14 UTC
Created attachment 343278 [details] [review]
Patch to fix warning

Please find attached patch to fix CRITICAL warning.
Comment 2 Tim-Philipp Müller 2017-01-24 01:01:23 UTC
Thanks for the bug report and the patch.

Could you provide a little more context? What's the pipeline exactly and how and when does this happen?

Are you sending flush-start/stop to wavparse while it's operating in push mode? 

Or before it's activated yet? Or..?
Comment 3 Rahul Bedarkar 2017-01-24 11:34:58 UTC
Hello Tim,

Gstreamer pipeline for this issue looks like filesrc ! wavparse ! audioconvert ! alsasink. I am sending flush start/stop to whole pipeline.

Warning appears when we send flush start/stop to the pipeline when it is in playing state. In this case, wavparse operates in pull mode where adapter is not used.

Thanks,
Rahul
Comment 4 Rahul Bedarkar 2017-01-24 11:37:46 UTC
Created attachment 344124 [details]
Test program to reproduce issue

Please find attached test program to reproduce issue.
Comment 5 Tim-Philipp Müller 2017-01-24 11:45:00 UTC
Sure, we can fix that, but what purpose does it serve?

How will you re-start streaming afterwards? Will you do a seek?
Comment 6 Rahul Bedarkar 2017-01-25 08:12:08 UTC
I usually use playbin. For stopping current playback, I flush pipeline and set pipeline state to NULL. To start new playback, I set uri property and pipeline state to PLAYING.
Comment 7 Tim-Philipp Müller 2017-01-25 09:15:41 UTC
Ok, and why do you flush rather than just set pipeline state to NULL? Just shutting down the pipeline should accomplish the same thing and flush as well.
Comment 8 Rahul Bedarkar 2017-01-25 09:52:34 UTC
Flush before setting pipeline state to NULL comes from legacy code of gstreamer 0.10 time. While shutting down pipeline, it used to block sometimes. I will try removing flush.

Do you think patch is still valid since it is checking for not null ?
Comment 9 Tim-Philipp Müller 2017-01-25 10:02:18 UTC
Yeah, I think it's fine to push, I was just trying to figure out why you're doing what you're doing because it's a bit weird :)

Thanks for the patch!

 commit f05c0c036e2ac7eec4ea06af20ec41b4bd265d75
 Author: Rahul Bedarkar <rahul.bedarkar@imgtec.com>
 Date:   Mon Jan 9 11:32:35 2017 +0530

    wavparse: check for not NULL before clearing adapter
    
    In case wavparse receives a manually injected FLUSH_STOP event
    while operating in pull mode we get criticals because we'd try
    to clear a NULL adapter.
    
    https://bugzilla.gnome.org/show_bug.cgi?id=777123