Why devtools::document fails with unclear C++ error message?












0















I have a vignette that I can build using devtools::build_vignettes() but when I try to build the source package (RStudio/Build/build source package) it fails when executing devtools::document(roclets=c('rd', 'collate', 'namespace', 'vignette')) with the following error message:



R(32119,0x7fff7437f000) malloc: *** error for object 0x7fff74dc0c30: pointer being freed was not allocated
*** set a breakpoint in malloc_error_break to debug

Exited with status 6.


This package uses Rcpp but I am definitely not an expert in Cpp and don't understand at all what is going on. I can use the package locally with no troubles.



> sessionInfo()
R version 3.5.1 (2018-07-02)
Platform: x86_64-apple-darwin15.6.0 (64-bit)
Running under: OS X El Capitan 10.11.6

Matrix products: default
BLAS: /System/Library/Frameworks/Accelerate.framework/Versions/A/Frameworks/vecLib.framework/Versions/A/libBLAS.dylib
LAPACK: /Library/Frameworks/R.framework/Versions/3.5/Resources/lib/libRlapack.dylib

locale:
[1] en_US.UTF-8/en_US.UTF-8/en_US.UTF-8/C/en_US.UTF-8/en_US.UTF-8

attached base packages:
[1] stats graphics grDevices utils datasets methods base

loaded via a namespace (and not attached):
[1] Rcpp_1.0.0 rstudioapi_0.8 knitr_1.20 magrittr_1.5 usethis_1.4.0 devtools_2.0.1
[7] pkgload_1.0.2 R6_2.3.0 rlang_0.3.0.1 tools_3.5.1 pkgbuild_1.0.2 sessioninfo_1.1.1
[13] cli_1.0.1 withr_2.1.2 htmltools_0.3.6 remotes_2.0.2 yaml_2.2.0 assertthat_0.2.0
[19] digest_0.6.18 rprojroot_1.3-2 crayon_1.3.4 processx_3.2.0 callr_3.0.0 clisymbols_1.2.0
[25] base64enc_0.1-3 fs_1.2.6 ps_1.2.1 evaluate_0.12 glue_1.3.0 memoise_1.1.0
[31] rmarkdown_1.10 compiler_3.5.1 desc_1.2.0 backports_1.1.2 prettyunits_1.0.2









share|improve this question




















  • 2





    Minimal, Complete, and Verifiable example? Does the error happen when you call devtools::document() directly with different roclets?

    – Ralf Stubner
    Nov 22 '18 at 18:42











  • The error does not happen when I call the exacte same command from the Rstudio console

    – clemlaflemme
    Nov 22 '18 at 18:50











  • Also the command devtools::build() works from the RStudio console

    – clemlaflemme
    Nov 22 '18 at 18:52











  • Weird, but impossible to debug without a Minimal, Complete, and Verifiable example. Make a copy of the project and remove stuff from it until you cannot remove anything without also removing this error message.

    – Ralf Stubner
    Nov 22 '18 at 18:55











  • Removiing Rcpp tag ...

    – Dirk Eddelbuettel
    Nov 22 '18 at 18:56
















0















I have a vignette that I can build using devtools::build_vignettes() but when I try to build the source package (RStudio/Build/build source package) it fails when executing devtools::document(roclets=c('rd', 'collate', 'namespace', 'vignette')) with the following error message:



R(32119,0x7fff7437f000) malloc: *** error for object 0x7fff74dc0c30: pointer being freed was not allocated
*** set a breakpoint in malloc_error_break to debug

Exited with status 6.


This package uses Rcpp but I am definitely not an expert in Cpp and don't understand at all what is going on. I can use the package locally with no troubles.



> sessionInfo()
R version 3.5.1 (2018-07-02)
Platform: x86_64-apple-darwin15.6.0 (64-bit)
Running under: OS X El Capitan 10.11.6

Matrix products: default
BLAS: /System/Library/Frameworks/Accelerate.framework/Versions/A/Frameworks/vecLib.framework/Versions/A/libBLAS.dylib
LAPACK: /Library/Frameworks/R.framework/Versions/3.5/Resources/lib/libRlapack.dylib

locale:
[1] en_US.UTF-8/en_US.UTF-8/en_US.UTF-8/C/en_US.UTF-8/en_US.UTF-8

attached base packages:
[1] stats graphics grDevices utils datasets methods base

loaded via a namespace (and not attached):
[1] Rcpp_1.0.0 rstudioapi_0.8 knitr_1.20 magrittr_1.5 usethis_1.4.0 devtools_2.0.1
[7] pkgload_1.0.2 R6_2.3.0 rlang_0.3.0.1 tools_3.5.1 pkgbuild_1.0.2 sessioninfo_1.1.1
[13] cli_1.0.1 withr_2.1.2 htmltools_0.3.6 remotes_2.0.2 yaml_2.2.0 assertthat_0.2.0
[19] digest_0.6.18 rprojroot_1.3-2 crayon_1.3.4 processx_3.2.0 callr_3.0.0 clisymbols_1.2.0
[25] base64enc_0.1-3 fs_1.2.6 ps_1.2.1 evaluate_0.12 glue_1.3.0 memoise_1.1.0
[31] rmarkdown_1.10 compiler_3.5.1 desc_1.2.0 backports_1.1.2 prettyunits_1.0.2









share|improve this question




















  • 2





    Minimal, Complete, and Verifiable example? Does the error happen when you call devtools::document() directly with different roclets?

    – Ralf Stubner
    Nov 22 '18 at 18:42











  • The error does not happen when I call the exacte same command from the Rstudio console

    – clemlaflemme
    Nov 22 '18 at 18:50











  • Also the command devtools::build() works from the RStudio console

    – clemlaflemme
    Nov 22 '18 at 18:52











  • Weird, but impossible to debug without a Minimal, Complete, and Verifiable example. Make a copy of the project and remove stuff from it until you cannot remove anything without also removing this error message.

    – Ralf Stubner
    Nov 22 '18 at 18:55











  • Removiing Rcpp tag ...

    – Dirk Eddelbuettel
    Nov 22 '18 at 18:56














0












0








0








I have a vignette that I can build using devtools::build_vignettes() but when I try to build the source package (RStudio/Build/build source package) it fails when executing devtools::document(roclets=c('rd', 'collate', 'namespace', 'vignette')) with the following error message:



R(32119,0x7fff7437f000) malloc: *** error for object 0x7fff74dc0c30: pointer being freed was not allocated
*** set a breakpoint in malloc_error_break to debug

Exited with status 6.


This package uses Rcpp but I am definitely not an expert in Cpp and don't understand at all what is going on. I can use the package locally with no troubles.



> sessionInfo()
R version 3.5.1 (2018-07-02)
Platform: x86_64-apple-darwin15.6.0 (64-bit)
Running under: OS X El Capitan 10.11.6

Matrix products: default
BLAS: /System/Library/Frameworks/Accelerate.framework/Versions/A/Frameworks/vecLib.framework/Versions/A/libBLAS.dylib
LAPACK: /Library/Frameworks/R.framework/Versions/3.5/Resources/lib/libRlapack.dylib

locale:
[1] en_US.UTF-8/en_US.UTF-8/en_US.UTF-8/C/en_US.UTF-8/en_US.UTF-8

attached base packages:
[1] stats graphics grDevices utils datasets methods base

loaded via a namespace (and not attached):
[1] Rcpp_1.0.0 rstudioapi_0.8 knitr_1.20 magrittr_1.5 usethis_1.4.0 devtools_2.0.1
[7] pkgload_1.0.2 R6_2.3.0 rlang_0.3.0.1 tools_3.5.1 pkgbuild_1.0.2 sessioninfo_1.1.1
[13] cli_1.0.1 withr_2.1.2 htmltools_0.3.6 remotes_2.0.2 yaml_2.2.0 assertthat_0.2.0
[19] digest_0.6.18 rprojroot_1.3-2 crayon_1.3.4 processx_3.2.0 callr_3.0.0 clisymbols_1.2.0
[25] base64enc_0.1-3 fs_1.2.6 ps_1.2.1 evaluate_0.12 glue_1.3.0 memoise_1.1.0
[31] rmarkdown_1.10 compiler_3.5.1 desc_1.2.0 backports_1.1.2 prettyunits_1.0.2









