Hi Hiru, The "C stack usage? 7976644 is too close to the limit" error is very reproducible: we see it on all devel builders and I can easily reproduce it on my laptop with: ? ? library(ExperimentHub) ? ? eh <- ExperimentHub() ? ? x <- eh[["EH5376"]] After some digging into this, I found that the problem was caused by a combination of unfortunate situations: (1) The EH5376 resource is a nested list that contains old serialized ggplot instances! I wonder what these ggplot objects are doing in ExperimentHub. Anyways, as you know, the latest version of the ggplot2 package (v 4.0.0) went thru some important internal refactoring of the numerous classes that it defines, which means that any ggplot object that got created/serialized **before** this refactoring is now invalid/broken. If these ggplot instances ended up in ExperimentHub by mistake, please consider updating/replacing the resource with something that is free of them. If they really need to be there, the resource would still need to be updated/replaced with something that contains **current** ggplot objects, that is ggplot object created with ggplot2 >= 4.0.0. (2) For some mysterious reason, the old ggplot instances contained in?EH5376 contain an environment that contains itself! For example: ? ? object <- x[[1]]$plotting$ggdendro_vertical ? ? class(object) ? ? # [1] "gg"? ? ?"ggplot" ? ? object$plot_env ? ? # <environment: 0x62c2536e6858> ? ? object$plot_env$b1$plot_env ? ? # <environment: 0x62c2536e6858> This is what triggers?the "C stack usage? 7976644 is too close to the limit" error. You see, when an EH resource is loaded with?eh[["EHXXXX"]], the code in ExperimentHub/AnnotationHub calls updateObject() internally on the object to return to the user right before returning it. The updateObject() generic and some of its methods are defined in the BiocGenerics package. One of the methods defined in BiocGenerics is the method for environments. This method walks recursively on the environment to update in order to visit and update all its components. The problem is?that this yields to an infinite recursion if an environment contains itself. This infinite recursion which is what the?"C stack usage? 7976644 is too close to the limit" error is about. In the latest BiocGenerics (0.55.3 in devel, 0.54.1 in release), I modified the updateObject() method for environments to avoid the infinite recursion if an environment contains itself. With this fix, I can do?eh[["EHXXXX"]]?without getting the?"C stack usage 7976644 is too close to the limit" error, so this error should go away on the build report in a couple of days. However, I would still recommend that you do something about the?old serialized ggplot instances contained in the?EH5376 resource. Cheers, H.
On 23/09/2025 06:39, Hiranyamaya Dash wrote:
Hello James, Thanks for your note. To clarify, this issue affects both EWCE and ewceData packages, which I maintain. The error comes from ExperimentHub resource loading in R-devel / Bioc-devel and is also breaking Bioconductor package builds (see EWCE build report I shared). Since it impacts package functionality and Bioconductor checks, I think it fits here on bioc-devel. I also suspect it may be related to recent changes in core R or Bioconductor in the devel branch. Any guidance would be much appreciated. Kind regards, Hiru On Tue, Sep 23, 2025 at 2:32?PM James W. MacDonald <jmacdon at uw.edu> wrote:
This list is meant for developers to discuss issues with package development. For general usage support, please post on the support site at https://support.bioconductor.org -----Original Message----- From: Bioc-devel <bioc-devel-bounces at r-project.org> On Behalf Of Hiranyamaya Dash Sent: Tuesday, September 23, 2025 9:27 AM To: bioc-devel at r-project.org Cc: Skene, Nathan G <n.skene at imperial.ac.uk>; h.dash at imperial.ac.uk Subject: [Bioc-devel] ExperimentHub Package Error - C stack usage (R, BioC devel) !-------------------------------------------------------------------| This Message Is From an Untrusted Sender You have not previously corresponded with this sender. See https://itconnect.uw.edu/email-tags for additional information. Please contact the UW-IT Service Center, help at uw.edu 206.221.5000, for assistance. |-------------------------------------------------------------------! Dear BioConductor Community, I am writing to report a technical issue I have encountered when attempting to load ExperimentHub object "EH5376" from the ewceData package. *Problem Description:* When attempting to load the specified resource, I consistently receive a "C stack usage too close to the limit" error. This issue is NOT present in the release R and Bioc versions. *Reprex:* (bioc-devel, R 2025-08-22 r88678) *Method 1: Loading via data package*
ewceData::ctd()see ?ewceData and browseVignettes('ewceData') for
documentationloading from cacheError loading resource. attempting to
re-downloaddownloading 1 resourcesretrieving 1 resourceloading from
cacheError: failed to load resource name: EH5376 title: ctd reason:
C stack usage 7957312 is too close to the limit
*Method 2: Loading directly with ExperimentHub*
hub <- ExperimentHub::ExperimentHub()snapshotDate(): 2025-09-22>
hub[["EH5376"]]see ?ewceData and browseVignettes('ewceData') for
documentationloading from cacheError loading resource. attempting to
re-downloaddownloading 1 resourcesretrieving 1 resourceloading from
cacheError: failed to load resource name: EH5376 title: ctd reason:
C stack usage 7953728 is too close to the limit
*Additional Context:* I have verified that the package functions correctly when using the *bioconductor_docker:RELEASE_3_19* image. No modifications have been made to the data or codebase ever since. This error is also affecting the BioConductor build checks for packages that depend on this data resource. Specifically, the issue manifests in R-devel, BioC 3.22 build results, as evidenced in the EWCE package check results: https://urldefense.com/v3/__https://bioconductor.org/checkResults/devel/bioc-LATEST/EWCE/nebbiolo2-buildsrc.html__;!!K-Hz7m0Vt54!jQRutwoDHKXBq8fF6ZtbSiO6_chW2E8Y9Hj22-GAfWALznyO7R4HMVEQdtitlM40dTmY0ug0v_B27zPZDg$ I have prepared a complete traceback, attached below. I would be most grateful for any assistance you could provide in resolving this issue. Yours sincerely, Hiru -- *Hiranyamaya (Hiru) Dash* (he/him) Research Assistant in Computational Genomics UK Dementia Research Institute at Imperial College London --- Error: failed to load resource name: EH5376 title: ctd reason: C stack usage 7953728 is too close to the limit18. stop("failed to load resource", "\n name: ", names(x), "\n title: ",x$title, "\n reason: ", conditionMessage(err), call. = FALSE)17. value[[3L]](cond)16. tryCatchOne(expr, names, parentenv, handlers[[1L]])15. tryCatchList(expr, classes, parentenv, handlers)14. tryCatch({message("Error loading resource.", "\n attempting to re-download")fls <- cache(getHub(class), config = config, progress = progress,force = TRUE, verbose = verbose) ... 13. value[[3L]](cond)12. tryCatchOne(expr, names, parentenv, handlers[[1L]])11. tryCatchList(expr, classes, parentenv, handlers)10. tryCatch({fls <- cache(getHub(class), config = config, progress = progress,force = force, verbose = verbose).get1(class) ... 9. .Hub_get1(x[idx], force = force, verbose = verbose, config = config,progress = progress)8. .local(x, i, j = j, ...)7. .nextMethod(x, i, j, ..., force = force, verbose = verbose, config = config,progress = progress)6. eval(call, callEnv)5. eval(call, callEnv)4. callNextMethod(x, i, j, ..., force = force, verbose = verbose,config = config, progress = progress)3. .local(x, i, j = j, ...)2. hub[["EH5376"]]1. hub[["EH5376"]] [[alternative HTML version deleted]]
_______________________________________________ Bioc-devel at r-project.org mailing list https://urldefense.com/v3/__https://stat.ethz.ch/mailman/listinfo/bioc-devel__;!!K-Hz7m0Vt54!jQRutwoDHKXBq8fF6ZtbSiO6_chW2E8Y9Hj22-GAfWALznyO7R4HMVEQdtitlM40dTmY0ug0v_A2QxzZLg$
[[alternative HTML version deleted]]
_______________________________________________ Bioc-devel at r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/bioc-devel
Herv? Pag?s Bioconductor Core Team hpages.on.github at gmail.com