GNOME Bugzilla – Bug 172526
gst-register fails on a lot of plugins on MacOSX
Last modified: 2005-05-19 09:12:21 UTC
Please describe the problem: From irc: hi! I'm trying to install gstreamer on MacOSX, no problems compiling but when i run gst-register i get an error on ximagesink (and xvimagesink, videofilter and others..): Call to undefined routine after a NSUnLinkModule with the NSUNLINKMODULE_OPTION_RESET_LAZY_REFERENCES option I'm using MacOSX 10.3.8 with xcode 1.5 and latest gcc, glibtool,automake,autoconf from darwinports, gstreamer from cvs (branch 0.8) uhm, it seems that removing g_module_close in gst_plugin_check_file fixes it.. Steps to reproduce: 1. Compile gstreamer and gst-plugins 2. sudo gst-register 3. Actual results: gst-register gives some errors Expected results: Does this happen every time? Other information:
Dave, Wim, Benjamin, can you please look at this?
Sounds like a glib bug.
This is biting me too, so I thought I'd have a look.. What appears to be happening in gst-register: - loads gstxvimagesink (or anything that requires gstvideo) to check it's a gstreamer plugin - unloads the module once the check is complete - loads gstxvimagesink - finds gstvideo hasn't been registered yet, moves on (without closing the module) - .. other stuff gets registered.. - loads gstvideo to check it's a gstreamer plugin - unloads the module. At this point, the OS X dynamic loader wanders around the process breaking references to symbols defined in the gstvideo plugin - loads gstvideo again to actually register it - but this doesn't go back and fix all the references that were broken in the previous step So you might consider it an OS X bug, or just it being too smart for its own good. Changing gst_plugin_load_file to unload the module when registration fails fixes gst-register, but gst- inspect for plugins with such dependencies then breaks.
Created attachment 39867 [details] [review] rework gst_plugin_load_file so it doesn't unload the module after checking it seems to work for me.
Your patch calls g_module_close() twice.
Created attachment 45118 [details] [review] somewhat better patch cleaned up a bit, made gst_plugin_load_file always close the module if it doesn't load successfully, made gst_plugin_check_file only close the module once if it doesn't look like a plugin.
Created attachment 45345 [details] [review] actually better patch argh! Previous patch was horribly broken and prevented anything from working. This one might actually help.
I've tried the patch and it seems to work fine here on MacOSX 10.3.9 One small problem: gst-register gives some assertions like: (process:8925): GModule-CRITICAL **: g_module_name: assertion `module != NULL' failed The error is in _check_module, you try to use "module" before checking if it's != NULL It seems that there are also some errors in the debug output.. i'm attaching the log
Created attachment 45498 [details] output of GST_DEBUG=GST_PLUGIN_LOADING:5 sudo gst-register &> log (open the file with less -r log)
Can you remove the newlines "\n" in debug/GError and the filename retrieving if module==NULL in _check_module()? Otherwise the patch should probably be applied.
Also, please provide a diff -u patch, instead of plain diff. :).
Created attachment 45567 [details] [review] more acceptable patch OK, I promise I've actually tested this patch (on os x and linux). The _g_log_domain_gstreamer thing is a separate problem that I'd forgotten about - that symbol doesn't match the -export-symbols-regex pattern, so it's not exported from libgstreamer. I'll open a separate bug for this, since it's a different issue. (how does this work anywhere else?)
works fine on osx tiger for me (and already in portage tree as a macos specific patch) i cant vouch for it working on linux tho
commited to 0.8 branch, and adapted and commited for HEAD as well. thanks, closing.
*** Bug 171100 has been marked as a duplicate of this bug. ***
yup, I can confirm this works for me too with Fink (although it appears gst-player has problems, which is why I had trouble confirming things up until now, if I can figure out what's going on I'll open a bug)
gst-player is dead. Use totem. ;).