share|improve this question
















I have a vignette that I can build using devtools::build_vignettes() but when I try to build the source package (RStudio/Build/build source package) it fails when executing devtools::document(roclets=c('rd', 'collate', 'namespace', 'vignette')) with the following error message:



R(32119,0x7fff7437f000) malloc: *** error for object 0x7fff74dc0c30: pointer being freed was not allocated
*** set a breakpoint in malloc_error_break to debug

Exited with status 6.


This package uses Rcpp but I am definitely not an expert in Cpp and don't understand at all what is going on. I can use the package locally with no troubles.



> sessionInfo()
R version 3.5.1 (2018-07-02)
Platform: x86_64-apple-darwin15.6.0 (64-bit)
Running under: OS X El Capitan 10.11.6

Matrix products: default
BLAS: /System/Library/Frameworks/Accelerate.framework/Versions/A/Frameworks/vecLib.framework/Versions/A/libBLAS.dylib
LAPACK: /Library/Frameworks/R.framework/Versions/3.5/Resources/lib/libRlapack.dylib

locale:
[1] en_US.UTF-8/en_US.UTF-8/en_US.UTF-8/C/en_US.UTF-8/en_US.UTF-8

attached base packages:
[1] stats graphics grDevices utils datasets methods base

loaded via a namespace (and not attached):
[1] Rcpp_1.0.0 rstudioapi_0.8 knitr_1.20 magrittr_1.5 usethis_1.4.0 devtools_2.0.1
[7] pkgload_1.0.2 R6_2.3.0 rlang_0.3.0.1 tools_3.5.1 pkgbuild_1.0.2 sessioninfo_1.1.1
[13] cli_1.0.1 withr_2.1.2 htmltools_0.3.6 remotes_2.0.2 yaml_2.2.0 assertthat_0.2.0
[19] digest_0.6.18 rprojroot_1.3-2 crayon_1.3.4 processx_3.2.0 callr_3.0.0 clisymbols_1.2.0
[25] base64enc_0.1-3 fs_1.2.6 ps_1.2.1 evaluate_0.12 glue_1.3.0 memoise_1.1.0
[31] rmarkdown_1.10 compiler_3.5.1 desc_1.2.0 backports_1.1.2 prettyunits_1.0.2






r build






share|improve this question















share|improve this question













share|improve this question




share|improve this question








edited Nov 22 '18 at 18:57









Dirk Eddelbuettel

278k37514603




278k37514603










asked Nov 22 '18 at 18:38









clemlaflemmeclemlaflemme

1,617820




1,617820








  • 2





    Minimal, Complete, and Verifiable example? Does the error happen when you call devtools::document() directly with different roclets?

    – Ralf Stubner
    Nov 22 '18 at 18:42











  • The error does not happen when I call the exacte same command from the Rstudio console

    – clemlaflemme
    Nov 22 '18 at 18:50











  • Also the command devtools::build() works from the RStudio console

    – clemlaflemme
    Nov 22 '18 at 18:52











  • Weird, but impossible to debug without a Minimal, Complete, and Verifiable example. Make a copy of the project and remove stuff from it until you cannot remove anything without also removing this error message.

    – Ralf Stubner
    Nov 22 '18 at 18:55











  • Removiing Rcpp tag ...

    – Dirk Eddelbuettel
    Nov 22 '18 at 18:56














  • 2





    Minimal, Complete, and Verifiable example? Does the error happen when you call devtools::document() directly with different roclets?

    – Ralf Stubner
    Nov 22 '18 at 18:42











  • The error does not happen when I call the exacte same command from the Rstudio console

    – clemlaflemme
    Nov 22 '18 at 18:50











  • Also the command devtools::build() works from the RStudio console

    – clemlaflemme
    Nov 22 '18 at 18:52











  • Weird, but impossible to debug without a Minimal, Complete, and Verifiable example. Make a copy of the project and remove stuff from it until you cannot remove anything without also removing this error message.

    – Ralf Stubner
    Nov 22 '18 at 18:55











  • Removiing Rcpp tag ...

    – Dirk Eddelbuettel
    Nov 22 '18 at 18:56








2




2





Minimal, Complete, and Verifiable example? Does the error happen when you call devtools::document() directly with different roclets?

– Ralf Stubner
Nov 22 '18 at 18:42





Minimal, Complete, and Verifiable example? Does the error happen when you call devtools::document() directly with different roclets?

– Ralf Stubner
Nov 22 '18 at 18:42













The error does not happen when I call the exacte same command from the Rstudio console

– clemlaflemme
Nov 22 '18 at 18:50





The error does not happen when I call the exacte same command from the Rstudio console

– clemlaflemme
Nov 22 '18 at 18:50













Also the command devtools::build() works from the RStudio console

– clemlaflemme
Nov 22 '18 at 18:52





Also the command devtools::build() works from the RStudio console

– clemlaflemme
Nov 22 '18 at 18:52













Weird, but impossible to debug without a Minimal, Complete, and Verifiable example. Make a copy of the project and remove stuff from it until you cannot remove anything without also removing this error message.

– Ralf Stubner
Nov 22 '18 at 18:55





Weird, but impossible to debug without a Minimal, Complete, and Verifiable example. Make a copy of the project and remove stuff from it until you cannot remove anything without also removing this error message.

– Ralf Stubner
Nov 22 '18 at 18:55













Removiing Rcpp tag ...

– Dirk Eddelbuettel
Nov 22 '18 at 18:56





Removiing Rcpp tag ...

– Dirk Eddelbuettel
Nov 22 '18 at 18:56












0






active

oldest

votes











Your Answer






StackExchange.ifUsing("editor", function () {
StackExchange.using("externalEditor", function () {
StackExchange.using("snippets", function () {
StackExchange.snippets.init();
});
});
}, "code-snippets");

StackExchange.ready(function() {
var channelOptions = {
tags: "".split(" "),
id: "1"
};
initTagRenderer("".split(" "), "".split(" "), channelOptions);

StackExchange.using("externalEditor", function() {
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled) {
StackExchange.using("snippets", function() {
createEditor();
});
}
else {
createEditor();
}
});

function createEditor() {
StackExchange.prepareEditor({
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: true,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: 10,
bindNavPrevention: true,
postfix: "",
imageUploader: {
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
},
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
});


}
});














draft saved

draft discarded


















StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53436580%2fwhy-devtoolsdocument-fails-with-unclear-c-error-message%23new-answer', 'question_page');
}
);

Post as a guest















Required, but never shown

























0






active

oldest

votes








0






active

oldest

votes









active

oldest

votes






active

oldest

votes
















draft saved

draft discarded




















































Thanks for contributing an answer to Stack Overflow!


  • Please be sure to answer the question. Provide details and share your research!

But avoid



  • Asking for help, clarification, or responding to other answers.

  • Making statements based on opinion; back them up with references or personal experience.


To learn more, see our tips on writing great answers.




draft saved


draft discarded














StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53436580%2fwhy-devtoolsdocument-fails-with-unclear-c-error-message%23new-answer', 'question_page');
}
);

Post as a guest















Required, but never shown





















































Required, but never shown














Required, but never shown












Required, but never shown







Required, but never shown

































Required, but never shown














Required, but never shown












Required, but never shown







Required, but never shown







Popular posts from this blog

404 Error Contact Form 7 ajax form submitting

How to know if a Active Directory user can login interactively

TypeError: fit_transform() missing 1 required positional argument: 'X'