FS#18341 - Latest update of gstreamer breaks moodbar the possibility of making mood files for amarok 2.2.2

Attached to Project: Arch Linux
Opened by André Fettouhi (A.Fettouhi) - Monday, 15 February 2010, 13:01 GMT
Last edited by Jan de Groot (JGC) - Monday, 15 February 2010, 17:57 GMT
Task Type Bug Report
Category Packages: Extra
Status Closed
Assigned To No-one
Architecture All
Severity Low
Priority Normal
Reported Version
Due in Version Undecided
Due Date Undecided
Percent Complete 100%
Votes 0
Private No

Details

Description:

Since gstreamer0.10 was updated a few days ago. Thew moodbar package which I maintain in AUR

http://aur.archlinux.org/packages.php?ID=6552

doesn't allow me to make any new mood files for amarok 2.2.2. I'm using the script mentioned here:

http://amarok.kde.org/wiki/Moodbar#Moodbar_File_Generation_Script

Since the update I get this error when scanning my collection:

[af@andre ~]$ cd Music
[af@andre Music]$ sh moodbar.sh
**
GStreamer:ERROR:gst.c:580:init_pre: assertion failed: (g_thread_get_initialized ())
moodbar.sh: line 20: 24002 Afbrudt (SIGABRT) moodbar -o "$OUTF" "$i"
**
GStreamer:ERROR:gst.c:580:init_pre: assertion failed: (g_thread_get_initialized ())
moodbar.sh: line 20: 24006 Afbrudt (SIGABRT) moodbar -o "$OUTF" "$i"
**
GStreamer:ERROR:gst.c:580:init_pre: assertion failed: (g_thread_get_initialized ())
moodbar.sh: line 20: 24010 Afbrudt (SIGABRT) moodbar -o "$OUTF" "$i"
**
GStreamer:ERROR:gst.c:580:init_pre: assertion failed: (g_thread_get_initialized ())
moodbar.sh: line 20: 24014 Afbrudt (SIGABRT) moodbar -o "$OUTF" "$i"
**
GStreamer:ERROR:gst.c:580:init_pre: assertion failed: (g_thread_get_initialized ())
moodbar.sh: line 20: 24018 Afbrudt (SIGABRT) moodbar -o "$OUTF" "$i"
**
GStreamer:ERROR:gst.c:580:init_pre: assertion failed: (g_thread_get_initialized ())
moodbar.sh: line 20: 24022 Afbrudt (SIGABRT) moodbar -o "$OUTF" "$i"
**
GStreamer:ERROR:gst.c:580:init_pre: assertion failed: (g_thread_get_initialized ())
moodbar.sh: line 20: 24026 Afbrudt (SIGABRT) moodbar -o "$OUTF" "$i"
**
GStreamer:ERROR:gst.c:580:init_pre: assertion failed: (g_thread_get_initialized ())
moodbar.sh: line 20: 24030 Afbrudt (SIGABRT) moodbar -o "$OUTF" "$i"
**
GStreamer:ERROR:gst.c:580:init_pre: assertion failed: (g_thread_get_initialized ())
moodbar.sh: line 20: 24034 Afbrudt (SIGABRT) moodbar -o "$OUTF" "$i"
**
GStreamer:ERROR:gst.c:580:init_pre: assertion failed: (g_thread_get_initialized ())
moodbar.sh: line 20: 24038 Afbrudt (SIGABRT) moodbar -o "$OUTF" "$i"
**
GStreamer:ERROR:gst.c:580:init_pre: assertion failed: (g_thread_get_initialized ())
moodbar.sh: line 20: 24042 Afbrudt (SIGABRT) moodbar -o "$OUTF" "$i"
**
GStreamer:ERROR:gst.c:580:init_pre: assertion failed: (g_thread_get_initialized ())
moodbar.sh: line 20: 24046 Afbrudt (SIGABRT) moodbar -o "$OUTF" "$i"
**
GStreamer:ERROR:gst.c:580:init_pre: assertion failed: (g_thread_get_initialized ())
moodbar.sh: line 20: 24050 Afbrudt (SIGABRT) moodbar -o "$OUTF" "$i"
**
GStreamer:ERROR:gst.c:580:init_pre: assertion failed: (g_thread_get_initialized ())
moodbar.sh: line 20: 24054 Afbrudt (SIGABRT) moodbar -o "$OUTF" "$i"
**
GStreamer:ERROR:gst.c:580:init_pre: assertion failed: (g_thread_get_initialized ())
moodbar.sh: line 20: 24058 Afbrudt (SIGABRT) moodbar -o "$OUTF" "$i"
**
GStreamer:ERROR:gst.c:580:init_pre: assertion failed: (g_thread_get_initialized ())
moodbar.sh: line 20: 24062 Afbrudt (SIGABRT) moodbar -o "$OUTF" "$i"
**
GStreamer:ERROR:gst.c:580:init_pre: assertion failed: (g_thread_get_initialized ())
moodbar.sh: line 20: 24066 Afbrudt (SIGABRT) moodbar -o "$OUTF" "$i"
**
GStreamer:ERROR:gst.c:580:init_pre: assertion failed: (g_thread_get_initialized ())
moodbar.sh: line 20: 3845 Afbrudt (SIGABRT) moodbar -o "$OUTF" "$i"
**
GStreamer:ERROR:gst.c:580:init_pre: assertion failed: (g_thread_get_initialized ())
moodbar.sh: line 20: 5131 Afbrudt (SIGABRT) moodbar -o "$OUTF" "$i"


Additional info:
* package version(s)
* config and/or log files etc.


Steps to reproduce:

1. install moodbar from AUR
2. create the moodbar.sh script as mentioned in the wiki
3. run the script in the directory where your music sits.
This task depends upon

Closed by  Jan de Groot (JGC)
Monday, 15 February 2010, 17:57 GMT
Reason for closing:  Not a bug
Additional comments about closing:  Bug in 3rd party package.
Comment by Jan de Groot (JGC) - Monday, 15 February 2010, 14:11 GMT
This is broken by this commit:

http://cgit.freedesktop.org/gstreamer/gstreamer/commit/?id=f137d188cb642094bcd21de75e0856907b99dc22

This is fixable by calling g_thread_init(NULL) before calling gst_init() from your application. This is a behaviour change in GStreamer and is not properly documented. Looking at the code, I see GStreamer does late-thread-initialisation. The problem with this is that glib 2.22 doesn't initialise the thread system when calling g_type_init, where 2.23.x does. I'll file a bug upstream about this.
Comment by André Fettouhi (A.Fettouhi) - Monday, 15 February 2010, 14:15 GMT
So moodbar needs to fixed in order work with the latest gstreamer?
Comment by Jan de Groot (JGC) - Monday, 15 February 2010, 14:31 GMT
Actually, scanning through the sourcecode of GStreamer, this isn't a bug in GStreamer. It will get fixed by itself with glib 2.23.2 and higher, as that version of glib allows late thread initialization.

About gst_init, the manual of 0.10.25 states this:
This function should be called before calling any other GLib functions. If this is not an option, your program must initialise the GLib thread system using g_thread_init() before any other GLib functions are called.

I don't see g_thread_init() in main.c of moodbar anywhere, and I see a g_option_context_new call, which is a glib call. After that, g_thread_init() called from gst_init seems to fail, causing your assertions.

This is a bug in moodbar, not in GStreamer. Changes in GStreamer triggered it.
Comment by André Fettouhi (A.Fettouhi) - Monday, 15 February 2010, 14:35 GMT
Moodbar is not my program I just maintain the package in AUR. So moodbar needs to be fixed for now until glib 2.23.2 enters arch?
Comment by Jan de Groot (JGC) - Monday, 15 February 2010, 14:46 GMT
Glib 2.23.x are development versions, the first version with this "fix" will be 2.24.0, which will be out when GNOME 2.30.0 is released.

Moodbar should be patched. In analyzer/main.c on line 264, before the call to g_option_context_new(), you should add "g_thread_init(NULL);" to fix this bug. Please file the bug upstream at moodbar also, as it's not doing things correct.
Comment by André Fettouhi (A.Fettouhi) - Monday, 15 February 2010, 14:48 GMT
OK, many thanks. I'll try to patch moodbar as you suggest or see if I can file a bug report with moodbar but I don't think it is actively maintained.

Loading...