it fixes the issue If you're passing C++ objects across external library boundaries, you must ensure that all libraries are using the same runtime library (in particular, the same heap allocator). In practice, this means that all libraries must be linked to the DLL version of MSVCRT.
like below fixes the issue As Ben Bolker said, a crash is a bug. Thank you for the minimal reproducible example. I will fix this today. UPDATE: Patched on R-forge, revision 73. Will push to CRAN in a couple days.
will help you You can use Structured Exception Handling to trap these sorts of errors. In particular, filter for EXCEPTION_ACCESS_VIOLATION. Just make sure you know what you're doing when you swallow the exception: if your garbage address points to a guard page, you might see the behaviour described here.
Does that help The argument passed to WriteFile used to store the number of bytes written (at) can only be null if the argument for the overlapped structure is not null. I suggest changing at to be a DWORD and pass a pointer to it.