Possible gstreamer errors: volume, dispose, loop detected - oh my!

classic Classic list List threaded Threaded
6 messages Options
Reply | Threaded
Open this post in threaded view
|

Possible gstreamer errors: volume, dispose, loop detected - oh my!

Ryan Kelln
Hi Gstreamer devs,
(sorry to mods, I tried posting this without subscribing first, you can
delete/disapprove the post waiting for approval)

I'm using gstreamer through gstreamer-java inside of processing. I'm
getting some odd errors and warnings and eventually a crash (perhaps a
null pointer). I'm hoping you might have a bit of insight or guidance
for how to avoid these problems or what I could do to fix them. Thanks.

Environment:
Ubuntu 8.04
gstreamer-team ppa  (https://edge.launchpad.net/~gstreamer-team/+archive)
Sun Java 1.06_07
Processing 148
gstreamer-java 0.8

The errors happen in a variety of orders, here is an example of each:

** (GSVideo:9501): CRITICAL **: volume_transform_ip: assertion
`this->process != NULL' failed

(GSVideo:9501): GStreamer-CRITICAL **:
Trying to dispose element test, but it is not in the NULL state.
You need to explicitly set elements to the NULL state before
dropping the final reference, to allow them to clean up.

(GSVideo:9501): GStreamer-WARNING **: loop detected in the graph of bin
GStreamer Audio Data Extractor: mysoundfile.wav!!

Then eventually Java will crash with a SIGSEGV fault in a native thread
which I'm assuming is gstreamer. Looks like it is accessing a null pointer.


Description of what I'm doing:
Custom software that is playing back multiple audio files at once. It
loads approx. 11 sound files (all wavs or aif errors and crash remain
the same) and starts and stops the files quite often. It also checks the
current volume and changes the volume each update (i.e. constantly
adjusting the volume). In addition I'm using the audiopanorama plug-in
to do constant panning.

Occasionally I will get the "loop detected" warning on one or two of the
sound files, but which sound file it is seems to change and it doesn't
happen every run. The error appears to occur when the sound is first
played, not when the object is created. The program continues to
function after receiving this warning although the sound file doesn't play.

I get the "volume_transform_ip" error quite often (every 5 minutes?) but
the program doesn't immediately crash.

I get the "dispose element test" error only on a multi-core processor
(AMD Phenom) but not on an equivalent machine with just a single core.
Again, this doesn't cause an immediate crash. As far as I know I'm not
make any elements named "test", and I'm not disposing of anything until
the program ends but I am starting and stopping the audio streams.

Things I've tried:
I've grepped the source for these and found the loop detected error in
gstbin.c (gst_bin_sort_iterator_next() )and the "dispose element not
NULL" in gstelement.c (gst_element_dispose() ) but I can't locate the
"volume_transform_ip" error.

I've tired running the program with sounds disabled and it runs without
errors or crashes (for hours). If I only update the volumes of the
sounds every other update (or every 5, etc) it seems to help, although
its hard to tell if the errors occur that much slower or even more
infrequently. If I don't adjust the volume at all it seems to run fine
(survived 10+ mins without errors, still running tests).

Some possible problem areas:
When is it safe to set and check the volume (especially in regards to
starting and stopping sounds)? Is it safe to set and check the volume in
the same update... multiple times?

I'm not sure if the errors are in gstreamer or just my use of it? I've
got to deliver this project really soon so workarounds might be the best
option if the error is gstreamers. If you're sure that gstreamer is at
fault I'd love some tips on how to provide more info (I'm not sure how
I'd debug gstreamer through all these other layers) and write up a bug
report.

Thanks very much,
Ryan

-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
_______________________________________________
gstreamer-devel mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/gstreamer-devel
Reply | Threaded
Open this post in threaded view
|

Re: Possible gstreamer errors: volume, dispose, loop detected - oh my!

Stefan Sauer
hi,

Ryan Kelln schrieb:

> Hi Gstreamer devs,
> (sorry to mods, I tried posting this without subscribing first, you can
> delete/disapprove the post waiting for approval)
>
> I'm using gstreamer through gstreamer-java inside of processing. I'm
> getting some odd errors and warnings and eventually a crash (perhaps a
> null pointer). I'm hoping you might have a bit of insight or guidance
> for how to avoid these problems or what I could do to fix them. Thanks.
>
> Environment:
> Ubuntu 8.04
> gstreamer-team ppa  (https://edge.launchpad.net/~gstreamer-team/+archive)
> Sun Java 1.06_07
> Processing 148
> gstreamer-java 0.8
>
> The errors happen in a variety of orders, here is an example of each:
>
> ** (GSVideo:9501): CRITICAL **: volume_transform_ip: assertion
> `this->process != NULL' failed

This means that the volume element is not configured. I use volume a lot and
have never seen it. Could it be that the java bindungs handling something
different here.

>
> (GSVideo:9501): GStreamer-CRITICAL **:
> Trying to dispose element test, but it is not in the NULL state.
> You need to explicitly set elements to the NULL state before
> dropping the final reference, to allow them to clean up.
 >
Do you set your pipeline to NULL state before releasing it. Dunnon how much this
is abstracted by java-bindings again.

>
> (GSVideo:9501): GStreamer-WARNING **: loop detected in the graph of bin
> GStreamer Audio Data Extractor: mysoundfile.wav!!

No idea where this comes from.

>
> Then eventually Java will crash with a SIGSEGV fault in a native thread
> which I'm assuming is gstreamer. Looks like it is accessing a null pointer.
>
>
> Description of what I'm doing:
> Custom software that is playing back multiple audio files at once. It
> loads approx. 11 sound files (all wavs or aif errors and crash remain
> the same) and starts and stops the files quite often. It also checks the
> current volume and changes the volume each update (i.e. constantly
> adjusting the volume). In addition I'm using the audiopanorama plug-in
> to do constant panning.
>
> Occasionally I will get the "loop detected" warning on one or two of the
> sound files, but which sound file it is seems to change and it doesn't
> happen every run. The error appears to occur when the sound is first
> played, not when the object is created. The program continues to
> function after receiving this warning although the sound file doesn't play.
>
> I get the "volume_transform_ip" error quite often (every 5 minutes?) but
> the program doesn't immediately crash.
>
> I get the "dispose element test" error only on a multi-core processor
> (AMD Phenom) but not on an equivalent machine with just a single core.
> Again, this doesn't cause an immediate crash. As far as I know I'm not
> make any elements named "test", and I'm not disposing of anything until
> the program ends but I am starting and stopping the audio streams.
>
> Things I've tried:
> I've grepped the source for these and found the loop detected error in
> gstbin.c (gst_bin_sort_iterator_next() )and the "dispose element not
> NULL" in gstelement.c (gst_element_dispose() ) but I can't locate the
> "volume_transform_ip" error.
>
> I've tired running the program with sounds disabled and it runs without
> errors or crashes (for hours). If I only update the volumes of the
> sounds every other update (or every 5, etc) it seems to help, although
> its hard to tell if the errors occur that much slower or even more
> infrequently. If I don't adjust the volume at all it seems to run fine
> (survived 10+ mins without errors, still running tests).
>
> Some possible problem areas:
> When is it safe to set and check the volume (especially in regards to
> starting and stopping sounds)? Is it safe to set and check the volume in
> the same update... multiple times?
 >
I don't think the volume element causes these issues. Its safe to set this
property at any time. Can you explain how you check for the volume? Are you
checking the actual data or are you using the level element.

>
> I'm not sure if the errors are in gstreamer or just my use of it? I've
> got to deliver this project really soon so workarounds might be the best
> option if the error is gstreamers. If you're sure that gstreamer is at
> fault I'd love some tips on how to provide more info (I'm not sure how
> I'd debug gstreamer through all these other layers) and write up a bug
> report.

Try to get hold of the java binding maintainers. I suspect the issues there.

Stefan

>
> Thanks very much,
> Ryan
>
> -------------------------------------------------------------------------
> This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
> Build the coolest Linux based applications with Moblin SDK & win great prizes
> Grand prize is a trip for two to an Open Source event anywhere in the world
> http://moblin-contest.org/redirect.php?banner_id=100&url=/
> _______________________________________________
> gstreamer-devel mailing list
> [hidden email]
> https://lists.sourceforge.net/lists/listinfo/gstreamer-devel


-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
_______________________________________________
gstreamer-devel mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/gstreamer-devel
Reply | Threaded
Open this post in threaded view
|

Re: Possible gstreamer errors: volume, dispose, loop detected - oh my!

Ryan Kelln
Thanks for the info Stefan, most helpful. Some comments below.

Stefan Kost wrote:
> Ryan Kelln schrieb:
>> ** (GSVideo:9501): CRITICAL **: volume_transform_ip: assertion
>> `this->process != NULL' failed
> This means that the volume element is not configured. I use volume a
> lot and have never seen it. Could it be that the java bindungs
> handling something different here.
>
Yup, I'll take a look  at the java that is between me and gstreamer,
however on my end I don't every delete any sounds once they are around.
They are started and stopped, seeked, panned and volume changed, but I
don't see why the volume element would ever become unconfigured from any
of those actions.

If I slow down the rate at which the volume is checked and never
start/stop the sounds then this is the only error I get and it
drastically slows the crash (I've not seen it in 8+ hours of continuous
running).

Hmm, here is the gstreamer-java code between me and gstreamer. It seems
simple enough, unless there is a bug in the jna library stuff that this
relies on:

public void setVolume(double volume) {
        gobj.g_object_set(this, "volume", volume);
}

public double getVolume() {
        double[] volume = { 0d };
        gobj.g_object_get(this, "volume", volume);
        return volume[0];
}

public interface GObjectAPI extends Library {
    static GObjectAPI gobj = GNative.loadLibrary("gobject-2.0",
GObjectAPI.class, new HashMap<String, Object>() {{
        put(Library.OPTION_TYPE_MAPPER, new GTypeMapper());
    }});
    ...
    void g_object_set(GObject obj, String propertyName, Object... data);
    void g_object_get(GObject obj, String propertyName, Object... data);

See anything wrong with that?

>> (GSVideo:9501): GStreamer-CRITICAL **:
>> Trying to dispose element test, but it is not in the NULL state.
>> You need to explicitly set elements to the NULL state before
>> dropping the final reference, to allow them to clean up.
> Do you set your pipeline to NULL state before releasing it. Dunnon how
> much this is abstracted by java-bindings again.
The problem I'm having tracking this down is one in is making an element
called "test" specifically in any of the code. A grep or search of the
code turns up nothing interesting for "test". And as I stated I'm not
disposing any elements (until the software exits), unless the sounds or
some element of the sounds is being disposed when stopped.... hmm, nope,
that isn't the case.

A question about your statement. Are you saying that before you call
dispose() you need to stop the pipeline (set the state to NULL)? This
does seem to be what is happening.

>> (GSVideo:9501): GStreamer-WARNING **: loop detected in the graph of bin
>> GStreamer Audio Data Extractor: mysoundfile.wav!!
>
> No idea where this comes from.
Damn, I hoped this would be something that other people had run into:
here it is in context (sadly the code makes no sense to me):
gstbin.c: line 1747:

/* get next element in iterator. the returned element has the
 * refcount increased */
static GstIteratorResult
gst_bin_sort_iterator_next (GstBinSortIterator * bit, gpointer * result)
{
  GstBin *bin = bit->bin;

  /* empty queue, we have to find a next best element */
  if (g_queue_is_empty (bit->queue)) {
    GstElement *best;

    bit->best = NULL;
    bit->best_deg = G_MAXINT;
    g_list_foreach (bin->children, (GFunc) find_element, bit);
    if ((best = bit->best)) {
      if (bit->best_deg != 0) {
        /* we don't fail on this one yet */
        GST_WARNING_OBJECT (bin, "loop dected in graph");
        g_warning ("loop detected in the graph of bin %s!!",
            GST_ELEMENT_NAME (bin));
      }
      /* best unhandled element, schedule as next element */
      GST_DEBUG_OBJECT (bin, "queue empty, next best: %s",
          GST_ELEMENT_NAME (best));
      gst_object_ref (best);
      HASH_SET_DEGREE (bit, best, -1);
      *result = best;
    } else {
      GST_DEBUG_OBJECT (bin, "queue empty, elements exhausted");
      /* no more unhandled elements, we are done */
      return GST_ITERATOR_DONE;
    }
  } else {
    /* everything added to the queue got reffed */
    *result = g_queue_pop_head (bit->queue);
  }
....

> I don't think the volume element causes these issues. Its safe to set
> this property at any time. Can you explain how you check for the
> volume? Are you checking the actual data or are you using the level
> element.
See above for how I'm checking the volume.

Thanks again for the help, the more I test this bug and learn about
gstreamer the more bizarre this seems to be. I'll test the entire thing
with entirely different sounds tomorrow.

Ryan

-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
_______________________________________________
gstreamer-devel mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/gstreamer-devel
Reply | Threaded
Open this post in threaded view
|

Re: Possible gstreamer errors: volume, dispose, loop detected - oh my!

Wim Taymans
On Mon, 2008-09-15 at 00:29 -0400, Ryan Kelln wrote:
<snip>

>
> >> (GSVideo:9501): GStreamer-WARNING **: loop detected in the graph of bin
> >> GStreamer Audio Data Extractor: mysoundfile.wav!!
> >
> > No idea where this comes from.
> Damn, I hoped this would be something that other people had run into:
> here it is in context (sadly the code makes no sense to me):
> gstbin.c: line 1747:

it's very likely because of this bug:

http://bugzilla.gnome.org/show_bug.cgi?id=510354

Wim


-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
_______________________________________________
gstreamer-devel mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/gstreamer-devel
Reply | Threaded
Open this post in threaded view
|

Re: Possible gstreamer errors: volume, dispose, loop detected - oh my!

Irfan Shaikh-2

Hi All,

        I want to stream a .asf file on Windows media player using following
pipeline through Gstreamer.

        1) gst-launch filesrc location=/root/Desktop/mjpegi.asf ! rtspwms !
tcpserversink port=554 host=10.60.3.55

        2) gst-launch filesrc location=/root/Desktop/mjpegi.asf ! rtspwms ! udpsink
port=5005 host=10.60.3.55


        I am getting following warnings:
        WARNING: erroneous pipeline: could not link filesrc0 to rtspwms0

        On windows media I have used
        Open URL : rtsp://<ip adress>:<port number>

        Please can me help me out how to use this element.

        Thankyou in advance,

        Irfan.


The information contained in this electronic message and any attachments to this message are intended for the exclusive use of the addressee(s) and may contain proprietary, confidential or privileged information. If you are not the intended recipient, you should not disseminate, distribute or copy this e-mail. Please notify the sender immediately and destroy all copies of this message and any attachments contained in it.

-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
_______________________________________________
gstreamer-devel mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/gstreamer-devel
Reply | Threaded
Open this post in threaded view
|

Re: Possible gstreamer errors: volume, dispose, loop detected - oh my!

Irfan Shaikh-2
In reply to this post by Wim Taymans
Hi Wim,

        Thanks for the understanding. My requirement is as follows:

I have some encoded audio and video files.I need to put them into asf
container and stream it using gstreamer and receive the same on client pc
using wmp player.Can you suggest how can i acheive this?

Thanks in advance,

Regards,
Irfan.

-----Original Message-----
From: [hidden email]
[mailto:[hidden email]]On Behalf Of Wim
Taymans
Sent: Monday, September 15, 2008 10:30 AM
To: Discussion of the development of GStreamer
Subject: Re: [gst-devel] Possible gstreamer errors: volume, dispose,loop
detected - oh my!


On Mon, 2008-09-15 at 00:29 -0400, Ryan Kelln wrote:
<snip>

>
> >> (GSVideo:9501): GStreamer-WARNING **: loop detected in the graph of bin
> >> GStreamer Audio Data Extractor: mysoundfile.wav!!
> >
> > No idea where this comes from.
> Damn, I hoped this would be something that other people had run into:
> here it is in context (sadly the code makes no sense to me):
> gstbin.c: line 1747:

it's very likely because of this bug:

http://bugzilla.gnome.org/show_bug.cgi?id=510354

Wim


-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great
prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
_______________________________________________
gstreamer-devel mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/gstreamer-devel


The information contained in this electronic message and any attachments to this message are intended for the exclusive use of the addressee(s) and may contain proprietary, confidential or privileged information. If you are not the intended recipient, you should not disseminate, distribute or copy this e-mail. Please notify the sender immediately and destroy all copies of this message and any attachments contained in it.

-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
_______________________________________________
gstreamer-devel mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/gstreamer-devel