Using `integrate` in Xpressive crashes LMMS
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
- In LMMS, load the default preset of Xpressive or any preset that contains
integrate, - 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.
@gnudles you have any idea?
@Rossmaxx I will look into that, thanks. Maybe there is an undefined behaviour error.
@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