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 (domain does not match address; no policy for yquem.inria.fr) Delivered-To: lablgtk at yquem.inria.fr DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=math.nagoya-u.ac.jp; h= date:message-id:to:cc:subject:from:in-reply-to:references :mime-version:content-type:content-transfer-encoding; s=alpha; bh=eL88D0FfaM1i5103GoB4k4KHzL0=; b=iiDW0BpxXloABGD2iUGTgolElTiH TCAzuROWc/DVOamzDRRVv6UubHn6IuhOks0ZtMinAgUcCGViMVaRDNw891KneK0m Wjh9lUNgFDu65jzn52fsizsTyPTsuCzYC2jsc4jnoPQFmJJ4cWqjnpnIi7uUBxiT 4Pm8P+PCVa4xe+E= DomainKey-Signature: a=rsa-sha1; h=Received:Date:Message-Id:To:Cc:Subject:From:In-Reply-To:References:X-Mailer:Mime-Version:Content-Type:Content-Transfer-Encoding; b=WMqvGMvf2FDK1CpJrYAFYY5kr/6B5lwl7gX3nJR0atqoH8CX5W2fpI3zO3oe2WDEzizgeQq1/NxWdQaMGtj9+Q3i1JhSspxdoAGnIBRt722gdkJNxH80Wono0l0N8Wq4JTbVeqJ4W8SakooLrM3fZv0PIIwGwUYmsFgdvYXC5/A=; c=nofws; d=math.nagoya-u.ac.jp; q=dns; s=alpha Date: Sat, 06 Feb 2010 14:25:08 +0900 (JST) Message-Id: <20100206.142508.58450194.garrigue at math.nagoya-u.ac.jp> To: jon at ffconsultancy.com Subject: Re: [Lablgtk] Threading woes From: Jacques Garrigue In-Reply-To: <201002060530.16615.jon at ffconsultancy.com> References: <201002060530.16615.jon at ffconsultancy.com> Mime-Version: 1.0 Content-Type: Text/Plain; charset=us-ascii Content-Transfer-Encoding: 7bit Cc: lablgtk at yquem.inria.fr Status: U From: Jon Harrop > and am compiling with: > > ocamlopt -annot -thread -I +lablgtk2 -I +lablgtkgl2 -I +lablgl lablgl.cmxa > lablgtk.cmxa lablgtkgl.cmxa unix.cmxa threads.cmxa gtkThread.cmx x.ml -o x > > but when I run the resulting program I get a segfault: > > $ ./x > > (process:15948): GLib-GObject-WARNING **: invalid (NULL) pointer instance > > (process:15948): GLib-GObject-CRITICAL **: g_signal_connect_data: assertion > `G_TYPE_CHECK_INSTANCE (instance)' failed > Segmentation fault > > What am I doing wrong? This just looks like you didn't initialize gtk. You need either to add a call to GMain.init or to link with gtkInit.cmx. Cheers, Jacques _______________________________________________ Lablgtk mailing list Lablgtk@yquem.inria.fr http://yquem.inria.fr/cgi-bin/mailman/listinfo/lablgtk