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:sender:received :in-reply-to:references:date:x-google-sender-auth:message-id:subject :from:to:cc:content-type:content-transfer-encoding; bh=Cz1q2eyZd6rRONLgzBmjUnCYaHh94/dB2GZLi43uRtg=; b=mFlzOHoPJmVUisxeAewifdBU32K+wvNw0mpSv4K9OQ24wqQ+qf1QT//PW52WT/YGeH LdbtdvPPP0jDklrnjZUPQ4VOGppqMG+lY+OffaCJlTkobci69pZLX4wh9z3S2MoJekhY QJFBiYyNgQDM2lpRTyXecf2eecdTXXV1IZ1VA= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:sender:in-reply-to:references:date :x-google-sender-auth:message-id:subject:from:to:cc:content-type :content-transfer-encoding; b=hLKlboPRgkvzp6VxnYQjdHySCLOS1EZMOgrj1ICL6g19wUi47VhTMCExQvA1+RSGnU udQnyyAUwvCq8w0QbaVHRlfnHJrIkIH3JVu7YYOpWQYUjQ6y6YygYW99fUo14Jwt4yG3 wfhH88vWmUgQbBjvwuQ4RueGhCr8B9sMbdIgc= MIME-Version: 1.0 In-Reply-To: <20100913205658.026ac951.pdgroves at gmail.com> References: <20100913205658.026ac951.pdgroves at gmail.com> Date: Tue, 14 Sep 2010 16:36:12 +0900 Message-ID: Subject: Re: [Lablgtk] segfault when reattaching a tree model to a tree view From: Jacques Garrigue To: Peter Groves Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Cc: Lablgtk at yquem.inria.fr Status: U Dear Peter, I tried to do the same kind of thing with the tree_model.ml example, and I don't see any segmentation fault when setting the model again. Can you show some code. Also the version numbers of lablgtk and gtk, and the platform used, would be useful. Jacques On Tue, Sep 14, 2010 at 10:56 AM, Peter Groves wrote: > Hi, > > I'm trying to speed up a tree view using the hints in the tutorial > found here: > > http://plus.kaist.ac.kr/~shoh/ocaml/lablgtk2/treeview-tutorial/ch03s03.ht= ml#sec-treestore-adding-many-rows > > My problem is slightly different than the one described in the > tutorial, however. I'm not replacing rows in the table but just > changing the values in a single column. The column is booleans in the > model and "cell_renderer_toggle" in the view, which basically means > that one of the columns in the table contains a checkbox for every row. > The slow performance occurs when I try to set the values of all the > checkboxes in a batch. I have also tried disabling sorting, but that > did not seem to make any difference. > > So now I'm trying to detach the model from the view while I do the > batch update, then reattach them. I'm able to detach the model from the > view using: > > =A0- self.treeView#set_model None; > > =A0- Then I update the model by using an 'iter' over all the rows in the > =A0 =A0model. > > =A0- Finally, I try to replace the model with: > =A0 =A0self.treeView#set_model (Some(self.treeModel#coerce)); > > It segFaults on the last step. Are there any suggestions for what might > be going wrong or any way to debug this? > > Thanks, > Peter > > _______________________________________________ > Lablgtk mailing list > Lablgtk@yquem.inria.fr > http://yquem.inria.fr/cgi-bin/mailman/listinfo/lablgtk > _______________________________________________ Lablgtk mailing list Lablgtk@yquem.inria.fr http://yquem.inria.fr/cgi-bin/mailman/listinfo/lablgtk