! Please note that this is a snapshot of our old Bugzilla server, which is read only since May 29, 2020. Please go to gitlab.xfce.org for our new server !
Xfmedia-svn crashes when trying to load plugins
Status:
RESOLVED: FIXED
Product:
Xfmedia
Component:
plugins

Comments

Description Landry Breuil editbugs 2006-11-06 16:16:03 CET
A fresh build of xfmedia crashes when it tries to load the default plugin (infopipe).
If i mv /local/lib/xfmedia/plugins /tmp, it works fine.
Video/Music playback is ok, running xine-lib-1.1.2. 

Starting program: /local/bin/xfmedia
/local/bin/xfmedia:/local/lib/xfmedia/plugins/xfmedia-infopipe.so: undefined symbol 'xfmedia_engine_get_current_time'
/local/bin/xfmedia:/local/lib/xfmedia/plugins/xfmedia-infopipe.so: undefined symbol 'xfmedia_plugin_set_website'
/local/bin/xfmedia:/local/lib/xfmedia/plugins/xfmedia-infopipe.so: undefined symbol 'xfmedia_playlist_get_selected'
/local/bin/xfmedia:/local/lib/xfmedia/plugins/xfmedia-infopipe.so: undefined symbol 'xfmedia_plugin_set_author'
/local/bin/xfmedia:/local/lib/xfmedia/plugins/xfmedia-infopipe.so: undefined symbol 'xfmedia_playlist_get_n_entries'
/local/bin/xfmedia:/local/lib/xfmedia/plugins/xfmedia-infopipe.so: undefined symbol 'xfmedia_info_get_audio_info'
/local/bin/xfmedia:/local/lib/xfmedia/plugins/xfmedia-infopipe.so: undefined symbol 'xfmedia_plugin_set_date'
/local/bin/xfmedia:/local/lib/xfmedia/plugins/xfmedia-infopipe.so: undefined symbol 'xfmedia_info_get_name'
/local/bin/xfmedia:/local/lib/xfmedia/plugins/xfmedia-infopipe.so: undefined symbol 'xfmedia_plugin_set_license'
/local/bin/xfmedia:/local/lib/xfmedia/plugins/xfmedia-infopipe.so: undefined symbol 'xfmedia_engine_get_total_time'
/local/bin/xfmedia:/local/lib/xfmedia/plugins/xfmedia-infopipe.so: undefined symbol 'xfmedia_plugin_set_version'
/local/bin/xfmedia:/local/lib/xfmedia/plugins/xfmedia-infopipe.so: undefined symbol 'xfmedia_info_get_video_info'
/local/bin/xfmedia:/local/lib/xfmedia/plugins/xfmedia-infopipe.so: undefined symbol 'xfmedia_engine_get_status'
/local/bin/xfmedia:/local/lib/xfmedia/plugins/xfmedia-infopipe.so: undefined symbol 'xfmedia_plugin_set_description'
/local/bin/xfmedia:/local/lib/xfmedia/plugins/xfmedia-infopipe.so: undefined symbol 'xfmedia_interface_get_session_number'
/local/bin/xfmedia:/local/lib/xfmedia/plugins/xfmedia-infopipe.so: undefined symbol 'xfmedia_info_get_location'
/local/bin/xfmedia:/local/lib/xfmedia/plugins/xfmedia-infopipe.so: undefined symbol 'xfmedia_engine_get_speed'
/local/bin/xfmedia:/local/lib/xfmedia/plugins/xfmedia-infopipe.so: undefined symbol 'xfmedia_plugin_get_playlist'
/local/bin/xfmedia:/local/lib/xfmedia/plugins/xfmedia-infopipe.so: undefined symbol 'xfmedia_plugin_set_name'

