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

revdep DramaAnalysis failure after as.data.frame redirect #6739

Closed
tdhock opened this issue Jan 20, 2025 · 4 comments
Closed

revdep DramaAnalysis failure after as.data.frame redirect #6739

tdhock opened this issue Jan 20, 2025 · 4 comments
Labels
revdep Reverse dependencies
Milestone

Comments

@tdhock
Copy link
Member

tdhock commented Jan 20, 2025

revdep check machine says #5700 is causing new issues with DramaAnalysis checks

* checking examples ... ERROR
Running examples in 'DramaAnalysis-Ex.R' failed
The error most likely occurred in:

> base::assign(".ptime", proc.time(), pos = "CheckExEnv")
> ### Name: dictionaryStatistics
> ### Title: Dictionary Use
> ### Aliases: dictionaryStatistics dictionaryStatisticsSingle
> ###   as.matrix.QDDictionaryStatistics
> 
> ### ** Examples
> 
> # Check multiple dictionary entries
> data(rksp.0)
> dstat <- dictionaryStatistics(rksp.0, fieldnames=c("Krieg","Familie"))
Error in `<current-expression>` : node stack overflow
Calls: dictionaryStatistics ... as.data.table -> as.data.frame -> as.data.frame.data.frame
Execution halted
... 
* checking tests ...
  Running 'testthat.R'
 ERROR
Running the tests in 'tests/testthat.R' failed.
Complete output:
  > library(testthat)
  > library(DramaAnalysis)
  DramaAnalysis 3.0.2
  > 
  > test_check("DramaAnalysis")
  [ FAIL 2 | WARN 84 | SKIP 1 | PASS 255 ]
  
  == Skipped tests (1) ===========================================================
  * On CRAN (1): 'test-loading.R:6:3'
  
  == Failed tests ================================================================
  -- Error: (code run outside of `test_that()`) ----------------------------------
  <nodeStackOverflowError/stackOverflowError/error/condition>
  Error: node stack overflow
  -- Error: (code run outside of `test_that()`) ----------------------------------
  <nodeStackOverflowError/stackOverflowError/error/condition>
  Error: node stack overflow
  
  [ FAIL 2 | WARN 84 | SKIP 1 | PASS 255 ]
  Error: Test failures

@MichaelChirico @jangorecki can you please investigate?

@tdhock tdhock added the revdep Reverse dependencies label Jan 20, 2025
@tdhock tdhock added this to the 1.17.0 milestone Jan 20, 2025
@MichaelChirico

This comment has been minimized.

@MichaelChirico
Copy link
Member

MichaelChirico commented Jan 21, 2025

I think it's something of a downstream bug -- they wind up with a duplicate-classed object here:

https://github.com/quadrama/DramaAnalysis/blob/bb7357b1afcf4d6b11ffd0cc6ac120ed5a9751d4/tests/testthat/test-dictionary-statistics.R#L50

Debugging as.data.table.data.frame() finds:

class(x)
# [1] "QDDictionaryStatistics" "QDHasCharacter"         "QDByDrama"             
# [4] "data.frame"             "data.table"             "data.frame"            
# [7] "QDByCharacter" 

That suggests a reprex:

x = copy(mtcars)
setattr(x, "class", c("data.frame", "data.table", "data.frame"))
as.data.table(x)
# Error: C stack usage  7974516 is too close to the limit

Filed quadrama/DramaAnalysis#173 downstream, and also confirmed that the duplicate class is also present on 1.16.4.

@MichaelChirico
Copy link
Member

Actually, we don't need an example as quirky as "duplicate class", we just need the classes reversed:

x = mtcars
class(x) = c("data.frame", "data.table")
as.data.table(x) # on master
# Error: C stack usage  7969844 is too close to the limit

@MichaelChirico
Copy link
Member

This no longer appears, e.g. as of Jan 22:

https://rcdata.nau.edu/genomic-ml/data.table-revdeps/analyze/2025-01-22/

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
revdep Reverse dependencies
Projects
None yet
Development

No branches or pull requests

2 participants