[vlc-commits] commit: Prevent loading KDE plugins for Qt4 ( Rémi Denis-Courmont )

git at videolan.org git at videolan.org
Tue Jun 1 23:30:34 CEST 2010


vlc/vlc-1.1 | branch: master | Rémi Denis-Courmont <remi at remlab.net> | Sun May 30 11:28:26 2010 +0300| [baaca1410f95299ae44b0840db86fb3ea56ab620] | committer: Rémi Denis-Courmont 

Prevent loading KDE plugins for Qt4

Since they cause crashes pretty much all the time (KDE bug #234484).

Fixes: LP#408719, Debian #580396.

> http://git.videolan.org/gitweb.cgi/vlc/vlc-1.1.git/?a=commit;h=baaca1410f95299ae44b0840db86fb3ea56ab620
---

 bin/override.c |   11 +++++++++++
 bin/vlc.c      |    9 ---------
 2 files changed, 11 insertions(+), 9 deletions(-)

diff --git a/bin/override.c b/bin/override.c
index 02402d5..e19ed2b 100644
--- a/bin/override.c
+++ b/bin/override.c
@@ -280,6 +280,17 @@ int (*XSetIOErrorHandler (int (*handler) (Display *))) (Display *)
     return CALL(XSetIOErrorHandler, handler);
 }
 #endif
+
+/*** Buggy shared objects ***/
+#include <string.h>
+
+void *dlopen (const char *path, int flag)
+{
+    if (strstr (path, "/gui_platform/libkde.so"))
+        return NULL; /* Oh no, not that one! */
+    return CALL(dlopen, path, flag);
+}
+
 #else
 void vlc_enable_override (void)
 {
diff --git a/bin/vlc.c b/bin/vlc.c
index ab421f0..5b2259d 100644
--- a/bin/vlc.c
+++ b/bin/vlc.c
@@ -199,14 +199,5 @@ int main( int i_argc, const char *ppsz_argv[] )
     for (int i = 2; i < argc; i++)
         LocaleFree (argv[i]);
 
-#ifdef RTLD_NOLOAD
-    /* Avoid crash in KIO scheduler cleanup. */
-    /* This is ugly, but we get way too many crash reports due to this. */
-    if (dlopen ("libkfilemodule.so", RTLD_LAZY|RTLD_LOCAL|RTLD_NOLOAD) != NULL)
-    {
-        fprintf (stderr, "KFile plugin present. Unclean shutdown!\n");
-        _exit (0);
-    }
-#endif
     return 0;
 }



More information about the vlc-commits mailing list