-
Notifications
You must be signed in to change notification settings - Fork 35
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
SEGFAULT in helper_feature, corrupt matrix from weight_matrix_cpp? #281
Comments
Hmm, I have not experienced something like this, and it puzzles me, as the cpp-function is very simple (I guess you mean Could you provide an example where you (occasionally) have experienced this error? What system/R-version are you on? |
Yes I mean I agree that it's not a problem in the shapr code, it's probably something in RcppArmadillo, maybe an allocator problem. I wouldn't have reported the issue if I saw a problem with the workaround, but I have no experience with data.table so I don't know how much work that would be. |
That is almost exactly the same versions as me (except I am on R 4.1.1). What Rcpp version do you have? I am on 1.0.7. I don't quite understand your workaround. Do you mean keeping the frequencies separate from the (possibly corrupted) dt? |
I have Rcpp 1.0.7 as well. |
Occasionally I get SEGFAULT on
R/features.R:391
:dt[, sample_frequence := as.integer(.N), by = cnms]
.The error claims that the stack size is exceeded, but that's not true (unless there's a bug in data.table).
My guess is that the matrix returned from
weight_matrix_cpp
is corrupted, and that modifying the matrix causes the problem.A simple and robust workaround could be to create a new table with the frequencies instead of reusing the returned feature matrix.
The text was updated successfully, but these errors were encountered: