[Rcpp-devel] Rcpp_precious_remove again (Windows)

Dominick Samperi djsamperi at gmail.com
Wed Jan 25 15:14:56 CET 2023


Just today I simply started R in a CMD window (no Rcpp/RInside), and a new
window popped up
with the R prompt, instead of just starting the session in the current
window. This new window
goes away after a few seconds and you are left in the original window with
an R command prompt.

I'm using the development version of R, and this has nothing to do with
Rcpp/RInside.

This tends to happen rarely, usually the first time I run R after opening
the CMD window. Terminating
and running R again does not reproduce the problem, so it is somehow
dependent on
operating system context.

Not sure if this is a bug or a side-effect of a virus infection.

Dominick






On Mon, Jan 23, 2023 at 8:38 PM Dominick Samperi <djsamperi at gmail.com>
wrote:

> The problems I have reported have three possible causes, individually, or
> in combination. Feedback from experts on this might help.
>
> 1. Changes to R internals esp. since R 4.2.0 may break RInline,
>      and also break other FFI apps that I'm working on (Haskell). For
>      example, fetching the address of the SEXP R_NilValue gives an
>      invalid address with R 4.2.2, but does not have this problem
>      with R 4.1.3, for example.
>
> 2. When you start a Windows CMD terminal, at least two threads
>     are started (can be seen in task manager), and sometimes Windows
>     seems to start two instances of your app instead of one. This may
>     be a bug in RInside, or a bug in Windows? Google shows that
>     others have reported problems caused by Windows starting two
>     terminals when you expect one.
>
> 3. There may be problems with the Rinline::repl() code that I have
>      not found yet.
>
> Dominick
>
>
>
>
> On Mon, Jan 23, 2023 at 1:43 PM Dirk Eddelbuettel <edd at debian.org> wrote:
>
>>
>> Maintainer of affected package here:
>>
>> On 23 January 2023 at 12:20, Dominick Samperi wrote:
>> | On the changes for R 4.2.0, it is not clear how to distinguish
>> | R API functions from R internal functions (and this probably
>> | doesn't matter for Rcpp), but you are correct,
>> | on closer inspection these changes should not have effected
>> | the way R_DefParams() was used before R_DefParamsEx()
>> | was introduced.
>> |
>> | It would be helpful if others could test to see if they can reproduce
>> | the problems I reported. I will submit a pull request when
>> | ready,
>>
>> That would be really appreciated! It really sounds like we could do with
>> an
>> update of some internals, and as seem to have spent some time in that
>> corner
>> you are likely right now the most qualified person to do this.
>>
>> | and if there is no objection, ifdefs will be included that
>> | permit compiling Rcpp and RInside using MSVC (there are only
>> | a few small changes with most of them applying to RInside.cpp).
>>
>> I think that is out of scope, and should be not in the pull request, and
>> RInside repo.
>>
>> By all means keep them in a branch / fork of yours if that is how you
>> work,
>> but the RInside package is part of R ecosystem which has a
>> well-established
>> empty intersection with the MSVC world and toolchains.
>>
>> Dirk
>>
>> --
>> dirk.eddelbuettel.com | @eddelbuettel | edd at debian.org
>>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.r-forge.r-project.org/pipermail/rcpp-devel/attachments/20230125/7e9ca258/attachment.html>


More information about the Rcpp-devel mailing list