Attached is a patch that I hacked together based off https://mail.gnome.org/archives/commits-list/2012-November/msg04029.html. It seems to work for me, but I'm not sure whether it's the best way to do it.

--
Andrew Donnellan              OzLabs, ADL Canberra
andrew.donnel...@au1.ibm.com  IBM Australia Limited
Description: Add call to XInitThreads() to prevent segfault

Currently pinpoint runs into a segfault in some Xlib code due to an
uninitialised mutex.

Add a call to XInitThreads() at the beginning of the program to ensure
Xlib mutexes are initialised correctly.

Patch based on https://mail.gnome.org/archives/commits-list/2012-November/msg04029.html

Bug-Debian: https://bugs.debian.org/823755
Author: Andrew Donnellan <andrew.donnel...@au1.ibm.com>

---
The information above should follow the Patch Tagging Guidelines, please
checkout http://dep.debian.net/deps/dep3/ to learn about the format. Here
are templates for supplementary fields that you might want to add:

Origin: <vendor|upstream|other>, <url of original patch>
Bug: <url in upstream bugtracker>
Bug-Debian: https://bugs.debian.org/<bugnumber>
Bug-Ubuntu: https://launchpad.net/bugs/<bugnumber>
Forwarded: <no|not-needed|url proving that it has been forwarded>
Reviewed-By: <name and email of someone who approved the patch>
Last-Update: 2018-09-11

--- pinpoint-0.1.8.orig/configure.ac
+++ pinpoint-0.1.8/configure.ac
@@ -27,7 +27,7 @@ AC_PROG_SED
 PKG_PROG_PKG_CONFIG
 AC_HEADER_STDC
 
-PINPOINT_DEPS="clutter-gtk-1.0 >= 1.6 clutter-1.0 >= 1.23.7 gio-2.0 >= 2.26 cairo-pdf pangocairo gdk-pixbuf-2.0"
+PINPOINT_DEPS="clutter-gtk-1.0 >= 1.6 clutter-1.0 >= 1.23.7 gio-2.0 >= 2.26 cairo-pdf pangocairo gdk-pixbuf-2.0 x11"
 
 AS_COMPILER_FLAGS([MAINTAINER_CFLAGS], [-Wall])
 AC_SUBST(MAINTAINER_CFLAGS)
--- pinpoint-0.1.8.orig/pinpoint.c
+++ pinpoint-0.1.8/pinpoint.c
@@ -35,6 +35,10 @@
 #include <clutter-gst/clutter-gst.h>
 #endif
 
+#ifdef GDK_WINDOWING_X11
+#include <X11/Xlib.h>
+#endif
+
 /* Probably time to create a PinPointPresentation type */
 
 GList *pp_slides      = NULL; /* list of slide text */
@@ -194,6 +198,14 @@ main (int    argc,
   GError *error = NULL;
   char   *text  = NULL;
 
+#ifdef GDK_WINDOWING_X11
+  if (XInitThreads () == 0)
+    {
+      g_critical ("Initialising threading support failed.");
+      return EXIT_FAILURE;
+    }
+#endif
+
   memcpy (&default_point, &pin_default_point, sizeof (default_point));
   renderer = pp_clutter_renderer ();
 

Reply via email to