-
Notifications
You must be signed in to change notification settings - Fork 56
Intermitted seg fault returning arma::sp_mat to R #108
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
Thanks. But what is If the double |
Here is the context of the code: https://github.com/elbamos/largeVis/blob/cranpush/src/edgeweights.cpp And the error is triggerable using the first test here: https://github.com/elbamos/largeVis/blob/cranpush/tests/testthat/testspecific.R I can take a look at the wrapper and give it a try over the weekend, but I fear this issue is going to be at the outer reaches of my limited C++ skills.
|
I don't have your package. Could you possibly mock something with the fewest possible dependencies and tricks which still exhibits the issue, ideally also outside of |
Here's what a version of R built with sanitizers says:
So it's likely your |
It's possible, although that constructor is pretty straightforward. But the seg fault I'm seeing is happening when the function returns, not when the object is created. And it's resolved by the transposition.
|
Unfortunately until you can produce a minimal, reproducible example (ie, using only RcppArmadillo) we have to assume the problem is in your package. |
Guys - I filed the report to try to be helpful to you. For my part, I feel I've worked-around it. If you do decide to look into it, my git contains a test script and test data to reproduce the error. If you'd like, I can also isolate the individual cpp and data file. Thanks much.
|
I am sorry but we all have real jobs, other projects, and many other things demanding our attention -- so we cannot provide a debugging service for you. Thanks for your understanding. |
I've been regularly getting seg faults in code that returns a largeish
sp_ma
t from C++ to R (as a sparse matrix). I can consistently reproduce it with the code, it happens about 75% of the time. But I haven't been able to isolate a minimally reproducible example.Where it occurs, is when R calls a C++ function that calls a nested function that creates and returns an
sp_mat
that is then immediately returned to R. I've traced the segfault to thereturn
line.Calling
t()
twice works-around it.If:
But:
The text was updated successfully, but these errors were encountered: