Bus on elements

38 views
Skip to first unread message

Alexander Savelyev

unread,
Jan 10, 2022, 4:46:40 AM1/10/22
to gstreamer-java
Hi!
I am using gstreamer JAVA bindings and everything is perfect, but now I have one problem.
I have a dynamic pipeline and I am using filesink there. To catch EOS on filesink I run this code: 

this.filesinkBus = this.filesink.getBus();
filesinkBus.connect(this.onFileBus);

Everything is working fine but I got such errors: 

(gst1-java-core:2080824): GStreamer-CRITICAL **: 09:42:46.969: gst_bus_create_watch: assertion 'bus->priv->poll != NULL' failed

(gst1-java-core:2080824): GStreamer-CRITICAL **: 09:42:46.969: Creating bus watch failed

(gst1-java-core:2080824): GStreamer-CRITICAL **: 09:42:46.969: Could not add signal watch to bus bus0

I get messages on bus but due to this errors there is a leaks in memory and application crashes after few creations of filesink.

Is this problem of java bindings or I am doing something wrong?

Neil C Smith

unread,
Jan 10, 2022, 6:36:45 AM1/10/22
to gstream...@googlegroups.com
On Mon, 10 Jan 2022 at 09:46, Alexander Savelyev
<nightw...@gmail.com> wrote:
> Everything is working fine but I got such errors:
>
> (gst1-java-core:2080824): GStreamer-CRITICAL **: 09:42:46.969: gst_bus_create_watch: assertion 'bus->priv->poll != NULL' failed
>
> (gst1-java-core:2080824): GStreamer-CRITICAL **: 09:42:46.969: Creating bus watch failed
>
> (gst1-java-core:2080824): GStreamer-CRITICAL **: 09:42:46.969: Could not add signal watch to bus bus0
>
> I get messages on bus but due to this errors there is a leaks in memory and application crashes after few creations of filesink.
>
> Is this problem of java bindings or I am doing something wrong?

It doesn't sound like "everything is working fine"!

A possible culprit is that you're not keeping a strong reference to
something you should be, such as the top-level pipeline. It's
sometimes useful to run with something like VisualVM and manually
trigger GC to see if that causes the crash.

However, calling filesink.getBus is suspicious. Get the bus from the pipeline.

Without a simple but complete example to look at there's not a lot
else I can add right now.

Best wishes,

Neil

--
Neil C Smith
Codelerity Ltd.
www.codelerity.com

Codelerity Ltd. is a company registered in England and Wales
Registered company number : 12063669
Registered office address : Office 4 219 Kensington High Street,
Kensington, London, England, W8 6BD
Reply all
Reply to author
Forward
0 new messages