[Rcpp-devel] memory not mapped with Rcpp on Ubuntu
Dirk Eddelbuettel
edd at debian.org
Fri Feb 14 15:34:58 CET 2025
On 14 February 2025 at 15:09, John Clarke wrote:
| Thank you! This didn't directly solve my problem, but it got me looking in
| the right direction. I ended up connecting to a docker container through VS
| Code on my host machine (Windows). I didn't wire up the debugger UI (which is
| really convenient in VS Code) but was able to identify the issue through the VS
| Code interface which is a lot easier to use than a bare terminal.
Glad you have it sorted!
By the way, many of us use a sophisticated technology called "adding printf
statements". It would have allowed you to narrow it down in a running Ubuntu
session, be it local (and WSL2 is said to be good on Windows), or GitHub
Actions or container use as you did or ...
| For the record the issue was a call to fclose(pOutStream) where pOutStream was
| Null. On Windows and MacOS this didn't seem to cause a problem, but in Ubuntu
| it failed. Sadly the traceback information was not precise enough to identify
| the offending line of code, so I had to find it iteratively.
Building, and maintaining, on different OSs is helpful for finding corner
conditions. While you initially suspected the toolchain (see your Subject:
line), experience (and about 5 bazillion printf calls) taught a few us that a
look in the mirror often is a shortcut to the real driver of bug in our code.
Cheers, Dirk
--
dirk.eddelbuettel.com | @eddelbuettel | edd at debian.org
More information about the Rcpp-devel
mailing list