Program received signal SIGSEGV, Segmentation fault.
[Switching to process 12428, thread 0x882d9000]
0x0000142e in ?? ()
(gdb) bt
#0  0x0000142e in ?? ()
#1  0x0cc5e0b2 in xfmedia_plugin_get () from /local/lib/xfmedia/plugins/xfmedia-infopipe.so
#2  0x1c03cbca in xfmedia_plugins_load ()
#3  0x1c0109c9 in main ()
Comment 1 Brian J. Tarricone (not reading bugmail) 2006-11-27 03:18:25 CET
Not sure why this is happening.  Maybe OpenBSD doesn't support resolving all symbols at load time?  (That's the gmodule default, so I can't explicitly set it.)  Best you can do is try to provide a backtrace against a debug build (pass --enable-debug=yes to configure), but otherwise I don't see how I can fix this.

Actually, the plugin API versioning system should have caught this and refused to load it, but I haven't been updating the plugin API version when incompatible changes are made.  That's because the plugin API is more or less broken and unusable.  I'll just disable it entirely for now.
Comment 2 Landry Breuil editbugs 2006-11-27 13:17:07 CET
with r-23988, compiled with :
AUTOCONF_VERSION=2.60 LDFLAGS='-L/usr/local/lib -lpthread' CFLAGS='-I/usr/local/include' ./autogen.sh --prefix=/local --enable-debug=yes && gmake clean && gmake && gmake install

Dunno about symbols resolution at load time on openbsd.. here is the full trace and nm :
(gdb) run
Starting program: /local/bin/xfmedia
DBG[main.c:447] main(): calling XInitThreads()
DBG[xfmedia-xine.c:1172] xfmedia_xine_realize(): creating audio driver
DBG[xfmedia-xine.c:772] load_audio_out_driver(): trying audio driver auto
DBG[xfmedia-xine.c:1183] xfmedia_xine_realize(): creating video XWindow
DBG[xfmedia-xine.c:1195] xfmedia_xine_realize(): opening a new XDisplay
DBG[xfmedia-xine.c:1205] xfmedia_xine_realize(): locking display
DBG[xfmedia-xine.c:1237] xfmedia_xine_realize(): unlocking display
DBG[xfmedia-xine.c:1243] xfmedia_xine_realize(): creating stream
DBG[xfmedia-xine.c:1248] xfmedia_xine_realize(): creating xine event queue
DBG[mainwin.c:472] xfmedia_mainwin_new(): setting up xfx signals
DBG[mainwin.c:488] xfmedia_mainwin_new():   done
DBG[xfmedia-playlist-queue.c:364] xfmedia_playlist_queue_new(): setting queue window to 333x109
DBG[remote.c:596] xfmedia_remote_init(): got ownership with id 0
DBG[remote.c:612] xfmedia_remote_init(): Successfully registered remote with session id 0.
/local/bin/xfmedia:/local/lib/xfmedia/plugins/xfmedia-infopipe.so: undefined symbol 'xfmedia_engine_get_current_time'
/local/bin/xfmedia:/local/lib/xfmedia/plugins/xfmedia-infopipe.so: undefined symbol 'xfmedia_plugin_set_website'
/local/bin/xfmedia:/local/lib/xfmedia/plugins/xfmedia-infopipe.so: undefined symbol 'xfmedia_playlist_get_selected'
/local/bin/xfmedia:/local/lib/xfmedia/plugins/xfmedia-infopipe.so: undefined symbol 'xfmedia_plugin_set_author'
/local/bin/xfmedia:/local/lib/xfmedia/plugins/xfmedia-infopipe.so: undefined symbol 'xfmedia_playlist_get_n_entries'
/local/bin/xfmedia:/local/lib/xfmedia/plugins/xfmedia-infopipe.so: undefined symbol 'xfmedia_info_get_audio_info'
/local/bin/xfmedia:/local/lib/xfmedia/plugins/xfmedia-infopipe.so: undefined symbol 'xfmedia_plugin_set_date'
/local/bin/xfmedia:/local/lib/xfmedia/plugins/xfmedia-infopipe.so: undefined symbol 'xfmedia_info_get_name'
/local/bin/xfmedia:/local/lib/xfmedia/plugins/xfmedia-infopipe.so: undefined symbol 'xfmedia_plugin_set_license'
/local/bin/xfmedia:/local/lib/xfmedia/plugins/xfmedia-infopipe.so: undefined symbol 'xfmedia_engine_get_total_time'
/local/bin/xfmedia:/local/lib/xfmedia/plugins/xfmedia-infopipe.so: undefined symbol 'xfmedia_plugin_set_version'
/local/bin/xfmedia:/local/lib/xfmedia/plugins/xfmedia-infopipe.so: undefined symbol 'xfmedia_info_get_video_info'
/local/bin/xfmedia:/local/lib/xfmedia/plugins/xfmedia-infopipe.so: undefined symbol 'xfmedia_engine_get_status'
/local/bin/xfmedia:/local/lib/xfmedia/plugins/xfmedia-infopipe.so: undefined symbol 'xfmedia_plugin_set_description'
/local/bin/xfmedia:/local/lib/xfmedia/plugins/xfmedia-infopipe.so: undefined symbol 'xfmedia_interface_get_session_number
Program received signal SIGSEGV, Segmentation fault.
[Switching to process 10244, thread 0x7e910000]
0x0000150e in ?? ()
(gdb) bt
#0  0x0000150e in ?? ()
#1  0x0575f205 in xfmedia_plugin_get (plugin=0x7d7c85f0, error=0xcf7d38c8) at xfmedia-infopipe.c:262
#2  0x1c03e8d2 in xfmedia_plugins_load (mwin=0x89148300) at xfmedia-plugin.c:514
#3  0x1c011055 in main (argc=1, argv=0xcf7d3e14) at main.c:542
(gdb) bt full
#0  0x0000150e in ?? ()
No symbol table info available.
#1  0x0575f205 in xfmedia_plugin_get (plugin=0x7d7c85f0, error=0xcf7d38c8) at xfmedia-infopipe.c:262
        ipdata = (InfopipeData *) 0x4
#2  0x1c03e8d2 in xfmedia_plugins_load (mwin=0x89148300) at xfmedia-plugin.c:514
        gm = (GModule *) 0x8b6be9c0
        err = (GError *) 0x0
        xfmedia_plugin_check_version = (gboolean (*)(gint, gint, gint)) 0x575f37c <xfmedia_plugin_check_version>
        plugin = (XfmediaPlugin *) 0x7d7c85f0
        xfmedia_plugin_get = (gboolean (*)(XfmediaPlugin *, GError **)) 0x575f1d0 <xfmedia_plugin_get>
        dir = (GDir *) 0x85962a50
        plugin_dirs = {0x85969d00 "®", 0x8b6be820 "/local/lib/xfmedia/plugins"}
        fullpath = "/local/lib/xfmedia/plugins/xfmedia-infopipe.so\000ÏÈ=}Ï€r\f%ÿÿÿÿ\000\000\000\000^\000\000\000\000\000\000\000\210:}ÏÁs\n\004$\202\t$ð\223\t$\210:}Ï£s\n\004\024>}Ï\000\000\000\000`9}Ï\000\000\221~ìõó*\000\000\000\000\211Ÿ\020\005\037\000\000\000\226\002 \000\034<}ÏÈ:}ÏÁs\n\004Àék\213ð\223\t$È:}Ï£s\n\004²c\000<\001\000\000\000 9}Ï\000\000\221~", '\0' <repeats 24 times>, "\b;}ÏÁs\n\004\200\202e\205ð\223"...
        i = 1
        file = (const gchar *) 0x81fc4020 "xfmedia-infopipe.so"
#3  0x1c011055 in main (argc=1, argv=0xcf7d3e14) at main.c:542
        xfx = (GtkWidget *) 0x86ead010
        video_window = (GtkWidget *) 0x85248008
        mwin = (XfmediaMainwin *) 0x89148300
        i = 1
        fd = 8
        defer = 0
        do_autoplay = 0
        seed = 2203836612
        x = 1431
        y = 180
        ppos = 0
        next_arg = 1
        session_client = (ExoXsessionClient *) 0x8afcbae0
        odata = {is_remote_cmd = 0, session_id = -1, is_enqueue = 0, verbose_level = 0, use_fullscreen = 0, use_autoplay = 0,
  dont_load_playlist = 0, vwin_geom_flags = 0, vwin_geom = {x = 0, y = 0, width = 0, height = 0}}
        session_argv = {0xcf7d3fac "/local/bin/xfmedia"}
        winicon = (GdkPixbuf *) 0x7e0fe120
        video_port_id = (const gchar *) 0x8421c0f0 "auto"

and the symbols are effectively present :
nm /local/lib/xfmedia/plugins/xfmedia-infopipe.so | grep xfmedia
00000000 F xfmedia-infopipe.c
         U xfmedia_engine_get_current_time
         U xfmedia_engine_get_speed
         U xfmedia_engine_get_status
         U xfmedia_engine_get_total_time
         U xfmedia_info_get_audio_info
         U xfmedia_info_get_location
         U xfmedia_info_get_name
         U xfmedia_info_get_video_info
         U xfmedia_interface_get_session_number
         U xfmedia_playlist_get_n_entries
         U xfmedia_playlist_get_selected
0000237c T xfmedia_plugin_check_version
000021d0 T xfmedia_plugin_get
         U xfmedia_plugin_get_playlist
         U xfmedia_plugin_set_author
         U xfmedia_plugin_set_date
         U xfmedia_plugin_set_description
         U xfmedia_plugin_set_license
         U xfmedia_plugin_set_name
         U xfmedia_plugin_set_version
         U xfmedia_plugin_set_website
Comment 3 Brian J. Tarricone (not reading bugmail) 2006-11-27 14:46:43 CET
Created attachment 887 
fix-dynamic-binding.diff

No, the 'U' character in nm output means the symbol is unresolved.  This is correct in this instance, as the plugins pull their symbols in from the xfmedia binary.

Can you try the attached patch?  It forces the xfmedia binary to export its symbols.  You'll need to rerun autogen.sh after applying.
Comment 4 Brian J. Tarricone (not reading bugmail) 2006-11-27 14:49:03 CET
Reopening.  If this works, though, the better solution would be to move all this stuff out into a library...

BTW, if there's any chance you could test this soon, I'd appreciate it.  I'd like to get 0.9.2 out today.  The only thing stopping me is that my web host provider is broken and my website is down :-P
Comment 5 Landry Breuil editbugs 2006-11-27 15:32:49 CET
With your patch, it works fine, i've just tested infopipe with great success :)
I mark the bug fixed, i think you can roll 0.9.2 tarballs !

[16:28:01] lbreuil@begbie:~/local/xfce-svn/xfmedia/ $cat /tmp/xfmedia-infopipe.1000.0
Status:                  Playing
Now Playing:             (Ben Harper) Piste 02
Filename:                /home/lbreuil/music/Ben Harper - Live Drille/02 - ben_harper - piste_02.mp3
Track Position:          15
Track Length:            407
Audio Codec:             MPEG 1 Layer 3 CBR
Audio Bitrate:           192000
Audio Sample Rate:       44100
Audio Channels:          2
Audio Bits Per Sample:   16
Playlist Length:         1
Current Playlist Index:  -1
Comment 6 Landry Breuil editbugs 2006-11-27 15:44:24 CET
Dunno if it's related to this patch/issue, but even when doing nothing and with an empty playlist xfmedia wastes cpu time:

lbreuil   5653 74.5  2.6 41268 53540 p2  RN     4:37PM    2:37.24 xfmedia

(related to an already opened bug ?)

Bug #2524

Reported by:
Landry Breuil
Reported on: 2006-11-06
Last modified on: 2006-11-27

People

Assignee:
Brian J. Tarricone (not reading bugmail)
CC List:
0 users

Version

Version:
unspecified

Attachments

fix-dynamic-binding.diff (282 bytes, patch)
2006-11-27 14:46 CET , Brian J. Tarricone (not reading bugmail)
no flags

Additional information