Open HenrikBengtsson opened 2 months ago
See https://github.com/ccagc/QDNAseq/issues/123, which reports on:
Error in diff2(x, differences = diff) : names() applied to a non-vector Calls: plot -> plot -> .local -> apply -> FUN -> sdDiff -> diff2
That error message is produced in checkNames(SEXP x, SEXP s) at:
checkNames(SEXP x, SEXP s)
https://github.com/wch/r-source/blob/b046c0c5273ffb44037a0fde606d203ab773bca1/src/main/attrib.c#L416
The only place where I see checkNames() being called is from namesgets(SEXP vec, SEXP val) at:
checkNames()
namesgets(SEXP vec, SEXP val)
https://github.com/wch/r-source/blob/b046c0c5273ffb44037a0fde606d203ab773bca1/src/main/attrib.c#L994
We call diff2() -> setNamesDiff() -> namesgets() in:
diff2()
setNamesDiff()
namesgets()
https://github.com/HenrikBengtsson/matrixStats/blob/76a9c6ccd152bcb335d36cf1273b3edf9ceaae95/src/naming.c#L56
However, I fail to see how we can reach the statement that generates the error message. It could be that there is a memory leak that causes it to happen, as reported in https://github.com/ccagc/QDNAseq/issues/123#issuecomment-1944219672;
*** caught segfault *** address (nil), cause 'unknown' Traceback: 1: diff2(x, differences = diff) 2: sdDiff(x, ..., trim = trim)
See https://github.com/ccagc/QDNAseq/issues/123, which reports on:
That error message is produced in
checkNames(SEXP x, SEXP s)
at:https://github.com/wch/r-source/blob/b046c0c5273ffb44037a0fde606d203ab773bca1/src/main/attrib.c#L416
The only place where I see
checkNames()
being called is fromnamesgets(SEXP vec, SEXP val)
at:https://github.com/wch/r-source/blob/b046c0c5273ffb44037a0fde606d203ab773bca1/src/main/attrib.c#L994
We call
diff2()
->setNamesDiff()
->namesgets()
in:https://github.com/HenrikBengtsson/matrixStats/blob/76a9c6ccd152bcb335d36cf1273b3edf9ceaae95/src/naming.c#L56
However, I fail to see how we can reach the statement that generates the error message. It could be that there is a memory leak that causes it to happen, as reported in https://github.com/ccagc/QDNAseq/issues/123#issuecomment-1944219672;