[prev in list] [next in list] [prev in thread] [next in thread]
List: xine-cvslog
Subject: [xine-cvs] =?utf-8?q?HG=3A_xine-ui=3A_Fix_shutdown_crash_when_unl?= =?utf-8?q?oading_plugins_that_us
From: Petri_Hintukainen via Xine-cvslog <xine-cvslog () lists ! sourceforge ! net
Date: 2017-11-23 11:04:38
Message-ID: b5bcbb8618250883f59a.1511434873 () hg ! debian ! org
[Download RAW message or body]
# HG changeset patch
# User Petri Hintukainen <phintuka@users.sourceforge.net>
# Date 1511434873 -7200
# Node ID b5bcbb8618250883f59acbc899f0503ae7020aff
# Branch default
# Parent f1f5af1f8e87fb2fff5979c0dc253202392f3710
Fix shutdown crash when unloading plugins that use libGL.so
diff --git a/src/xitk/main.c b/src/xitk/main.c
--- a/src/xitk/main.c
+++ b/src/xitk/main.c
@@ -2307,11 +2307,16 @@
gui_run(session_argv);
- xine_exit(__xineui_global_xine_instance);
-
- visual_anim_done();
- free(pplugins);
-
+ /*
+ * Close X display before unloading modules linked against libGL.so
+ * https://www.xfree86.org/4.3.0/DRI11.html
+ *
+ * Do not close the library with dlclose() until after XCloseDisplay() has
+ * been called. When libGL.so initializes itself it registers several
+ * callbacks functions with Xlib. When XCloseDisplay() is called those
+ * callback functions are called. If libGL.so has already been unloaded
+ * with dlclose() this will cause a segmentation fault.
+ */
XLockDisplay(gui->display);
XUnlockDisplay(gui->display);
XCloseDisplay(gui->display);
@@ -2321,6 +2326,11 @@
XCloseDisplay(gui->video_display);
}
+ xine_exit(__xineui_global_xine_instance);
+
+ visual_anim_done();
+ free(pplugins);
+
if(session_argv_num) {
int i = 0;
------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
Xine-cvslog mailing list
Xine-cvslog@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/xine-cvslog
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic