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:received:received:message-id:date:from:reply-to :user-agent:mime-version:cc:subject:references:in-reply-to :x-enigmail-version:openpgp:content-type:content-transfer-encoding; bh=zUBwLqGTS6FT8ZIo+0H0sK9hsPHSRnzTEfLmcEfQqpA=; b=IGuma5u6XTiNMMtOmvfhl7PgsZA6hk0CCrPx7I+W2PNsCtUTR/U0E5jHD2qYrRNQ0F 9WTzZoXYb7hEuQnOZblCvbrzlUm3uEwMAqkEIQnREts/BasORPlIlwMtrlmJQHg5Lvpk 3Ig3TmanoqoJFVcz4lrUB1k1R7GDAuGiuP1z4= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=message-id:date:from:reply-to:user-agent:mime-version:cc:subject :references:in-reply-to:x-enigmail-version:openpgp:content-type :content-transfer-encoding; b=EIlz/s2TSPUPLdYAhERHRrOOOSp9ltt4J9HdwQ67WEboX+fkfSGxdudmx75JZNCleE rg3v++WjuV7/KMMhq3AqNBNxxw84jdnsUq9IQTV5B43zBTnrkSlOv5rK0ldb0S5BmH3N V4z9jhMBJzv1PWIDCCk+zhSw2g0aPfsVnhJeQ= Message-ID: <48D017CE.6080007 at gmail.com> Date: Tue, 16 Sep 2008 22:32:14 +0200 From: Matthieu Dubuget MIME-Version: 1.0 Cc: lablgtk at yquem.inria.fr Subject: Re: [Lablgtk] GlGtk + Thread? References: <48CD7229.6000503 at gmail.com> <20080916.080534.169572238.garrigue@math.nagoya-u.ac.jp> In-Reply-To: <20080916.080534.169572238.garrigue at math.nagoya-u.ac.jp> OpenPGP: id=F60AB8F5 Content-Transfer-Encoding: 8bit Reply-To: matthieu.dubuget at gmail.com Content-Type: text/plain; charset=ISO-8859-1 Content-Length: 1337 Jacques Garrigue a écrit : > I'm not sure of the reason, but it probably means that GL doesn't like > to be called from different threads. Usually this problem of calling > threads rather happens on windows, but apparently with GL this is the > case for Unix too. The solution is to look at the explanations in > GtkThread.mli, and issue all GL related calls through GtkThread.sync > or GtkThread.async. > Note that of course all calls directly from callbacks should be safe > without wrappers, since they are called from the GUI thread > themselves. > > Tell us whether it solves your problem. Thanks for your answer. Unfortunately, it did not work. I tried to insert sync calls, but could not find where to put them: The first GL related function is GlGtk.area. But it would seem strange to call this function through GtkThread.sync? It is in the main thread, isn't it? All the other calls are from callbacks. The GlGtk-WARNING is displayed when the "display" callback is called only. Even if this callback is a void function. If I suppress the area#connect#display call, the warning disappears, but when the program end, there is a segmentation error. Salutations Matthieu _______________________________________________ Lablgtk mailing list Lablgtk@yquem.inria.fr http://yquem.inria.fr/cgi-bin/mailman/listinfo/lablgtk