ManuraNirmal / gstreamer-java

Automatically exported from code.google.com/p/gstreamer-java
0 stars 0 forks source link

PlayBin2 crashes when repeatedly changing volume #70

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
What steps will reproduce the problem?
1. Run the attached program.
2. Focus on the frame window and keep any key pressed.
3. After a variable period of time, often a few seconds, the application 
usually crashes. 

The issue is tricky because it doesn't happen always, and it takes a random 
amount of time to manifest.

The code itself is quite crude, it would be better if the JFrame automatically 
does the volume setting every time its repainted or something like that, so 
there is no need to keep a key pressed. Also, playing a longer audio clip could 
be good idea (sometimes it takes more time to crash).

Tested on:
Ubuntu 10.04 64 bits
gstreamer-java r477
gstreamer 0.10.31
gstreamer-plugins-base 0.10.31
gstreamer-plugins-good 0.10.26
gstreamer-plugins-bad 0.10.20
gstreamer-plugins-ugly 0.10.16

Original issue reported on code.google.com by andres.c...@gmail.com on 25 Jan 2011 at 5:26

Attachments:

GoogleCodeExporter commented 8 years ago
lajos will attach a C source code for this shortly.
it seems if you change the volume in 100ms then it crash if only at 1sec rate 
then not. if you test it please report upstream (i leave for a week tomorrow).

Original comment by lfar...@gmail.com on 28 Jan 2011 at 8:38

GoogleCodeExporter commented 8 years ago
[deleted comment]
GoogleCodeExporter commented 8 years ago
[deleted comment]
GoogleCodeExporter commented 8 years ago
and here is the code
sincelery:Lajos

Original comment by lajos.ra...@gmail.com on 28 Jan 2011 at 9:20

Attachments:

GoogleCodeExporter commented 8 years ago
Great, thanks for the code.

I just reported the issue on bugzilla:

https://bugzilla.gnome.org/show_bug.cgi?id=640872

Original comment by andres.c...@gmail.com on 29 Jan 2011 at 12:43

GoogleCodeExporter commented 8 years ago
Woot! Thanks for this Andres. Hopefully this will mean there will be a 
non-broken Playbin2 for my show in March. 

Assuming it's the same issue, you might be interested in the workaround which 
addresses a VERY similar problem in Banshee. I don't fully understand the 
solution, but apparently changes to the Gstreamer invocations used by Banshee 
in order to control volume fixed a SIGSEGV problem for them.

"The upstream patch below removed gst_stream_volume_set_volume () and can help
resolve the crash problem as a side benefit."
https://bugs.meego.com/show_bug.cgi?id=6966

...which links through to the patch which fixed it...
http://git.gnome.org/browse/banshee/commit/?id=c6b2f2c14406e378f42c47ce4294b2280
21d2ad2

Original comment by c...@cefn.com on 12 Feb 2011 at 11:56

GoogleCodeExporter commented 8 years ago
Thanks for the follow up. So at the end this is due to a bug in GLib?

Original comment by andres.c...@gmail.com on 13 Feb 2011 at 1:08

GoogleCodeExporter commented 8 years ago
The problem was due to an upstream bug in glib, which is solved in versions 2.6 
or newer.

Original comment by andres.c...@gmail.com on 31 Mar 2011 at 11:56