similar to: Segfault: .Call and classes with logical slots

Displaying 20 results from an estimated 1000 matches similar to: "Segfault: .Call and classes with logical slots"

2004 Mar 06
2
.Call: is new attribute of protected object auto-protected
Hi, I have an SEXP obj in a C function called via .Call(). The obj is protected (in fact it is an argument to .Call and therefore automatically protected). If I set an attribute of obj does the attribute become protected too? Here is an example SEXP foo(SEXP obj) { SET_NAMES(obj, NEW_CHARACTER(3)); /* are names protected or not? */ ... } Thanks, Vadim [[alternative HTML version
2012 Sep 15
1
Question about copying arguments in C.
Hi List, I'd imagine this is a question that has been answered before, but I can't seem to track it down, sorry for the duplication if it has. I am writing an interface for a C library and want to return an S4 class from the 'constructing' method. One of the slots of the argument to be returned will be filled with one of the arguments passed to the function. My question is about
2003 Jun 23
3
FW: S4 classes, creating in C
I am using C code to create an S4 object based on Douglas Bates's example in his lecture notes on <http://www.ci.tuwien.ac.at/Conferences/DSC-2003/Tutorials/RExtensions/slide s.pdf> http://www.ci.tuwien.ac.at/Conferences/DSC-2003/Tutorials/RExtensions/slides .pdf e.g. SEXP La_DGE_dc(SEXP A) { SEXP aa = PROTECT(duplicate(A)); SEXP adims, pivot, val; int
2003 Sep 05
1
Problem with S4 slots in C code (PR#4073)
This message is in MIME format. Since your mail reader does not understand this format, some or all of this message may not be legible. ------_=_NextPart_000_01C3738F.63DE3390 Content-Type: text/plain; charset="iso-8859-1" #I want to be able to create a new S4 class and read data into it using C code # Here is a very simple S4 object inheriting from "array", but with 5
2010 Feb 18
3
R CMD check: OK in LINUX. Crashes in Windows!
Hi, I have followed the recommended steps for creating a package (rctest). As of now, my goal is simply to understand how various pieces fit together. The package includes: (1) C code with source in sub-directories, compiled to create a static library. (a) There is a single C-struct (dns) a simple 'matrix': {int m; int n; double *d;} (b) C code to create random matrix of a certain size.
2008 Mar 15
1
Experimental R_has_slot() utility
Dear list, The utility "R_has_slot" mentioned in the file NEWS ("Experimental R_has_slot() utility supplementing R_do_slot()") appears to be missing from a fresh checkout of the development branch. $ svn up At revision 44759. $ grep -i has_slot `find include -name '*.h'` $ grep -i _slot `find include -name '*.h'` include/Rdefines.h:#define GET_SLOT(x, what)
2011 Oct 15
2
gctorture() and gzfile() doesn't get along.
Found the simpliest way of seeing I bug I encountered doing "R CMD check --use-gct": Just launch R (with --vanilla), and do this: > ?gctorture # this work > gctorture() > ?gctorture Error in gzfile(file, "rb") : can only weakly reference/finalize reference objects # this does not It seems that when gctorture() is on gzfile() doesn't work.
2020 Oct 29
2
Something is wrong with the unserialize function
Hi all, I am not able to export an ALTREP object when `gctorture` is on in the worker. The package simplemmap can be used to reproduce the problem. See the example below ``` ## Create a temporary file filePath <- tempfile() con <- file(filePath, "wrb") writeBin(rep(0.0,10),con) close(con) library(simplemmap) library(parallel) cl <- makeCluster(1) x <- mmap(filePath,
2001 May 28
1
memory bug in is.na[n]() (PR#952)
I've forgotten to submit this as bug report (and haven't easily seen how to debug). The bug is both for is.na() and is.nan() {which makes much sense since the C code of the two is very similar!}; only one is shown below. Martin ------- start of forwarded message ------- From: Martin Maechler <maechler@stat.math.ethz.ch> To: R-core@stat.math.ethz.ch Subject: another is.nan
2003 May 08
0
multcomp and lme (followup)
I just realized that in the call to `csimint' the argument `asympt=TRUE' is missing since we need to compute the confidence intervals for a glm based on the normal approximation. Torsten --------------------------------------------------------------------- library(multcomp) set.seed(290875) # a factor at three levels group <- factor(c(rep(1,10), rep(2, 10), rep(3,10))) # Williams
2003 May 05
1
multcomp and lme
I suppose that multcomp in R and multicomp in S-Plus are related and it appears that it is possible to use multicomp with lme in S-Plus given the following correspondence on s-news sally.rodriguez at philips.com 12:57 p.m. 24/04/03 -0400 7 [S] LME summary and multicomp.default() Is it possible to use multicomp with lme in R and if so what is the syntax from a simple readily available
2020 Oct 29
2
[External] Something is wrong with the unserialize function
This Index: src/main/altrep.c =================================================================== --- src/main/altrep.c (revision 79385) +++ src/main/altrep.c (working copy) @@ -275,10 +275,11 @@ SEXP psym = ALTREP_SERIALIZED_CLASS_PKGSYM(info); SEXP class = LookupClass(csym, psym); if (class == NULL) { - SEXP pname = ScalarString(PRINTNAME(psym)); + SEXP pname =
2017 Jan 12
3
rgl
----Original Message----- From: Martyn Plummer [mailto:plummerm at iarc.fr] Sent: Thursday, January 12, 2017 3:36 AM To: Weiner, Michael <weinerm at ccf.org>; r-sig-fedora at r-project.org Subject: Re: [R-sig-Fedora] rgl >One possibility is that you have the 32-bit version of mesa-libGL-devel installed. This will provide the headers but not the 64-bit l>ibrary which is what you need
2010 Jan 12
1
rgl: bogus configure[.ac] (PR#14183)
Full_Name: Jens Elkner Version: 2.10.1 OS: Solaris Submission from: (NULL) (141.44.24.14) The configure.ac is bogus, since it does not include additional library pathes at the right place and thus fails. E.g.: $R_HOME/bin/R CMD INSTALL -l $PROTO/R/library \ --configure-args='--with-gl-includes=/usr/X11/include/NVIDIA --with-gl-libs=/usr/X11/lib/NVIDIA/amd64' $TMPBUILD And thus
2017 Jan 12
1
rgl
-----Original Message----- From: Martyn Plummer [mailto:plummerm at iarc.fr] Sent: Thursday, January 12, 2017 7:41 AM To: Weiner, Michael <weinerm at ccf.org>; r-sig-fedora at r-project.org Subject: Re: [R-sig-Fedora] rgl >> configure:4429: checking for glEnd in -lGL >> configure:4454: gcc -o conftest -g -O2??-DHAVE_PNG_H >> -I/usr/include/libpng16??conftest.c
2009 Jul 16
1
Resizing a named vector crashes R with gctorture(TRUE) (PR#13837)
On 15/07/2009 8:08 PM, Herv? Pag?s wrote: > Hi, > > > x <- c(a=10, b=20) > > length(x) <- 1 > > x > a > 10 > > But with gctorture turned on, I get: > > > gctorture(TRUE) > > x <- c(a=10, b=20) > > length(x) <- 1 > > x > a > "a" <---- ??? > > > x <-
2002 Apr 29
1
Garbage collection: RW1041
Have searched through the archives but have been unable to find any related issues - hopefully I'm not bringing up an old topic. Am using RW1041 on a Windows NT on a machine with 1Gb of memory. Have a function doit() that reads in a chunk of data using readBin, performs a regression, saves out coeffs and then returns. When using Rgui with the default memory limit of 256Mb I'm able to
2011 Jan 11
1
as.environment.list provides inconsistent results under torture
Hello, Using R-devel (rev 53950), I get inconsistent results with as.environment( VECSXP ) when gctorture is on. Consider: a <- list( aa = rnorm, bb = runif ) gctorture(TRUE) as.environment( a ) The last line sometimes produces the correct environment, but sometimes I get errors. Here are the three situations: # good > as.environment( a ) <environment: 0x100b1c978> # not good
2005 Aug 17
4
accesing slots of S4 class in C code
I am trying to use a custom S4 object in my C code and I cannot get the access to its slots working. The following is a toy example, but even this crashes. In R I have: setClass("pd", representation(data="numeric")) x <- new("pd", data=1:5) test <- function(pd.obj) { res <- .C("TestFun", pd.obj) res} test(x) (Of couse
2023 Apr 29
1
Forcing a PROTECT Bug to Occur
I'm trying to learn about R's PROTECT system. To that end I've tried to create an example of C code that doesn't protect anything. I was hoping it would either segfault from trying to access deallocated memory, or maybe print out nonsense results because the unprotected memory got overwritten, but I can't make either happen. Here's my current code (all in R, using the