Re: Balsa git version, SIGSEGV



Hi Jean-Luc!

On 06/09/2012 01:16:15 PM Sat, Jean-Luc Coulon (f5ibh) wrote:
Hi,

I experience crashes of balsa.
If I left it alone for a while, it disapears...

I've lauched it from gdb and you will find attached the backtrace.

Thanks for the backtrace!

It's not clear to me what's happening. Somehow a non-NULL mailbox in the caller is becoming NULL in the called function. The only recent change anywhere in that stack is 82f0d6822a2f7eded61986f18df6219bb2f3787d, which added the g_warning when Balsa locks a subthread, resulting in the warning at the top of your gdb log. I don't see how it could be relevant, but you could revert that commit by reversing the attached patch. Please let us know if it helps.

The warning is useful in tracking down places where Balsa is preparing to call some Gtk function from a subthread. That practice is now frowned upon, and the thread-locking API will be deprecated and removed some time soon. Many places have already been fixed; that code path for filtering messages is one that has not yet had any attention.

Best,

Peter
diff --git a/libbalsa/libbalsa.c b/libbalsa/libbalsa.c
index 9c5aec3..c81ac13 100644
--- a/libbalsa/libbalsa.c
+++ b/libbalsa/libbalsa.c
@@ -758,6 +758,9 @@ libbalsa_threads_enter(void)
 
     self = pthread_self();
 
+    if (libbalsa_am_i_subthread())
+        g_warning("Locking a subthread");
+
     if (self != libbalsa_threads_id) {
         pthread_mutex_lock(&libbalsa_threads_mutex);
         libbalsa_threads_id = self;

Attachment: pgpruD3eMwSoL.pgp
Description: PGP signature



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