<div dir="ltr">Hello,<div><br></div><div>I think I found a problem under Windows with the repl code from RInside. The problem appears if I simply compile the code in RInside/inst/examples/standard using the Makefile.win there,</div><div>after a few hacks to deal with spaces in file names and the direction of slashes.</div><div><br></div><div>The problem appears with the example rinside_interactive0.cpp, but to keep things simple I've stripped out just the repl code into repl.cpp. It is attached, along with a Makefile that works under Windows, with g++ from Rtool42, specifically,</div><div><br></div><div>set PATH=c:\Rtools42\x86_64-w64-mingw32.static.posic\bin;%PATH%</div><div><br></div><div>When repl.exe is run an extra window pops up, and there are random terminations, and sometimes a crash, especially if you try to plot something. The program immediately terminates after plotting.</div><div><br></div><div>None of this happens under Linux (Ubuntu), where the program works as expected.</div><div><br></div><div>I tried installing gdb using 'pacman -Sy gdb' (following CRAN docs), and there were no apparent problems, but some of the DLL's had the wrong version, and gdb could not be started. (Missing DLL's were msys-ffi-8.dll and msys-unistring-5.dll.)</div><div><br></div><div>I was able to build using Visual Studio, and in that case the app crashes immediately with a complaint about Rcpp_precious_remove. But here I could bring up a debugger and step trough code, and sure enough it crashes soon after the call</div><div>GET_CALLABLE("Rcpp_precious_remove"). Stepping into this function leads to</div><div>Microsoft code in thread_safe_statics.cpp that implements a critical section, suggesting</div><div>that more than one thread is started.</div><div><br></div><div>I wonder if the problem is related to the fact that R is not thread safe?</div><div><br></div><div>Or could it be that the preserved objects are bigger under Windows?</div><div><br></div><div>I'm working with Rcpp_1.0.9 and RInside_0.2.17, with R-4.2.2.</div><div><br></div><div>Thanks,</div><div>Dominick</div><div><br></div><div><br></div><div><br></div><div><br></div><div><br></div><div><br></div><div><br></div><div><br></div><div><br></div><div><br></div></div>