[R-pkg-devel] Problem loading package on Windoze --- update.

Gábor Csárdi c@@rd|@g@bor @end|ng |rom gm@||@com
Tue Nov 5 10:04:24 CET 2019


Maybe dropbox can make things worse, if your package library happens
to be in Dropbox. (I would think this is not a good idea.)

But it does happen without Dropbox, and if you install packages
frequently, e.g. if you develop a bunch of packages, then it is a
familiar error, it does happen all the time.

Gabor

On Tue, Nov 5, 2019 at 9:02 AM Hugh Parsonage <hugh.parsonage using gmail.com> wrote:
>
> I wonder if Dropbox “smartsync” is the culprit here. I’ve noticed this feature can create confusion between programs when Dropbox provides (a link to) the file when it is opened but only when it recognizes the file is being opened.
>
> On Tue, 5 Nov 2019 at 7:46 pm, Gábor Csárdi <csardi.gabor using gmail.com> wrote:
>>
>> I am not sure what the first issue was, but the second is an old R
>> issue. It happens when you update a package while its package (or
>> help) database, the rdb file mentioned in the error message, is open
>> in the current R session, i.e. when the package is loaded. The
>> database keeps an index to the objects within the database on the
>> disk. And when the package is updated, this index will be invalid,
>> which R detects as a corrupt rdb file. Restarting R solves the
>> problem.
>>
>> Btw. would R core be interested in a patch for this? I am not sure if
>> the situation is fixable, because the package is already loaded, and
>> we can't just reload it, but R could give a better error message. For
>> the help database, it might make sense to just re-open the database?
>>
>> Gabor
>>
>> On Tue, Nov 5, 2019 at 12:53 AM Rolf Turner <r.turner using auckland.ac.nz> wrote:
>> >
>> >
>> > I've just heard from another member of the client group and he cannot
>> > reproduce the problem.  I.e. he can install both the source package and
>> > the binary that I sent out, without error.
>> >
>> > So the problem seems to be in the system used by that first member of
>> > the client group who contacted me.
>> >
>> > Sorry for the noise.
>> >
>> > cheers,
>> >
>> > Rolf
>> >
>> > On 5/11/19 12:37 PM, Rolf Turner wrote:
>> > >
>> > > I am developing a package ("ldEst" --- lethal dose estimation) for a
>> > > group of consulting clients.  (The package may in the future be released
>> > > upon the unsuspecting public, but for the moment it has to stay
>> > > confidential, sad to say.)
>> > >
>> > > The clients run Windoze (sad to say).  In the past I have sent them the
>> > > source of the package, which they have the facilities to install.  The
>> > > latest release of the package however threw an error:
>> > >
>> > >>> install.packages("C:/Users/abel122/Dropbox/PFR/ldEst_3.0-12.tar.gz",
>> > >>> repos = NULL, type = "source")
>> > >>
>> > >> Error in rawToChar(block[seq_len(ns)]) :   embedded nul in string:
>> > >> '\037‹\b\0\0\0\0\0\0\003ì}\a`\024ÕÖ0‚\200,HGºN–¶\033&›ì¦\001aÁ\220Є„\022\b\201\020p³;I\006¶„-)T\021P\024\005,
>> > >> \002Š" E¤ƒ\024\001)‚"*J\023”&\210R\024\vEšÿ=·LÙ’„÷ž¼ïû~xÏìîÌ'
>> > >> Warning in install.packages :
>> > >>   installation of package
>> > >> ‘C:/Users/abel122/Dropbox/PFR/ldEst_3.0-12.tar.gz’ had non-zero exit
>> > >> status
>> > >
>> > > Flummoxed by this I thought I'd just get Uwe Ligges' win-builder to
>> > > build a Windoze binary, and sent that to the clients.  The win-build
>> > > went without problem, but when I sent the binary to one of the clients
>> > > he got the error:
>> > >
>> > >> Error: package or namespace load failed for ‘ldEst’ in get(method,
>> > >> envir = home):
>> > >>  lazy-load database
>> > >> 'C:/Users/abel122/Documents/R/win-library/3.6/ldEst/R/ldEst.rdb' is
>> > >> corrupt
>> > >> In addition: Warning messages:
>> > >> 1: In .registerS3method(fin[i, 1], fin[i, 2], fin[i, 3], fin[i, 4],  :
>> > >>   restarting interrupted promise evaluation
>> > >> 2: In get(method, envir = home) :
>> > >>   restarting interrupted promise evaluation
>> > >> 3: In get(method, envir = home) : internal error -3 in R_decompress1
>> > >
>> > > I (sad to say) have no idea what any of this really means.
>> > >
>> > > The package installs, loads, and  runs just fine on my Ubuntu system,
>> > > and builds without error on win-builder.
>> > >
>> > > Can any suggest a way that I might track down what's causing the error(s).
>> > >
>> > > I realise this is a big ask without your having the package to
>> > > experiment on, but I thought that someone clever out there might be able
>> > > to offer some insight.  E.g. what might I do to find out what is
>> > > triggering that "embedded nul in string" business?
>> > >
>> > > Thanks for any tips.
>> >
>> > ______________________________________________
>> > R-package-devel using r-project.org mailing list
>> > https://stat.ethz.ch/mailman/listinfo/r-package-devel
>>
>> ______________________________________________
>> R-package-devel using r-project.org mailing list
>> https://stat.ethz.ch/mailman/listinfo/r-package-devel



More information about the R-package-devel mailing list