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

Error in diff2(x, differences = diff) : names() applied to a non-vector #258

Open
HenrikBengtsson opened this issue May 14, 2024 · 0 comments

Comments

@HenrikBengtsson
Copy link
Owner

See ccagc/QDNAseq#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:

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:

https://github.com/wch/r-source/blob/b046c0c5273ffb44037a0fde606d203ab773bca1/src/main/attrib.c#L994

We call diff2() -> setNamesDiff() -> namesgets() in:

namesgets(vec, ansNames);

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 ccagc/QDNAseq#123 (comment);

  *** caught segfault ***
  address (nil), cause 'unknown'
  
  Traceback:
   1: diff2(x, differences = diff)
   2: sdDiff(x, ..., trim = trim)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant