Re: [Bioc-devel] Spurious errors unit testing on R CMD check

2016-05-04 Thread Hector Corrada Bravo
There were two small utility classes with finalizers defined. They seem to
be the culprits. I've removed those finalizers and haven't seen errors so
far.

Thanks!
Hector

On Mon, May 2, 2016 at 1:18 AM, Hervé Pagès  wrote:

> Hi Michael, Hector,
>
> On 04/29/2016 01:11 PM, Michael Lawrence wrote:
>
>> No, those aren't reference classes. There are some reference classes
>> in GenomicFeatures (like TxDb) and BSgenome. I don't think they set
>> explicit finalize methods though.
>>
>
> No reference classes in IRanges, GenomicRanges, or BSgenome but there
> are finalizers defined on external pointers in IRanges (for NCList and
> GNCList objects) and on environments in BSgenome.
>
> H.
>
>
>
>> On Fri, Apr 29, 2016 at 12:58 PM, Hector Corrada Bravo
>>  wrote:
>>
>>> I've removed all finalizers on these classes for this version and are
>>> still
>>> seeing it. I'll try with gctorture on and see if I can track it down. Any
>>> finalizers on GenomicRanges? GNCList or GRanges?
>>>
>>> On Fri, Apr 29, 2016 at 3:42 PM, Michael Lawrence
>>>  wrote:
>>>

 I don't think there are any reference classes in GenomeInfoDb. This
 must be something weird happening to one of the epivizr reference
 classes. It just shows up in that stack trace under GenomeInfoDb
 because of the GC. I haven't managed to reproduce it yet though.

 Michael

 On Fri, Apr 29, 2016 at 12:15 PM, Michael Lawrence 
 wrote:

> I can look into it. I guess it fails sporadically because of the
> garbage collector. Activating GC torture might make this easier to
> reproduce.
>
> On Fri, Apr 29, 2016 at 12:06 PM, Hector Corrada Bravo
>  wrote:
>
>> I've seen this type of error for a while and have really struggled to
>> track
>> it down. I have a package with unit tests that sporadically fail on R
>> CMD
>> check with errors of this type:
>>
>> ---
>>
>>> test_check("epivizrData")
>>>
>> 1. Error: new creates a proper object (@test-creation.R#17)
>> 
>> attempt to apply non-function
>> 1: expect_equal(mgr$.seqinfo, GenomeInfoDb::Seqinfo()) at
>> testthat/test-creation.R:17
>> 2: compare(object, expected, ...)
>> 3: compare.default(object, expected, ...)
>> 4: all.equal(x, y, ...)
>> 5: all.equal.default(x, y, ...)
>> 6: GenomeInfoDb::Seqinfo()
>> 7: .normargGenome(genome, seqnames)
>> 8: rep.int(ugenome, length(seqnames))
>> 9: (function (classes, fdef, mtable)
>> {
>> methods <- .findInheritedMethods(classes, fdef, mtable)
>> if (length(methods) == 1L)
>> return(methods[[1L]])
>> else if (length(methods) == 0L) {
>> cnames <- paste0("\"", vapply(classes, as.character, ""),
>> "\"",
>> collapse = ", ")
>> stop(gettextf("unable to find an inherited method for
>> function
>> %s for signature %s",
>> sQuote(fdef@generic), sQuote(cnames)), domain = NA)
>> }
>> else stop("Internal error in finding inherited methods; didn't
>> return a unique method",
>> domain = NA)
>> })(list("character"), structure(function (x, times)
>> standardGeneric("rep.int"), generic = structure("rep.int",
>> package =
>> "base"), package = "base", group = list(), valueClass = character(0),
>> signature = c("x",
>> "times"), default = structure(function (x, times)
>> .Internal(rep.int(x, times)), target = structure("ANY", class =
>> structure("signature", package = "methods"), .Names = "x", package =
>> "methods"), defined = structure("ANY", class = structure("signature",
>> package = "methods"), .Names = "x", package = "methods"), generic =
>> structure("rep.int", package = "base"), class =
>> structure("derivedDefaultMethod", package = "methods")), skeleton =
>> (structure(function (x,
>> times)
>> .Internal(rep.int(x, times)), target = structure("ANY", class =
>> structure("signature", package = "methods"), .Names = "x", package =
>> "methods"), defined = structure("ANY", class = structure("signature",
>> package = "methods"), .Names = "x", package = "methods"), generic =
>> structure("rep.int", package = "base"), class =
>> structure("derivedDefaultMethod", package = "methods")))(x,
>> times), class = structure("standardGeneric", package =
>> "methods")),
>> )
>> 10: .findInheritedMethods(classes, fdef, mtable)
>> 11: .inheritedArgsExpression(m@target, m@defined, body(m))
>> 12: extends(target[[i]], defined[[i]], fullInfo = TRUE)
>> 13: target[[i]]
>> 14: (function (x)
>> x$.self$finalize())()
>> ---
>>
>> I do not define any finalize method on classes defined on my 

Re: [Bioc-devel] Spurious errors unit testing on R CMD check

2016-05-01 Thread Hervé Pagès

Hi Michael, Hector,

On 04/29/2016 01:11 PM, Michael Lawrence wrote:

No, those aren't reference classes. There are some reference classes
in GenomicFeatures (like TxDb) and BSgenome. I don't think they set
explicit finalize methods though.


No reference classes in IRanges, GenomicRanges, or BSgenome but there
are finalizers defined on external pointers in IRanges (for NCList and
GNCList objects) and on environments in BSgenome.

H.



On Fri, Apr 29, 2016 at 12:58 PM, Hector Corrada Bravo
 wrote:

I've removed all finalizers on these classes for this version and are still
seeing it. I'll try with gctorture on and see if I can track it down. Any
finalizers on GenomicRanges? GNCList or GRanges?

On Fri, Apr 29, 2016 at 3:42 PM, Michael Lawrence
 wrote:


I don't think there are any reference classes in GenomeInfoDb. This
must be something weird happening to one of the epivizr reference
classes. It just shows up in that stack trace under GenomeInfoDb
because of the GC. I haven't managed to reproduce it yet though.

Michael

On Fri, Apr 29, 2016 at 12:15 PM, Michael Lawrence 
wrote:

I can look into it. I guess it fails sporadically because of the
garbage collector. Activating GC torture might make this easier to
reproduce.

On Fri, Apr 29, 2016 at 12:06 PM, Hector Corrada Bravo
 wrote:

I've seen this type of error for a while and have really struggled to
track
it down. I have a package with unit tests that sporadically fail on R
CMD
check with errors of this type:

---

test_check("epivizrData")

1. Error: new creates a proper object (@test-creation.R#17)

attempt to apply non-function
1: expect_equal(mgr$.seqinfo, GenomeInfoDb::Seqinfo()) at
testthat/test-creation.R:17
2: compare(object, expected, ...)
3: compare.default(object, expected, ...)
4: all.equal(x, y, ...)
5: all.equal.default(x, y, ...)
6: GenomeInfoDb::Seqinfo()
7: .normargGenome(genome, seqnames)
8: rep.int(ugenome, length(seqnames))
9: (function (classes, fdef, mtable)
{
methods <- .findInheritedMethods(classes, fdef, mtable)
if (length(methods) == 1L)
return(methods[[1L]])
else if (length(methods) == 0L) {
cnames <- paste0("\"", vapply(classes, as.character, ""),
"\"",
collapse = ", ")
stop(gettextf("unable to find an inherited method for
function
%s for signature %s",
sQuote(fdef@generic), sQuote(cnames)), domain = NA)
}
else stop("Internal error in finding inherited methods; didn't
return a unique method",
domain = NA)
})(list("character"), structure(function (x, times)
standardGeneric("rep.int"), generic = structure("rep.int", package =
"base"), package = "base", group = list(), valueClass = character(0),
signature = c("x",
"times"), default = structure(function (x, times)
.Internal(rep.int(x, times)), target = structure("ANY", class =
structure("signature", package = "methods"), .Names = "x", package =
"methods"), defined = structure("ANY", class = structure("signature",
package = "methods"), .Names = "x", package = "methods"), generic =
structure("rep.int", package = "base"), class =
structure("derivedDefaultMethod", package = "methods")), skeleton =
(structure(function (x,
times)
.Internal(rep.int(x, times)), target = structure("ANY", class =
structure("signature", package = "methods"), .Names = "x", package =
"methods"), defined = structure("ANY", class = structure("signature",
package = "methods"), .Names = "x", package = "methods"), generic =
structure("rep.int", package = "base"), class =
structure("derivedDefaultMethod", package = "methods")))(x,
times), class = structure("standardGeneric", package =
"methods")),
)
10: .findInheritedMethods(classes, fdef, mtable)
11: .inheritedArgsExpression(m@target, m@defined, body(m))
12: extends(target[[i]], defined[[i]], fullInfo = TRUE)
13: target[[i]]
14: (function (x)
x$.self$finalize())()
---

I do not define any finalize method on classes defined on my package.
This
stems from a finalizer on a class defined in a package imported by my
package (GenomeInfoDb), which I'm guessing is detached from the
environment
before this finalize function is called.

Any ideas on how to avoid this error?

Package source here:
https://github.com/bioconductor-mirror/epivizrData

 [[alternative HTML version deleted]]

___
Bioc-devel@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/bioc-devel






___
Bioc-devel@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/bioc-devel



--
Hervé Pagès

Program in Computational Biology
Division of Public Health Sciences
Fred Hutchinson Cancer Research Center
1100 Fairview Ave. N, M1-B514
P.O. Box 19024
Seattle, WA 98109-1024

E-mail: hpa...@fredhutch.org
Phone:  (206) 667-5791
Fax:(206) 

Re: [Bioc-devel] Spurious errors unit testing on R CMD check

2016-04-29 Thread Michael Lawrence
No, those aren't reference classes. There are some reference classes
in GenomicFeatures (like TxDb) and BSgenome. I don't think they set
explicit finalize methods though.

On Fri, Apr 29, 2016 at 12:58 PM, Hector Corrada Bravo
 wrote:
> I've removed all finalizers on these classes for this version and are still
> seeing it. I'll try with gctorture on and see if I can track it down. Any
> finalizers on GenomicRanges? GNCList or GRanges?
>
> On Fri, Apr 29, 2016 at 3:42 PM, Michael Lawrence
>  wrote:
>>
>> I don't think there are any reference classes in GenomeInfoDb. This
>> must be something weird happening to one of the epivizr reference
>> classes. It just shows up in that stack trace under GenomeInfoDb
>> because of the GC. I haven't managed to reproduce it yet though.
>>
>> Michael
>>
>> On Fri, Apr 29, 2016 at 12:15 PM, Michael Lawrence 
>> wrote:
>> > I can look into it. I guess it fails sporadically because of the
>> > garbage collector. Activating GC torture might make this easier to
>> > reproduce.
>> >
>> > On Fri, Apr 29, 2016 at 12:06 PM, Hector Corrada Bravo
>> >  wrote:
>> >> I've seen this type of error for a while and have really struggled to
>> >> track
>> >> it down. I have a package with unit tests that sporadically fail on R
>> >> CMD
>> >> check with errors of this type:
>> >>
>> >> ---
>> >>> test_check("epivizrData")
>> >> 1. Error: new creates a proper object (@test-creation.R#17)
>> >> 
>> >> attempt to apply non-function
>> >> 1: expect_equal(mgr$.seqinfo, GenomeInfoDb::Seqinfo()) at
>> >> testthat/test-creation.R:17
>> >> 2: compare(object, expected, ...)
>> >> 3: compare.default(object, expected, ...)
>> >> 4: all.equal(x, y, ...)
>> >> 5: all.equal.default(x, y, ...)
>> >> 6: GenomeInfoDb::Seqinfo()
>> >> 7: .normargGenome(genome, seqnames)
>> >> 8: rep.int(ugenome, length(seqnames))
>> >> 9: (function (classes, fdef, mtable)
>> >>{
>> >>methods <- .findInheritedMethods(classes, fdef, mtable)
>> >>if (length(methods) == 1L)
>> >>return(methods[[1L]])
>> >>else if (length(methods) == 0L) {
>> >>cnames <- paste0("\"", vapply(classes, as.character, ""),
>> >> "\"",
>> >> collapse = ", ")
>> >>stop(gettextf("unable to find an inherited method for
>> >> function
>> >> %s for signature %s",
>> >>sQuote(fdef@generic), sQuote(cnames)), domain = NA)
>> >>}
>> >>else stop("Internal error in finding inherited methods; didn't
>> >> return a unique method",
>> >>domain = NA)
>> >>})(list("character"), structure(function (x, times)
>> >>standardGeneric("rep.int"), generic = structure("rep.int", package =
>> >> "base"), package = "base", group = list(), valueClass = character(0),
>> >> signature = c("x",
>> >>"times"), default = structure(function (x, times)
>> >>.Internal(rep.int(x, times)), target = structure("ANY", class =
>> >> structure("signature", package = "methods"), .Names = "x", package =
>> >> "methods"), defined = structure("ANY", class = structure("signature",
>> >> package = "methods"), .Names = "x", package = "methods"), generic =
>> >> structure("rep.int", package = "base"), class =
>> >> structure("derivedDefaultMethod", package = "methods")), skeleton =
>> >> (structure(function (x,
>> >>times)
>> >>.Internal(rep.int(x, times)), target = structure("ANY", class =
>> >> structure("signature", package = "methods"), .Names = "x", package =
>> >> "methods"), defined = structure("ANY", class = structure("signature",
>> >> package = "methods"), .Names = "x", package = "methods"), generic =
>> >> structure("rep.int", package = "base"), class =
>> >> structure("derivedDefaultMethod", package = "methods")))(x,
>> >>times), class = structure("standardGeneric", package =
>> >> "methods")),
>> >> )
>> >> 10: .findInheritedMethods(classes, fdef, mtable)
>> >> 11: .inheritedArgsExpression(m@target, m@defined, body(m))
>> >> 12: extends(target[[i]], defined[[i]], fullInfo = TRUE)
>> >> 13: target[[i]]
>> >> 14: (function (x)
>> >>x$.self$finalize())()
>> >> ---
>> >>
>> >> I do not define any finalize method on classes defined on my package.
>> >> This
>> >> stems from a finalizer on a class defined in a package imported by my
>> >> package (GenomeInfoDb), which I'm guessing is detached from the
>> >> environment
>> >> before this finalize function is called.
>> >>
>> >> Any ideas on how to avoid this error?
>> >>
>> >> Package source here:
>> >> https://github.com/bioconductor-mirror/epivizrData
>> >>
>> >> [[alternative HTML version deleted]]
>> >>
>> >> ___
>> >> Bioc-devel@r-project.org mailing list
>> >> https://stat.ethz.ch/mailman/listinfo/bioc-devel
>> >>
>
>

___
Bioc-devel@r-project.org mailing list

Re: [Bioc-devel] Spurious errors unit testing on R CMD check

2016-04-29 Thread Hector Corrada Bravo
I've removed all finalizers on these classes for this version and are still
seeing it. I'll try with gctorture on and see if I can track it down. Any
finalizers on GenomicRanges? GNCList or GRanges?

On Fri, Apr 29, 2016 at 3:42 PM, Michael Lawrence  wrote:

> I don't think there are any reference classes in GenomeInfoDb. This
> must be something weird happening to one of the epivizr reference
> classes. It just shows up in that stack trace under GenomeInfoDb
> because of the GC. I haven't managed to reproduce it yet though.
>
> Michael
>
> On Fri, Apr 29, 2016 at 12:15 PM, Michael Lawrence 
> wrote:
> > I can look into it. I guess it fails sporadically because of the
> > garbage collector. Activating GC torture might make this easier to
> > reproduce.
> >
> > On Fri, Apr 29, 2016 at 12:06 PM, Hector Corrada Bravo
> >  wrote:
> >> I've seen this type of error for a while and have really struggled to
> track
> >> it down. I have a package with unit tests that sporadically fail on R
> CMD
> >> check with errors of this type:
> >>
> >> ---
> >>> test_check("epivizrData")
> >> 1. Error: new creates a proper object (@test-creation.R#17)
> >> 
> >> attempt to apply non-function
> >> 1: expect_equal(mgr$.seqinfo, GenomeInfoDb::Seqinfo()) at
> >> testthat/test-creation.R:17
> >> 2: compare(object, expected, ...)
> >> 3: compare.default(object, expected, ...)
> >> 4: all.equal(x, y, ...)
> >> 5: all.equal.default(x, y, ...)
> >> 6: GenomeInfoDb::Seqinfo()
> >> 7: .normargGenome(genome, seqnames)
> >> 8: rep.int(ugenome, length(seqnames))
> >> 9: (function (classes, fdef, mtable)
> >>{
> >>methods <- .findInheritedMethods(classes, fdef, mtable)
> >>if (length(methods) == 1L)
> >>return(methods[[1L]])
> >>else if (length(methods) == 0L) {
> >>cnames <- paste0("\"", vapply(classes, as.character, ""),
> "\"",
> >> collapse = ", ")
> >>stop(gettextf("unable to find an inherited method for
> function
> >> %s for signature %s",
> >>sQuote(fdef@generic), sQuote(cnames)), domain = NA)
> >>}
> >>else stop("Internal error in finding inherited methods; didn't
> >> return a unique method",
> >>domain = NA)
> >>})(list("character"), structure(function (x, times)
> >>standardGeneric("rep.int"), generic = structure("rep.int", package =
> >> "base"), package = "base", group = list(), valueClass = character(0),
> >> signature = c("x",
> >>"times"), default = structure(function (x, times)
> >>.Internal(rep.int(x, times)), target = structure("ANY", class =
> >> structure("signature", package = "methods"), .Names = "x", package =
> >> "methods"), defined = structure("ANY", class = structure("signature",
> >> package = "methods"), .Names = "x", package = "methods"), generic =
> >> structure("rep.int", package = "base"), class =
> >> structure("derivedDefaultMethod", package = "methods")), skeleton =
> >> (structure(function (x,
> >>times)
> >>.Internal(rep.int(x, times)), target = structure("ANY", class =
> >> structure("signature", package = "methods"), .Names = "x", package =
> >> "methods"), defined = structure("ANY", class = structure("signature",
> >> package = "methods"), .Names = "x", package = "methods"), generic =
> >> structure("rep.int", package = "base"), class =
> >> structure("derivedDefaultMethod", package = "methods")))(x,
> >>times), class = structure("standardGeneric", package =
> "methods")),
> >> )
> >> 10: .findInheritedMethods(classes, fdef, mtable)
> >> 11: .inheritedArgsExpression(m@target, m@defined, body(m))
> >> 12: extends(target[[i]], defined[[i]], fullInfo = TRUE)
> >> 13: target[[i]]
> >> 14: (function (x)
> >>x$.self$finalize())()
> >> ---
> >>
> >> I do not define any finalize method on classes defined on my package.
> This
> >> stems from a finalizer on a class defined in a package imported by my
> >> package (GenomeInfoDb), which I'm guessing is detached from the
> environment
> >> before this finalize function is called.
> >>
> >> Any ideas on how to avoid this error?
> >>
> >> Package source here:
> >> https://github.com/bioconductor-mirror/epivizrData
> >>
> >> [[alternative HTML version deleted]]
> >>
> >> ___
> >> Bioc-devel@r-project.org mailing list
> >> https://stat.ethz.ch/mailman/listinfo/bioc-devel
> >>
>

[[alternative HTML version deleted]]

___
Bioc-devel@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/bioc-devel


Re: [Bioc-devel] Spurious errors unit testing on R CMD check

2016-04-29 Thread Michael Lawrence
I can look into it. I guess it fails sporadically because of the
garbage collector. Activating GC torture might make this easier to
reproduce.

On Fri, Apr 29, 2016 at 12:06 PM, Hector Corrada Bravo
 wrote:
> I've seen this type of error for a while and have really struggled to track
> it down. I have a package with unit tests that sporadically fail on R CMD
> check with errors of this type:
>
> ---
>> test_check("epivizrData")
> 1. Error: new creates a proper object (@test-creation.R#17)
> 
> attempt to apply non-function
> 1: expect_equal(mgr$.seqinfo, GenomeInfoDb::Seqinfo()) at
> testthat/test-creation.R:17
> 2: compare(object, expected, ...)
> 3: compare.default(object, expected, ...)
> 4: all.equal(x, y, ...)
> 5: all.equal.default(x, y, ...)
> 6: GenomeInfoDb::Seqinfo()
> 7: .normargGenome(genome, seqnames)
> 8: rep.int(ugenome, length(seqnames))
> 9: (function (classes, fdef, mtable)
>{
>methods <- .findInheritedMethods(classes, fdef, mtable)
>if (length(methods) == 1L)
>return(methods[[1L]])
>else if (length(methods) == 0L) {
>cnames <- paste0("\"", vapply(classes, as.character, ""), "\"",
> collapse = ", ")
>stop(gettextf("unable to find an inherited method for function
> %s for signature %s",
>sQuote(fdef@generic), sQuote(cnames)), domain = NA)
>}
>else stop("Internal error in finding inherited methods; didn't
> return a unique method",
>domain = NA)
>})(list("character"), structure(function (x, times)
>standardGeneric("rep.int"), generic = structure("rep.int", package =
> "base"), package = "base", group = list(), valueClass = character(0),
> signature = c("x",
>"times"), default = structure(function (x, times)
>.Internal(rep.int(x, times)), target = structure("ANY", class =
> structure("signature", package = "methods"), .Names = "x", package =
> "methods"), defined = structure("ANY", class = structure("signature",
> package = "methods"), .Names = "x", package = "methods"), generic =
> structure("rep.int", package = "base"), class =
> structure("derivedDefaultMethod", package = "methods")), skeleton =
> (structure(function (x,
>times)
>.Internal(rep.int(x, times)), target = structure("ANY", class =
> structure("signature", package = "methods"), .Names = "x", package =
> "methods"), defined = structure("ANY", class = structure("signature",
> package = "methods"), .Names = "x", package = "methods"), generic =
> structure("rep.int", package = "base"), class =
> structure("derivedDefaultMethod", package = "methods")))(x,
>times), class = structure("standardGeneric", package = "methods")),
> )
> 10: .findInheritedMethods(classes, fdef, mtable)
> 11: .inheritedArgsExpression(m@target, m@defined, body(m))
> 12: extends(target[[i]], defined[[i]], fullInfo = TRUE)
> 13: target[[i]]
> 14: (function (x)
>x$.self$finalize())()
> ---
>
> I do not define any finalize method on classes defined on my package. This
> stems from a finalizer on a class defined in a package imported by my
> package (GenomeInfoDb), which I'm guessing is detached from the environment
> before this finalize function is called.
>
> Any ideas on how to avoid this error?
>
> Package source here:
> https://github.com/bioconductor-mirror/epivizrData
>
> [[alternative HTML version deleted]]
>
> ___
> Bioc-devel@r-project.org mailing list
> https://stat.ethz.ch/mailman/listinfo/bioc-devel
>

___
Bioc-devel@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/bioc-devel