Delivered-To: garrigue at math.nagoya-u.ac.jp Delivered-To: lablgtk at yquem.inria.fr From: Yoann Padioleau To: Olivier Andrieu Subject: Re: [Lablgtk] bus error when use threads and native mode on Mac Thread-Topic: [Lablgtk] bus error when use threads and native mode on Mac Thread-Index: AQHLVkqFQ7EPOHalsEi9nhCMIXVMRZMWZygA Date: Fri, 17 Sep 2010 10:00:46 +0000 Message-ID: References: <2A3284AC-8CF8-40B6-9CD6-6240A2977A73 at facebook.com> In-Reply-To: Accept-Language: en-US Content-Language: en-US Content-Type: text/plain; charset="iso-8859-1" Content-ID: <9ac75956-fed6-4117-8d3c-0cbbbb13467a> Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Cc: "lablgtk at yquem.inria.fr" , Yoann Padioleau Status: U On Sep 17, 2010, at 2:27 AM, Olivier Andrieu wrote: > Hi, >=20 > On Fri, Sep 17, 2010 at 11:02, Yoann Padioleau wrote: >> Hi, >>=20 >> I am trying to use threads in my lablgtk application but it crashes (I a= m on Mac OS) >> in native mode with a mysterious "Bus Error". >> I have linked my program with -thread and use >> GtkThread.main (); >> in the main but it does not work. It works nice in bytecode mode though. >>=20 >> My program displays some fancy graphics with cairo and then run in the b= ackground using a thread >> some heavy computation that I access on demand from the main thread when= the user click >> on certain things. >>=20 >> My code also uses GMain.Idle and Gmain.Timeout (don't know if it's relev= ant). >=20 > 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-Thread= s.description Thanks. But why my program works in bytecode mode then, and not in native m= ode ? BTW thanks for ocamlcairo :) >=20 > =AB Idles, timeouts, and input functions from GLib, such as > g_idle_add(), are executed outside of the main GTK+ lock. =BB >=20 > --=20 > Olivier _______________________________________________ Lablgtk mailing list Lablgtk@yquem.inria.fr http://yquem.inria.fr/cgi-bin/mailman/listinfo/lablgtk