From ripley@stats.ox.ac.uk  Thu Apr 25 07:45:42 2002
From: ripley@stats.ox.ac.uk (Prof Brian D Ripley)
Date: Thu, 25 Apr 2002 07:45:42 +0100 (BST)
Subject: [Rd] understanding and resolving seg faults
In-Reply-To: <20020424205513.A32728@brandybuck>
Message-ID: <Pine.GSO.4.44.0204250732510.24333-100000@auk.stats>

There is no such line in rpart's rpmatrix.c!

My guess is that you are misleading us, and that the segfault is in your
additions to rpart.  One of the issues covered by Open Source licences
is not misrepresenting code by not making clear that you have altered it.

Your debugger will tell you what is wrong with your C coding.  My guess
here is that as deltaI is a pointer to a pointer and you only mentioned
allocating deltaI, you failed to allocate deltaI[0].


On Wed, 24 Apr 2002, Clayton Springer wrote:

> Dear r-devel,
>
> I am mutating rpart to do calculations on trees.
> I am trying to extract information from the tree.
>
> However, I got a seg. fault.
>
>
> This is the offending line in "rpmatrix.c":
>
>             deltaI[0][0] = spl->improve;
>
> (Commenting it out cures the seg fault)

[...]

-- 
Brian D. Ripley,                  ripley@stats.ox.ac.uk
Professor of Applied Statistics,  http://www.stats.ox.ac.uk/~ripley/
University of Oxford,             Tel:  +44 1865 272861 (self)
1 South Parks Road,                     +44 1865 272860 (secr)
Oxford OX1 3TG, UK                Fax:  +44 1865 272595

-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-
r-devel mailing list -- Read http://www.ci.tuwien.ac.at/~hornik/R/R-FAQ.html
Send "info", "help", or "[un]subscribe"
(in the "body", not the subject !)  To: r-devel-request@stat.math.ethz.ch
_._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._


[Rd] understanding and resolving seg faults
Prof Brian D Ripley