On Thu, Jan 29, 2009 at 4:44 PM, Prof Brian Ripley <rip...@stats.ox.ac.uk>wrote:
> What did your actual application do? This seems a very strange thing to > do, and the segfault is in trying to construct the traceback. > > Only by using do.call on the object (and not even by name) do I get this > error. E.g. > > `[.data.frame`(1:10, 3) >> > Error in NextMethod("[") : object not specified > >> do.call("[.data.frame", list(1:10, 3)) >> > Error in NextMethod("[") : object not specified > > are fine. > > Obviously it would be nice to fix this, but I'd like to understand the > actual circumstances: there is more to it than the subject line. Yes, there is more. For reporting the problem, we tried to pare it down to a concise, self-contained test case. My boss was debugging an issue in our R code. We have our own "[...." functions, because stock R drops names when subscripting. To bypass our now-suspect functions and get the "real" subscripting method, he used "get" from package:base. He was examining a large object, and believing it was a data frame, chose "[.data.frame". As it turns out, that object was not a data frame, and he got an unexpected segfault. I think it was a matrix. But it doesn't matter -- a vector as in the test case will give the same. We have since fixed the bug in our replacement subscripting function, so the issue might not affect us any more. Thanks, /Christian > On Thu, 29 Jan 2009, brechbueh...@gmail.com wrote: > > Full_Name: Christian Brechbuehler >> Version: 2.7.2, 2.8.1 >> OS: linux-gnu >> >> If we mistakenly believe the object is a data frame (as we did in a much >> more >> complicated real situation), this happens: >> >> > do.call(get("[.data.frame",pos="package:base"),list(1:10,3)) >> Error in NextMethod("[") : >> no calling generic was found: was a method called directly? >> >> *** caught segfault *** >> address (nil), cause 'unknown' >> >> Process R:2 segmentation fault (core dumped) at Thu Jan 29 09:26:29 2009 >> >> The Error message is appropriate. But the segmentation fault is >> unexpected. >> > [[alternative HTML version deleted]] ______________________________________________ R-devel@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-devel