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

Bryan Hanson h@n@on @end|ng |rom dep@uw@edu
Fri Dec 20 02:54:10 CET 2024


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


> On Dec 17, 2024, at 2:40 PM, Aixiang Jiang <aijiang using bccrc.ca> wrote:
> 
> 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
> 
> ________________________________
> From: Ivan Krylov <ikrylov using disroot.org>
> Sent: Tuesday, December 17, 2024 2:15 AM
> To: Aixiang Jiang <aijiang using bccrc.ca>
> Cc: r-package-devel using r-project.org <r-package-devel using r-project.org>
> Subject: Re: [R-pkg-devel] [CRAN-pretest-archived] CRAN Submission NMRphasing 1.0.6
> 
> CAUTION: EXTERNAL EMAIL. Verify both the sender's email and name. Avoid links/attachments unless expected. Report any suspicious message by forwarding it as an attachment to spammail using bccrc.ca
> 
> 
> Dear Aixiang,
> 
> Welcome to R-package-devel!
> 
> � Tue, 17 Dec 2024 09:47:26 +0000
> Aixiang Jiang <aijiang using bccrc.ca> �����:
> 
>> 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.
> 
> 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:
> 
>>> double *x;
> 
>>> R_xlen_t xlength = Rf_length(s_x);
> 
>>> x = REAL(s_x);
> 
> Later, the code tries to limit the offset into the array...
> 
>>> i2 = i2 >= xlength ? xlength : i2;
> 
> ...and accesses the data at this offset:
> 
>>> if (xmax > x[i2] && xmax > x[j-1]) {
> 
> 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>.
> 
> --
> Best regards,
> Ivan
> 
> 	[[alternative HTML version deleted]]
> 
> ______________________________________________
> R-package-devel using r-project.org mailing list
> https://stat.ethz.ch/mailman/listinfo/r-package-devel

=============
Bryan A. Hanson
Prof. Emeritus, DePauw University
Chemistry & Biochemistry
hanson using depauw.edu
profbryanhanson using gmail.com
Nerdy blog: ChemoSpec.org
I’m at GMT -7 year round








More information about the R-package-devel mailing list