Skip to content
Prev 7662 / 12125 Next

[R-pkg-devel] R session crash on closing a graphic device on Windows

Hi Tomas,

Thanks for your helpful advice. This time, it seems the cause of the
error was an allocator mismatch; I mistakenly allocated the struct on
Rust's side, which means it's allocated by Rust's allocator, but a
`DevDesc` is to be freed on R's side. The problem is solved by using
libc::calloc(), which allocates using the C runtime's allocator, and
compiling it with the same toolchain that compiles R.

I also saw some errors when it relates to GC, so it might be some
PROTECT issue. Thanks for the hint.

During debugging, I learned a lot about how to build R with DEBUG=T
and use gdb, and it really helped me. I'm yet to unlock the power of
WinDBG, but I will try next time...

Best,
Yutani

2022?1?26?(?) 23:20 Tomas Kalibera <tomas.kalibera at gmail.com>: