-
Notifications
You must be signed in to change notification settings - Fork 49
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
rchk error #408
Comments
We've also seen this in one other package so I'll see what I can do Nothing for you to do on your end, but thanks for reporting! |
Hi there, Has it been confirmed that this commit fixed the issue reported here? This commit is included in the latest release (0.5.1) which is also on CRAN. However, I'm still receiving similar https://raw.githubusercontent.com/kalibera/cran-checks/master/rchk/results/ProTrackR2.out Are these issues indeed related? Should this have been fixed by #409? Or is this something I need to fix myself? |
#409 doesn't appear to have fixed the rchk issue, still being flagged in several packages: https://cloud.r-project.org/web/checks/check_results_cpp11bigwig.html |
I wonder if it should be something like: if (Rf_xlength(names) != size) {
SEXP resized_names = PROTECT(resize_names(names, size));
Rf_setAttrib(out, R_NamesSymbol, resized_names);
UNPROTECT(1);
} |
I too am getting https://raw.githubusercontent.com/kalibera/cran-checks/master/rchk/results/RcppAlgos.out I haven't submitted an update to my package yet, but I suspect they won't accept an update until this has been addressed. I have addressed the Thanks |
@r-lib @DavisVaughan It looks like this issue needs to be reopened? |
I think the error message from
If we look at the current definition of cpp11/inst/include/cpp11/r_vector.hpp Line 1321 in 2938879
We see the following code: .
.
.
// Resize names, if required
// Protection seems needed to make rchk happy
SEXP names = PROTECT(Rf_getAttrib(x, R_NamesSymbol));
if (names != R_NilValue) {
if (Rf_xlength(names) != size) {
names = resize_names(names, size);
}
Rf_setAttrib(out, R_NamesSymbol, names);
}
.
.
. The problem line is .
.
.
// Resize names, if required
// Protection seems needed to make rchk happy
SEXP names = PROTECT(Rf_getAttrib(x, R_NamesSymbol));
if (names != R_NilValue) {
if (Rf_xlength(names) != size) {
SEXP names_resized = PROTECT(resize_names(names, size));
Rf_setAttrib(out, R_NamesSymbol, names_resized);
UNPROTECT(1);
} else {
Rf_setAttrib(out, R_NamesSymbol, names);
}
}
.
.
. |
From what I can tell, every listed package did the rchk run on 2024-11-21 The cpp11 release was on 2024-12-04 The full message is
The main problem being
Which is why the fix protects If anyone can reproduce with CRAN cpp11 and provide an easy way for me to reproduce as well, then we can reopen. But I think CRAN just hasn't rerun rchk on these packages. |
An exception is cpp11bigwig, run on 2025-01-09
That is a different issue from the one I tried to fix. I will open a different issue for that. |
Hi, I'm getting an rchk error and not sure if it relates to my code directly or something I can't fix on my side.
https://raw.githubusercontent.com/kalibera/cran-checks/master/rchk/results/fastplyr.out
Many thanks!
The error:
The text was updated successfully, but these errors were encountered: