Displaying 20 results from an estimated 6000 matches similar to: "segfault when applying strange coercion (PR#2923)"
2004 Apr 26
1
Segfault: .Call and classes with logical slots
Hi,
the following example aiming at a class containing a logical slot
segfaults under R-1.9.0 when `gctorture(on = TRUE)' is used:
Code code (dummy.c):
#include <Rdefines.h>
SEXP foo() {
SEXP ans;
PROTECT(ans = NEW_OBJECT(MAKE_CLASS("test")));
SET_SLOT(ans, install("lgl"), allocVector(LGLSXP, 1));
LOGICAL(GET_SLOT(ans,
2001 Feb 20
2
segfault
I've managed to trap the following segfault with xxgdb and gctorture() set. The
segfault seems to move around if gctorture() is not set, but has now occurred twice
in the same spot with it set. xxgdb gives the message
Program received signal SIGSEGV, Segmentation fault.
0x71244 in RunGenCollect (size_needed=2) at memory.c:1027
and the source listing points to FORWARD_CHILDREN(s); in the
2013 Jun 11
3
load/unload segfault puzzle
Dear r-devel readers,
I have a pretty deep problem with package loading and unloading in
the development version of the lme4 package
<https://github.com/lme4/lme4>; it's not boiled down to a properly
minimal example yet (this has been difficult), but I am posting anyway
in the hopes that someone has ideas about how to proceed farther,
since I'm nearly stumped. Apologies in advance
2003 May 09
4
getAttr problem
Hi all,
It seems that getAttr doesn't return "names" attribute properly as in
getAttrib(x, R_NamesSymbol));
If you look at section 4.7.4 in "Writing R Extensions", the second example of
SEXP out(SEXP, SEXP) returns NULL for the names attribute of the
outer product.
This is true for R 1.7.0 on both Win2000 with mingw and Redhat 9.0 with gcc.
Is there something I am
2011 May 22
2
unwanted coercion using apply
I need to convert a dataframe to a record-structure, to be able to encode it
later in JSON. Suppose this is the data:
mydata <- data.frame(foo=1:3, bar=c("M","M","F"));
I would like to convert this to a unnamed list (json array) of key-value
pairs. For example like this:
apply(data.frame(foo=1:3, bar=c("M","M","F")),1,as.list)
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,
2019 Aug 02
4
Infrequent but steady NULL-pointer caused segfault in as.POSIXlt.POSIXct (R 3.4.4)
The R script I run daily for hours looks like this:
while (!finish) {
Sys.sleep(0.1)
time = as.integer(format(Sys.time(), "%H%M")) # always crash here
if (new.data.timestamp() <= time)
next
# ... do some jobs for about 2 minutes ...
gc()
}
Basically it waits for new data, which comes in every 10 minutes, and
do some jobs, then gc(), then loop again. It
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 =
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
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
2006 Mar 27
1
Safe to UNPROTECT() when object is assigned to a list?
Hi,
I'm troubleshooting some native code on Windows that very occationally
(and semi-randomly) crashes R. Already looked at "everything", I just
want to double check that it is safe to UNPROTECT() allocated
variables as soon as they are assigned to, say, a PROTECTed list.
>From (R v2.3.0) Section 5.7.1 "Handling the effects of garbage
collection" in "Writing R
2008 Jan 22
3
gctorture and proc.time (PR#10600)
In R version 2.6.1 (2007-11-26)
and R version 2.6.1 Patched (2008-01-19 r44061)
on openSUSE 10.2 (X86-64)
> gctorture()
> proc.time()
Error: protect(): protection stack overflow
The problem with this is that then
R CMD check --use-gct foo
ALWAYS FAILS with
> cat("Time elapsed: ", proc.time() - get("ptime", pos = 'CheckExEnv'),"\n")
Error in
2009 Jan 05
1
can't get names of R_env
Hi,
I'm quite knew in R, so I might not have the R specific jargon.
But here is my problem,
I'm trying to access and use variabels given by a function environment,
more specifically the rho in do_optim in src/main/optim.c
According to the documentation
http://cran.r-project.org/doc/manuals/R-ints.html#The-_0027data_0027
the envsxp is defined as a tagged pairlist.
"ENVSXP: Pointers
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 <-
1999 May 11
1
another multivariate ts bug
I think this is another one of the same kind of bugs in ts:
Version 0.64.1 (May 8, 1999)
...
> z <- ts(matrix(1:20,10,2), start=c(1969,1), frequency=12)
> (z > 5) | (z < 2)
Error: invalid time series parameters specified
>
Paul
-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-
r-devel mailing list -- Read
2011 Apr 20
2
coercion
Dear ALL
I don't know why I can see this error in run this sentences.
In paste("V", 1L:cols, sep = "") : NAs introduced by coercion
DATA<-read.delim ("D:\\DATA\\GeneExpression.txt",header=FALSE)
I will be glad if you help me.
Best Regards,
Stat Consult
[[alternative HTML version deleted]]
2012 Jun 07
1
factor coercion with read.csv or read.table
How do I fix this error ? I tried coercion to a vector but that didn't work.
msci <-read.csv("..MSCIexUS.csv", header=TRUE)
head(msci)
Date index
1 Dec 31, 1969 100
2 Jan 30, 1970 97.655
3 Feb 27, 1970 96.154
4 Mar 31, 1970 95.857
5 Apr 30, 1970 85.564
6 May 29, 1970 79.005
> str(msci)
'data.frame': 510 obs. of 2 variables:
$ Date : Factor w/ 510
2011 Apr 26
1
Hook into Coercion Framework for data.frame
Hi,
I am looking into a way to hook into the R coercion framework to allow
me to convert table-like data stored within a COM object into a
data.frame.
Some of our COM objects have their own table-like data storage, and from
R's point of view it's an object (EXTPTRSXP) decoarated with a sepcial
symbol so we can easily identify it.
COM_Table <- a_method_that_creates_the_object()
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