lmms icon indicating copy to clipboard operation
lmms copied to clipboard

Using `integrate` in Xpressive crashes LMMS

Open khoidauminh opened this issue 1 year ago • 3 comments

System Information

Archlinux

LMMS Version(s)

Master

Most Recent Working Version

Before #7379

Bug Summary

Arithmetic exception triggered by the integrate function in Xpressive.

Expected Behaviour

Should not crash

Steps To Reproduce

  1. In LMMS, load the default preset of Xpressive or any preset that contains integrate,
  2. Click on the O1 button.

Logs

Loading the default preset: gdb.txt

Empty preset and typing integrate(f) into O1: gdb2.txt

Screenshots / Minimum Reproducible Project

Screencast from 2024-08-25 09-43-27.webm

Please search the issue tracker for existing bug reports before submitting your own.

  • [X] I have searched all existing issues and confirmed that this is not a duplicate.

khoidauminh avatar Aug 25 '24 03:08 khoidauminh

@gnudles you have any idea?

Rossmaxx avatar Aug 25 '24 06:08 Rossmaxx

@Rossmaxx I will look into that, thanks. Maybe there is an undefined behaviour error.

gnudles avatar Aug 25 '24 09:08 gnudles

@Rossmaxx https://github.com/LMMS/lmms/commit/851c884f58155275e6adbde40f2611d076edd345#diff-e474279d8fff8dbea1526e155470b2d712583ef3ceb0903a20d03088825d5802

someone replaced the line for (i = 0; i < length; i++) { with this for (auto i = std::size_t{0}; i < length; i++) {

I was using the reference of i internally, and this change created a different variable.

opened a pull request: https://github.com/LMMS/lmms/pull/7499

gnudles avatar Sep 14 '24 20:09 gnudles