Skip to content

[R-pkg-devel] [CRAN-pretest-archived] CRAN Submission NMRphasing 1.0.6

9 messages · Ivan Krylov, Lluís Revilla, Duncan Murdoch +2 more

#
Hi, team,

I am really confused by the error, which did not happen in the previous versions.

Since I have not changed my code at all, the possible reason is that the external function is changed. However, there is no error at all and all of my code runs successfully in my local machine.

So, how to solve the issue?

Thanks!
Aixiang

???Outlook for Android<https://aka.ms/AAb9ysg>
#
On 2024-12-17 4:47 a.m., Aixiang Jiang wrote:
The rejection came because of the gcc-san check.  Those don't always 
show symptoms if you aren't running the same diagnostic tool, so this 
error could well have been present in earlier versions.

Looking at 
https://win-builder.r-project.org/incoming_pretest/NMRphasing_1.0.6_20241217_091411/specialChecks/gcc-san/summary.txt, 
I see that the error appears to have happened at 
MassSpecWavelet/src/find_local_maximum.c:492, i.e. line 492 of that 
file, which is writing outside the bounds of an allocated array.

I think that is coming from a package you are using, rather than from 
your package NMRphasing.  Maybe you can try working with the maintainer 
of that package to work out whether the problem is in it or in the way 
you are using it.

Duncan Murdoch
#
Dear Aixiang,

Welcome to R-package-devel!

? Tue, 17 Dec 2024 09:47:26 +0000
Aixiang Jiang <aijiang at bccrc.ca> ?????:
That's right, you've found a bug in the MassSpecWavelet package. It's
been introduced more than two years ago:

https://code.bioconductor.org/browse/MassSpecWavelet/commit/ea0f727ffc391fa2643f858844836d8297742433

The code finds out the length of the vector and a pointer to the start
of its data:
Later, the code tries to limit the offset into the array...
...and accesses the data at this offset:
Unfortunately, it is an error to access data at i2 equal to xlength.
The correct maximum for i2 must be xlength-1, the last valid element of
x.

Try reporting this to the maintainer at
<https://support.bioconductor.org/> or at
<http://github.com/zeehio/MassSpecWavelet/issues>.
#
Dear Aixiang,

Thanks for using a Bioconductor package as your dependency.

Please use the maintainer preference to report bugs, as set on the
DESCRIPTION file: Bug Reports
http://github.com/zeehio/MassSpecWavelet/issues
The support site (support.bioconductor.org) is generally set up to
help users with questions about Bioconductor packages (which might
actually come down to be bugs).

I hope MassSpecWavelet's maintainer fixes this on the released version
of the packages soon and you can proceed with your submission to CRAN.
However, I take the occasion to share what CRAN team shared on the
website: "CRAN submission will be offline from Dec 23, 2024 to Jan 07,
2025 (CRAN team vacation and maintenance work)."
So you only have a few more days to submit before they pause the
submission (but I see the time given to fix issues on your package let
you submit after their vacations).

Best wishes,

Llu?s
Bioconductor Community Advisory Board member.

On Tue, 17 Dec 2024 at 11:16, Ivan Krylov via R-package-devel
<r-package-devel at r-project.org> wrote:
#
Nice spotting!

Just for fun, I just asked chatgpt if there were any other problems in 
that code.  It spotted 3, but not the one you found.  Two of them were 
definitely bogus, but this one might not be:

On line 471 kmax is used, but it may not be initialized.

Duncan Murdoch
On 2024-12-17 5:15 a.m., Ivan Krylov via R-package-devel wrote:
#
Thank you - Duncan!

I ended up revising the C functions and converted into R functions, which are then included in my own package.

Best,
Aixiang
#
Thank you - Llu??s!

Since the time for me to revise my own package is limited (otherwise my package will be withdrawn), I ended up revising the C functions and converting into R functions, which are then included in my own package.

Best,
Aixiang
#
Thank you so much for pointing out the detailed info - Ivan!

Since the time for me to revise my own package is limited (otherwise my package will be withdrawn), I ended up revising the C functions and converting into R functions, which are then included in my own package.

Best,
Aixiang
2 days later
#
Several people passed this on to the maintainer and it has now been fixed, working its way through the Bioconductor system.

https://github.com/zeehio/MassSpecWavelet/issues/7#?
Did you see this error reported on r-pkg-devel? ? Issue #7 ? zeehio/MassSpecWavelet
github.com
=============
Bryan A. Hanson
Prof. Emeritus, DePauw University
Chemistry & Biochemistry
hanson at depauw.edu
profbryanhanson at gmail.com
Nerdy blog: ChemoSpec.org
I?m at GMT -7 year round