Closed HenrikBengtsson closed 9 years ago
ACTION: R / affxparser should never core dump, so the internal Fusion SDK exception (native C++ code) should at least bubble up to the R level as an error message. Never a core dump.
Totally agree, but to fix this we need to learn enough about C++ exceptions to catch this. Of course this is possible; just a matter of how much time it takes to learn.
On Tue, May 5, 2015 at 7:45 PM, Henrik Bengtsson notifications@github.com wrote:
ACTION: R / affxparser should never core dump, so the internal Fusion SDK exception (native C++ code) should at least bubble up to the R level as an error message. Never a core dump.
— Reply to this email directly or view it on GitHub https://github.com/HenrikBengtsson/affxparser/issues/16#issuecomment-99263079 .
I think it's just a matter of using something like:
try {
...
} catch(FileNotOpenException ex) {
// generate R error.
}
The class: FileNotOpenException
affxparser 1.41.2 available on Bioc devel no longer core dumps; affxparser now catches Fusion SDK C++ exceptions and reports them up as standard R errors instead, e.g.
> library("affxparser")
> pathname <- "rawData/affxparser,problematic/GenomeWideSNP_6/MC45.CEL"
> hdr <- readCelHeader(pathname)
Error in readCelHeader(pathname) :
[affxparser Fusion SDK exception] Failed to parse header of CEL file: rawData/
affxparser,problematic/GenomeWideSNP_6/MC45.CEL
> data <- readCel(pathname)
Error in readCelHeader(filename) :
[affxparser Fusion SDK exception] Failed to parse header of CEL file: rawData/
affxparser,problematic/GenomeWideSNP_6/MC45.CEL
FYI, @benilton (in case you don't get notification on this issue)
@benilton shared a problematic CEL file that causes R and affxparser to core dump:
The short story is that it is
readCelHeader()
that core dumps, but notreadCel()
- at least as far at it seems.readCelHeader() core dump
Likewise,
readCelRectangle()
andreadCelIntensities()
core dumps because they're both usereadCelHeader()
internally.readCel() gives an error (no core dump)
If one uses
readCel()
, with.checkArgs=FALSE
to avoid callingreadCelHeader()
, one only gets an error:NOTE: This suggests the CEL file is correct/truncated.
readCelUnits() gives an error (no core dump)
Again, some tricks are needed to avoid calling
readCelHeader()
internally:Alternatives that parses file using R (not Fusion SDK) gives error (no core dump)
Session info