Displaying 20 results from an estimated 500 matches similar to: "serialize/unserialize vector improvement"
2011 Dec 06
1
unserialize and eager execution
Hi,
While debugging a network server I'm developing I noticed something unusual
- call to unserialize() resulted in
an error about loading a namespace.
I was a bit taken back by this - why should unserializing an object cause a
namespace lookup?
Are there any other side-effects of unserialize() that I should be cautious
about? I've been
digging through the R_Unserialize() call, I
2018 Jun 21
1
DOCUMENTATION(?): parallel::mcparallel() gives various types of "Error in unserialize(r) : ..." errors if value is of type raw
I stumbled upon the following:
f <- parallel::mcparallel(raw(0L))
parallel::mccollect(f)
# $`77083`
# NULL
but
f <- parallel::mcparallel(raw(1L))
parallel::mccollect(f)
# Error in unserialize(r) : read error
traceback()
# 2: unserialize(r)
# 1: parallel::mccollect(f)
(restarting because the above appears to corrupt the R session)
f <- parallel::mcparallel(raw(2L))
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,
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 =
2008 Jul 31
2
C versions of serialize/unserialize in packages
Are the functions 'R_Unserialize' and 'R_InitFileInPStream' allowed to
be used in R packages? I guess I'm just not clear on the implications
of this comment in 'Rinternals.h':
/* The connection interface is not yet available to packages. To
allow limited use of connection pointers this defines the opaque
pointer type. */
I have a function in the
2005 Dec 12
2
Can you unserialize an object from the db?
I don''t even know if this is possible. I want to use an object as an
attribute for one of my classes. I can save it to the db fine, looks
like...but I need to be able to use it after I pull the object from
the db. Right now the attribute is just a String, but I need it to be
a Runt::Intersect object. Does anyone know how I can unserialize the
attribute so I can use it as an object?
2012 Mar 22
1
Serializing many small objects efficiently
Hi,
sorry if this question is trivial or unclear, this is my first venture into
mixed C/R programming (I am reasonably experienced in each separately).
I am trying to write a serialization function for a format called
typedbytes, which is used as an interchange format in Hadoop circles. Since
I would need to serialize according to the internal R format many small R
objects I looked at the c
2018 Nov 07
2
error unserializing ascii format (v2 or v3)
I ran into an interesting error unserializing a file created with
ascii=TRUE:
R 3.5.1 (Windows or Linux):
> unserialize(serialize(list(raw=as.raw(c(39,41))), NULL, version=2,
ascii=TRUE))
Error in unserialize(serialize(list(raw = as.raw(c(39, 41))), NULL,
version = 2, :
ReadItem: unknown type 29, perhaps written by later version of R
The same error happens when the
2013 Jul 15
2
Serialize data.frame to database
Dear R-Users,
I need a very fast and reliable database solution so I try to serialize a data.frame (to binary data) and to store this data to an SQLite database.
This is what I tried to do:
library(RSQLite)
con <- dbDriver("SQLite")
db <- dbConnect(con, "test")
dbSendQuery(db, 'CREATE TABLE frames("simID" INT, "data" BLOB)')
data.bin <-
2012 Aug 31
3
Arrays Partial unserialization
Hi all,
I'm working with some huge array in R and I need to load several ones to
apply some functions that requires to have all my arrays values for each
cell...
To make it possible, I would like to load only a part (for example 100
cells) of all my arrays, apply my function, delete all cells loaded,
loaded following cells and so on.
Is it possible to unserialize (or load) only a
2006 Sep 05
1
serialize changes for 2.4.0
I noticed today that in R 2.3.1, I get
> serialize(list(1,2,3), NULL, ascii = TRUE)
[1] "A\n2\n131841\n131840\n19\n3\n14\n1\n1\n14\n1\n2\n14\n1\n3\n"
>
but in R 2.4.0 alpha I get
> serialize(list(1,2,3), NULL, ascii = TRUE)
[1] 41 0a 32 0a 31 33 32 30 39 36 0a 31 33 31 38 34 30 0a 31 39 0a 33 0a 31 34
[26] 0a 31 0a 31 0a 31 34 0a 31 0a 32 0a 31 34 0a 31 0a 33 0a
>
2006 Feb 08
1
corruption of data with serialize(ascii=TRUE)
I noticed the following peculiarity with `serialize()' when `ascii = TRUE' is
used. In today's (svn r37299) R-devel, I get
> set.seed(10)
> x <- rnorm(10)
>
> a <- serialize(x, con = NULL, ascii = TRUE)
> b <- unserialize(a)
>
> identical(x, b) ## FALSE
[1] FALSE
> x - b
[1] -3.469447e-18 2.775558e-17 -4.440892e-16 0.000000e+00
2020 Oct 29
0
[External] Something is wrong with the unserialize function
Thanks for the report. Will look into it when I get a chance unless
someone else gets there first.
A simpler reprex:
## create and serialize a memmory-mapped file object
filePath <- "x.dat"
con <- file(filePath, "wrb")
writeBin(rep(0.0,10),con)
close(con)
library(simplemmap)
x <- mmap(filePath, "double")
saveRDS(x, file = "x.Rds")
## in a
2020 Oct 29
0
[External] Something is wrong with the unserialize function
I found that also; fixed in r79386 in the trunk. Will port to R-patched
shortly.
Best,
luke
On Thu, 29 Oct 2020, Martin Morgan wrote:
> This
>
> Index: src/main/altrep.c
> ===================================================================
> --- src/main/altrep.c (revision 79385)
> +++ src/main/altrep.c (working copy)
> @@ -275,10 +275,11 @@
> SEXP psym =
2015 Dec 06
3
openvpn + routing
Hello,
i have a little question.
My system:
ip route:
0.0.0.0/1 via 10.8.0.5 dev tun0
default via 192.168.2.1 dev br0 proto static metric 425
10.8.0.1 via 10.8.0.5 dev tun0
10.8.0.5 dev tun0 proto kernel scope link src 10.8.0.6
88.198.140.127 via 192.168.2.1 dev br0
192.168.2.0/24 dev br0 proto kernel scope link src 192.168.2.101
metric 425
192.168.122.0/24 dev virbr0 proto kernel
2009 Nov 04
2
error in install.packages() (PR#14042)
Full_Name: Michael Spiegel
Version: 2.10
OS: Windows Vista
Submission from: (NULL) (76.104.24.156)
The following error is produced when attempting to call install.packages. Here
is the results of the traceback:
> source('http://openmx.psyc.virginia.edu/getOpenMx.R')
Error in f(res) : invalid subscript type 'list'
> traceback()
7: f(res)
6: available.packages(contriburl =
2008 Sep 25
1
Saving R-objects to a database
Someone solved the problem of saving R-objects to a database?
These are the two varaints I've tried so far without success:
1)
ser = rawToChar(serialize(obj, NULL, ascii=TRUE))
dbSendQuery(link, paste("insert into table values(1, '",ser,"')",sep=''))
The field to save the object in the MySQL Database is of type text.
unser = dbGetQuery(link,"select
2004 Aug 06
3
Trouble with LiveIce
Hi Folks,
I'm having the weirdest trouble with liveice. When I start it up with the
correct servername, it grinds to a halt with these messages:
playlist
0
Initialising Soundcard
16Bit 22050Hz Stereo
opening connection to localhost 8000
Attempting to Contact Server
connection successful: forking process
opening pipe!...
writing password
Then it waits there. Now, when I tried it with a
2012 Jan 09
1
serializing recordedplot object
I use recordPlot() to save plots to disk that I render later to a
variety of formats. This works fine for base R plots and ggplot2
plots, and also used to work for lattice plots. However somewhere in
version 2.14 things stopped working for lattice plots. Here is an
example:
library(lattice);
histogram(rnorm(100));
x <- recordPlot();
saveRDS(x, "myplot.rds");
y <-
2003 Dec 05
2
attempting login with hostname not username
Hi. I'm running a RH 9 machine with Samba 3.0.0 as a domain member of a
Win2003 ADS domain. I've setup samba w/ winbind and added a test share on
the Linux box.
I can see and access Windows shares from my Linux box, but I cannot access
the Linux share from a Win2k machine. I can see the Linux machine and the
just fine when browsing the network, but when I attempt to access the share
I