On Sun, 12 Feb 2006, Jean-Marc Lasgouttes wrote:
> Stephen> http://lwn.net/Articles/144021/ "-Squash the "Mutex destroy
> Stephen> failure" warning when shutting down LyX [Qt only]. Prevents a
> Stephen> core dump on NetBSD."
>
> Actually, this fix created a crash in som cases, so it was reverted.
I maintain the pkgsrc (which is also used on NetBSD) packages for LyX. I
include this patch:
$NetBSD: patch-ab,v 1.6 2006/01/18 21:00:45 reed Exp $
--- src/frontends/qt2/lyx_gui.C.orig 2006-01-18 12:25:08.000000000
-0800
+++ src/frontends/qt2/lyx_gui.C 2006-01-18 12:33:05.000000000 -0800
@@ -122,8 +122,22 @@
LQApplication::~LQApplication()
-{}
-
+{
+/* revision 1.30.2.11 says:
+ * "Don't unlock QApplication's mutex as it leads to undefined behaviour
+ * (and crashes NetBSD)".
+ *
+ * Really the problem was that checking for locked() on NetBSD
+ * for some unknown reason did not work. It did not crash, but just
+ * core dumped when exiting due to "Destroying locked mutex".
+ *
+ * The "lyx: Error detected by libpthread: Destroying locked mutex."
+ * problem still continues on NetBSD, so re-adding the following:
+ */
+#if defined(__NetBSD__) && defined(QT_THREAD_SUPPORT)
+ unlock();
+#endif
+}
#ifdef Q_OS_MAC
bool LQApplication::macEventFilter(EventRef event)
Arun: what operating system are you using?
Jeremy C. Reed
BSD News, BSD tutorials, BSD links
http://www.bsdnewsletter.com/