<div dir="ltr"><div>There are problems with the R-devel version, but they appear less frequently. </div><div>What happens is two instances of the program are started instead of one, </div><div>but there is normally</div><div>a "dominant" one that hides the fact that there is another instance lurking, so</div><div>the program seems to behave normally. Occasionally both instances </div><div>come up (two terminals and two x11 panes). The R function </div><div>R_SetWin32(Rstart) is called twice on startup.</div><div><br></div><div>The problem is likely caused by the fact that R internals changed for</div><div>R 4.2.0, in particular, the structRstart in R_ext/RStartup.h changed,</div><div>and RSTART_VERSION was introduced. The requires use of</div><div>R_DefParamsEx(&Rst, RSTART_VERSION) in place of</div><div>R_DefParams(), and the return value must be zero for version</div><div>compatibility. </div><div><br></div><div>This is not Windows-specific, and I suspect there are </div><div>problems under Linux, but symptoms rarely surface due to</div><div>some quirks of that architecture (better immune system?).</div><div><br></div><div>I modified the source with hints from the example </div><div>src/gnuwin32/front-ends/rtest.c, and the program seems</div><div>to behave more consistently, but the multiple instance</div><div>problem persists.</div><div><br></div><div>I've attached a version of RInside.cpp with my changes. The</div><div>_MSC_VER ifdefs are for Video Studio, which I am using for</div><div>debugging. I had some problems with gdb.</div><div><br></div><div>Dominick</div><div><br></div><div><br></div><div><br></div><div><br></div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Fri, Jan 20, 2023 at 7:56 PM Dirk Eddelbuettel <<a href="mailto:edd@debian.org">edd@debian.org</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><br>
On 20 January 2023 at 19:11, Dominick Samperi wrote:<br>
| You are right Dirk, RInside overrides what is specified because the function<br>
| myAskYesNo doesn't actually ask, so this explains why there is to<br>
| termination<br>
| prompt under Windows. This does not change what happens under Linux<br>
| because this function is assigned to a Windows-specific callback. Under<br>
| Linux the confirmation message appears.<br>
| <br>
| The current status is that the example seems to work using R-devel,<br>
| but not using R-4.2.2.<br>
<br>
:-/<br>
<br>
If you can narrow it down we'd appreciate it. If not, well, r-devel will be<br>
r-release in the three months time.<br>
<br>
And I don't think we have done any changes on the Windows side since before<br>
UCRT with R 4.2.0.<br>
<br>
Dirk<br>
<br>
-- <br>
<a href="http://dirk.eddelbuettel.com" rel="noreferrer" target="_blank">dirk.eddelbuettel.com</a> | @eddelbuettel | <a href="mailto:edd@debian.org" target="_blank">edd@debian.org</a><br>
</blockquote></div>