Delivered-To: garrigue at math.nagoya-u.ac.jp Authentication-Results: mailhost.math.nagoya-u.ac.jp sender=lablgtk-bounces at yquem.inria.fr; domainkey=neutral (no query protocol specified; no policy for yquem.inria.fr) Delivered-To: lablgtk at yquem.inria.fr DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:received:in-reply-to :references:date:message-id:subject:from:to:cc:content-type :content-transfer-encoding; bh=OWj0CFhImBhGfDOeWyU/vL0iCCdFiCjy2ztS/20ixYE=; b=tGYk9NYMJcL3gOs8Rx98c1MkbbY1YIp3VwEgqP0Pw8QnGtuvIQMuBObMRfYFJXP4GC GcUxzHHXPkPnLQduIASjCL2JrDue4v657FvzGMJALM/rvrfgjN/xBcjUF7sCtR4MGRah vCXHhc7LYgyXIP6gBP1aB98yOIvVZolX2z8wI= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type:content-transfer-encoding; b=RIwRdU+IYdfybwfCrHG1DijEflEVUYel8lwQtRg+vj+umZntnGQDJOYhc+5HncCuUj +cN3KslkoNFXuo++m61gBEsnVmERlGYTUFQ+b5iH2UuVxeL1/ydZvyftDKchBHKQB12+ kNd5aN+PcjScei/W7e7d+3x9FyHw2u0bMsml8= MIME-Version: 1.0 In-Reply-To: <2A3284AC-8CF8-40B6-9CD6-6240A2977A73 at facebook.com> References: <2A3284AC-8CF8-40B6-9CD6-6240A2977A73 at facebook.com> Date: Fri, 17 Sep 2010 11:27:16 +0200 Message-ID: Subject: Re: [Lablgtk] bus error when use threads and native mode on Mac From: Olivier Andrieu To: Yoann Padioleau Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Cc: "lablgtk at yquem.inria.fr" Status: U Hi, On Fri, Sep 17, 2010 at 11:02, Yoann Padioleau wrote: > Hi, > > I am trying to use threads in my lablgtk application but it crashes (I am= on Mac OS) > in native mode with a mysterious "Bus Error". > I have linked my program with -thread and use > =A0GtkThread.main (); > in the main but it does not work. It works nice in bytecode mode though. > > My program displays some fancy graphics with cairo and then run in the ba= ckground using a thread > some heavy computation that I access on demand from the main thread when = the user click > on certain things. > > My code also uses GMain.Idle and Gmain.Timeout (don't know if it's releva= nt). It might ! Timeout and idle callbacks have different rules than the usual widget event callbacks wrt. threading. cf. http://library.gnome.org/devel/gdk/stable/gdk-Threads.html#gdk-Threads.= description =AB Idles, timeouts, and input functions from GLib, such as g_idle_add(), are executed outside of the main GTK+ lock. =BB --=20 Olivier _______________________________________________ Lablgtk mailing list Lablgtk@yquem.inria.fr http://yquem.inria.fr/cgi-bin/mailman/listinfo/lablgtk