After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 172526 - gst-register fails on a lot of plugins on MacOSX
gst-register fails on a lot of plugins on MacOSX
Status: RESOLVED FIXED
Product: GStreamer
Classification: Platform
Component: gstreamer (core)
0.8.9
Other All
: Normal blocker
: 0.8.10
Assigned To: GStreamer Maintainers
GStreamer Maintainers
: 171100 (view as bug list)
Depends on:
Blocks:
 
 
Reported: 2005-04-03 18:30 UTC by Luca Ognibene
Modified: 2005-05-19 09:12 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
rework gst_plugin_load_file so it doesn't unload the module after checking it (2.83 KB, patch)
2005-04-09 14:24 UTC, Jonathan Matthew
none Details | Review
somewhat better patch (3.94 KB, patch)
2005-04-11 02:19 UTC, Jonathan Matthew
none Details | Review
actually better patch (2.91 KB, patch)
2005-04-17 08:41 UTC, Jonathan Matthew
none Details | Review
output of GST_DEBUG=GST_PLUGIN_LOADING:5 sudo gst-register &> log (278.34 KB, text/plain)
2005-04-20 19:58 UTC, Luca Ognibene
  Details
more acceptable patch (3.89 KB, patch)
2005-04-22 22:37 UTC, Jonathan Matthew
none Details | Review

Description Luca Ognibene 2005-04-03 18:30:22 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:
Comment 1 Ronald Bultje 2005-04-03 22:06:56 UTC
Dave, Wim, Benjamin, can you please look at this?
Comment 2 David Schleef 2005-04-04 02:59:37 UTC
Sounds like a glib bug.
Comment 3 Jonathan Matthew 2005-04-09 14:22:04 UTC
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.
Comment 4 Jonathan Matthew 2005-04-09 14:24:04 UTC
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.
Comment 5 David Schleef 2005-04-10 20:30:43 UTC
Your patch calls g_module_close() twice.
Comment 6 Jonathan Matthew 2005-04-11 02:19:42 UTC
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.
Comment 7 Jonathan Matthew 2005-04-17 08:41:03 UTC
Created attachment 45345 [details] [review]
actually better patch

argh!  Previous patch was horribly broken and prevented anything from working.
This one might actually help.
Comment 8 Luca Ognibene 2005-04-20 19:56:13 UTC
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
Comment 9 Luca Ognibene 2005-04-20 19:58:47 UTC
Created attachment 45498 [details]
output of GST_DEBUG=GST_PLUGIN_LOADING:5 sudo gst-register &> log

(open the file with less -r log)
Comment 10 Ronald Bultje 2005-04-22 10:05:14 UTC
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.
Comment 11 Ronald Bultje 2005-04-22 15:36:20 UTC
Also, please provide a diff -u patch, instead of plain diff. :).
Comment 12 Jonathan Matthew 2005-04-22 22:37:45 UTC
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?)
Comment 13 Zaheer Abbas Merali 2005-05-03 11:29:44 UTC
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
Comment 14 Thomas Vander Stichele 2005-05-03 12:36:58 UTC
commited to 0.8 branch, and adapted and commited for HEAD as well.  thanks, closing.
Comment 15 Ronald Bultje 2005-05-18 21:13:48 UTC
*** Bug 171100 has been marked as a duplicate of this bug. ***
Comment 16 Benjamin Reed 2005-05-19 04:06:44 UTC
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)
Comment 17 Ronald Bultje 2005-05-19 09:12:21 UTC
gst-player is dead. Use totem. ;).