Skip to content
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

plot_str Error: C stack usage 7970280 is too close to the limit #57

Closed
boxuancui opened this issue Feb 14, 2018 · 5 comments

Comments

Projects
None yet
2 participants
@boxuancui
Copy link
Owner

commented Feb 14, 2018

Identified by @holgerbrandl from Revolutions blog post.

plot_str just gives:
Error: C stack usage 7970280 is too close to the limit

@holgerbrandl Do you mind sharing a subset of your data, so that I can re-produce?

@boxuancui

This comment has been minimized.

Copy link
Owner Author

commented Feb 14, 2018

@holgerbrandl On another note, thanks for your suggestions on the theme issue. @amrrs just created #56 and maybe I can do something there.

@holgerbrandl

This comment has been minimized.

Copy link

commented Feb 14, 2018

Interestintly, the error changes when running it twice

> plot_str(dds)
Error: evaluation nested too deeply: infinite recursion / options(expressions=)?
> plot_str(dds)
Error: C stack usage  7970312 is too close to the limit
> devtools::session_info()
Session info ------------------------------------------------------------------
 setting  value                       
 version  R version 3.4.0 (2017-04-21)
 system   x86_64, darwin15.6.0        
 ui       X11                         
 language (EN)                        
 collate  en_US.UTF-8                 
 tz       <NA>                        
 date     2018-02-14                  

To reproduce it, try

dds = local(get(load(url("https://cloud.mpi-cbg.de/index.php/s/1FVDEUnWhm8N7cJ/download"))))
DataExplorer::plot_str(dds)

The dds is a data structure created with https://bioconductor.org/packages/release/bioc/html/DESeq2.html

Error is the same on MacOS and linux for me.

@boxuancui

This comment has been minimized.

Copy link
Owner Author

commented Mar 22, 2018

Note to myself:

  • I don't think it fully support S4 objects yet.
  • Figure out what went wrong in the recursion.
  • Same error on glmnet object:
    test <- glmnet(matrix(rnorm(100 * 20), 100, 20), rnorm(100))
    plot_str(test)
    # Error: evaluation nested too deeply: infinite recursion / options(expressions=)?
    # Error during wrapup: evaluation nested too deeply: infinite recursion / options(expressions=)?
    plot_str(test, max_level = 4)
    # Error: C stack usage  7969624 is too close to the limit
    
    • Setting max_level to 1, 2 and 3 produces the same chart, very likely due to the S4 methods.

@boxuancui boxuancui added the type: bug label Mar 22, 2018

@boxuancui boxuancui self-assigned this Mar 22, 2018

boxuancui added a commit that referenced this issue May 29, 2018

@boxuancui

This comment has been minimized.

Copy link
Owner Author

commented May 29, 2018

@holgerbrandl When I run the following command, it is giving me an error. Since plot_str is based on the output of str, it will fail as well. Do you have the same problem?

> dds <- local(get(load(url("https://cloud.mpi-cbg.de/index.php/s/1FVDEUnWhm8N7cJ/download"))))
> str(dds)
Formal class 'DESeqDataSet' [package "DESeq2"] with 8 slots
  ..@ design            :Class 'formula'  language ~sample
  .. .. ..- attr(*, ".Environment")=<environment: R_GlobalEnv> 
  ..@ dispersionFunction:function (q)  
  .. ..- attr(*, "coefficients")= Named num [1:2] 0.0839 2.3722
  .. .. ..- attr(*, "names")= chr [1:2] "asymptDisp" "extraPois"
  .. ..- attr(*, "fitType")= chr "parametric"
  .. ..- attr(*, "varLogDispEsts")= num 0.566
  .. ..- attr(*, "dispPriorVar")= num 0.25
  ..@ rowRanges         :Formal class 'GRangesList' [package "GenomicRanges"] with 5 slots
  .. .. ..@ unlistData     :Error in FUN(X[[i]], ...) : 
  no slot of name "elementType" for this object of class "GRanges"

However, the infinite recursion and C stack overflow are mostly due to the lack of S4 support, which should be fixed (in develop) now.

@boxuancui boxuancui added this to the 0.6.0 milestone May 30, 2018

boxuancui added a commit that referenced this issue May 30, 2018

@boxuancui

This comment has been minimized.

Copy link
Owner Author

commented May 30, 2018

I am closing this for v0.6 release. As I said in the comment above, the infinite recursion and C stack overflow errors were caused by S4 objects, and it should be fixed. Please create a separate issue if anything else is not working.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.