[R-pkg-devel] New package with C++ code causes R abort in RStudio, not in R console.

Luc De Wilde Luc@DeW||de @end|ng |rom UGent@be
Tue Nov 12 22:09:54 CET 2024


Dear Ivan,

Thank you for your reply!
The error occurs on my local machine(s), where the dll is always reproduced by the "install package".
I have attached a debugger (from Visual Studio) to the R process, which gives me the message "A breakpoint instruction (__debugbreak() statement or similar call) was executed in rsession-utf8.exe.

When I go to the dll module in the Call Stack I get the message "Binary was not built with debug information". I do not know how to ask R CMD INSTALL to produce info which can be used by a debugger, perhaps you can direct me to the correct information to do so (in Windows)?

Luc

________________________________
Van: Ivan Krylov <ikrylov using disroot.org>
Verzonden: dinsdag 12 november 2024 19:44
Aan: Luc De Wilde <Luc.DeWilde using UGent.be>
CC: r-package-devel using r-project.org <r-package-devel using r-project.org>; Yves Rosseel <Yves.Rosseel using UGent.be>
Onderwerp: Re: [R-pkg-devel] New package with C++ code causes R abort in RStudio, not in R console.

� Tue, 12 Nov 2024 14:06:53 +0000
Luc De Wilde <Luc.DeWilde using UGent.be> �����:

> The package with C++ code is in  https://eur03.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2Flucdw%2FlavaanC&data=05%7C02%7CLuc.DeWilde%40UGent.be%7C4b0d32b0971e4072fad808dd0349ffd7%7Cd7811cdeecef496c8f91a1786241b99c%7C1%7C0%7C638670338539751490%7CUnknown%7CTWFpbGZsb3d8eyJFbXB0eU1hcGkiOnRydWUsIlYiOiIwLjAuMDAwMCIsIlAiOiJXaW4zMiIsIkFOIjoiTWFpbCIsIldUIjoyfQ%3D%3D%7C40000%7C%7C%7C&sdata=2IppWyDOPRyhVGDhlARjPGN9XgZcLfRe1ANp%2FSYHHZI%3D&reserved=0<https://github.com/lucdw/lavaanC>.
>
> When testing with a bunch of models, there is one model that causes
> an abort of the R session in RStudio (on Windows), but in the R
> console or in a batch job it causes no errors.

This is a low-confidence guess, but there's a stray src/lavaanC.dll in
the repository. If you install the package straight from the source
directory, you may pick up the *.dll without recompiling it, which may
be incompatible with the version of R running inside RStudio.

If this does reproduce on a clean installation, the most informative
way forward would be to attach a debugger to the RStudio's R process
before it crashes.

--
Best regards,
Ivan

	[[alternative HTML version deleted]]



More information about the R-package-devel mailing list