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

Strange issue on win devel #1007

Closed
strengejacke opened this issue Mar 21, 2024 · 4 comments
Closed

Strange issue on win devel #1007

strengejacke opened this issue Mar 21, 2024 · 4 comments

Comments

@strengejacke
Copy link
Contributor

I'm seeing two strange issues that seem to be related particularly to glmmTMB on win devel. Following example seems to fail:

library(glmmTMB)
data(Salamanders, package = "glmmTMB")
m <- glmmTMB(
  count ~ mined + spp + (1 | site),
  family = poisson,
  data = Salamanders
)
check_overdispersion(m)

Based on the log from win builder (and CRAN submission), I can't really say what's the issue here:

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

> base::assign(".ptime", proc.time(), pos = "CheckExEnv")
> ### Name: check_overdispersion
> ### Title: Check overdispersion (and underdispersion) of GL(M)M's
> ### Aliases: check_overdispersion check_overdispersion.performance_simres
> 
> ### ** Examples
> 
> ## Don't show: 
> if (getRversion() >= "4.0.0" && require("glmmTMB", quietly = TRUE) && require("DHARMa", quietly = TRUE)) (if (getRversion() >= "3.4") withAutoprint else force)({ # examplesIf
+ ## End(Don't show)
+ 
+ library(glmmTMB)
+ data(Salamanders)
+ m <- glm(count ~ spp + mined, family = poisson, data = Salamanders)
+ check_overdispersion(m)
+ 
+ m <- glmmTMB(
+   count ~ mined + spp + (1 | site),
+   family = poisson,
+   data = Salamanders
+ )
+ check_overdispersion(m)
+ ## Don't show: 
+ }) # examplesIf
This is DHARMa 0.4.6. For overview type '?DHARMa'. For recent changes, type news(package = 'DHARMa')
> library(glmmTMB)
> data(Salamanders)
> m <- glm(count ~ spp + mined, family = poisson, data = Salamanders)
> check_overdispersion(m)
# Overdispersion test

       dispersion ratio =    2.946
  Pearson's Chi-Squared = 1873.710
                p-value =  < 0.001

Overdispersion detected.
> m <- glmmTMB(count ~ mined + spp + (1 | site), family = poisson, data = Salamanders)
* checking for unstated dependencies in 'tests' ... OK

The second example is a similar mystery:

* checking tests ... ERROR
  Running 'testthat.R'
Running the tests in 'tests/testthat.R' failed.
Complete output:
  > library(testthat)
  > library(performance)
  > 
  > test_check("performance")
  Starting 2 test processes
  
  
  Error in `private$handle_error()`:
  ! testthat subprocess exited in file `test-check_collinearity.R`
  Caused by error:
  ! R session crashed with exit code -1073741819
  Backtrace:
       ▆
    1. └─testthat::test_check("performance")
    2.   └─testthat::test_dir(...)
    3.     └─testthat:::test_files(...)
    4.       └─testthat:::test_files_parallel(...)
    5.         ├─withr::with_dir(...)
    6.         │ └─base::force(code)
    7.         ├─testthat::with_reporter(...)
    8.         │ └─base::tryCatch(...)
    9.         │   └─base (local) tryCatchList(expr, classes, parentenv, handlers)
   10.         │     └─base (local) tryCatchOne(expr, names, parentenv, handlers[[1L]])
   11.         │       └─base (local) doTryCatch(return(expr), name, parentenv, handler)
   12.         └─testthat:::parallel_event_loop_chunky(queue, reporters, ".")
   13.           └─queue$poll(Inf)
   14.             └─base::lapply(...)
   15.               └─testthat (local) FUN(X[[i]], ...)
   16.                 └─private$handle_error(msg, i)
   17.                   └─rlang::abort(...)
  Execution halted
* checking PDF version of manual ... [16s] OK
* checking HTML version of manual ... [12s] OK
* DONE
Status: 2 ERRORs

I have installed win-devel and checked with glmmTMB 1.1.8 and 1.1.9 locally, no problems at all. Not sure what's going on here?

For now, I disabled tests for R versions > 4.3.3 and changed the example to use simple glm() only. This is just to let you know, not sure if this is actually an issue of glmmTMB, or the interplay of glmmTMB and win devel?

@strengejacke
Copy link
Contributor Author

Nevermind, it seems like it could be an issue with win-devel, insight is also failing (which I wanted to submit with the fix discussed in #1000):
https://win-builder.r-project.org/PeZmMti2nu9v/00check.log

@strengejacke
Copy link
Contributor Author

Ok, I skipped all tests that involved glmmTMB for win-devel only:

    skip_if(getRversion() > "4.3.3")
    skip_if_not_installed("glmmTMB")

Now, all checks pass: https://win-builder.r-project.org/r39q4M5S4y29/00check.log

So, it actually seems to be an issue in combination of glmmTMB (which version?) and CRAN win-devel?
Checking for insight now - test-cpglmm.R failed, which does not involve glmmTMB (unless cpglmm loads that package/namespace, but not sure - will try to figure out more).

@bbolker
Copy link
Contributor

bbolker commented Mar 21, 2024

Does this also fail on windows/r-devel on GitHub actions? We had problems due to the versions of upstream packages that were installed on win-builder (due to previous runs by other developers that had uploaded those package versions ...), comments starting here

@strengejacke
Copy link
Contributor Author

No, doesn't fail on win-devel/GitHub. That's what made this issue even weirder. Thanks for the pointer to the discussion, might explain what's going on here

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

No branches or pull requests

2 participants