denemo-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Denemo-devel] New Binaries?


From: Richard Shann
Subject: Re: [Denemo-devel] New Binaries?
Date: Sat, 23 May 2015 14:33:39 +0100

I've been googling "mingw gtk crash moving window" and found a number of
leads

This looks very promising:

https://github.com/gtk2hs/gtk2hs/pull/91
which starts

"There is a bug on Windows with recent versions of gtk (tested with
2.24.24, 2.24.25 and 3.14.8) that causes whole application to freeze
when moving window. Also its mentioned here #33.

The underlying issue is somewhere deep in gtk callback hell where
gdk_threads_enter() is getting called twice resulting in deadlock.

The only reason this issue is not observed in non threaded programs is
becaue gdk_threads_init() is only called when compiling with -threaded.

This workaround simply replaces default gdk locking functions that use
nonrecursive mutex with those that use recursive one."


the code suggested is:

gtk/Graphics/UI/Gtk/General/hsgthread.c
@@ -55,6 +55,18 @@ static GArray* gtk2hs_finalizers;
gboolean gtk2hs_run_finalizers(gpointer data);
+#if defined( WIN32 ) && GLIB_CHECK_VERSION(2,32,0)
+static GRecMutex recursive_mutex;
+
+void imp_rec_lock() {
+ g_rec_mutex_lock(&recursive_mutex);
+}
+
+void imp_rec_unlock() {
+ g_rec_mutex_unlock(&recursive_mutex);
+}
+#endif
+
/* Initialize the default _fmode on WIN32. */
void gtk2hs_initialise (void) {
#if defined( WIN32 ) && defined( GTK2HS_SET_FMODE_BINARY )
@@ -79,6 +91,12 @@ void gtk2hs_threads_initialise (void) {
#else
g_static_mutex_init(&gtk2hs_finalizer_mutex);
#endif
+
+#if defined( WIN32 ) && GLIB_CHECK_VERSION(2,32,0)
+ g_rec_mutex_init(&recursive_mutex);
+
+ gdk_threads_set_lock_functions(imp_rec_lock, imp_rec_unlock);
+#endif
g_thread_init(NULL);
gdk_threads_init();



Other possibilities are

https://bugzilla.redhat.com/show_bug.cgi?id=995059 suggests that 
Disabled sse2 optimization in pixman on my handcrafted mingw GTK+3
toolchain
mingw-pixman-0.30.0-4.fc20 has been pushed to the Fedora 20 stable
repository.

and this:

http://stackoverflow.com/questions/15675751/gtk-window-moved-then-crash


Richard





reply via email to

[Prev in Thread] Current Thread [Next in Thread]