LMMS / LMMS/lmms

Loading of project hangs non-deterministicly when using "Allpass delay line, noninterpolating"

Open
#6,920 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

bug
Dominant language
C++
Stars
10.4k
Forks
1.3k
Avg merge
2d 13h
Merged PRs (30d)
7

Description

### Bug Summary
While working on #2068 I have used the attached test project [LADSPA-TestProject.zip](https://github.com/LMMS/lmms/files/12790572/LADSPA-TestProject.zip) to check how various LADSPA effects look. From time to time when loading the project LMMS got into an infinite loop, the loading progress stayed at 20% and I had to kill it.

#### Steps to reproduce
Unfortunately, this issue cannot be reproduced in a deterministic fashion. Just load the project file in [LADSPA-TestProject.zip](https://github.com/LMMS/lmms/files/12790572/LADSPA-TestProject.zip) repeatedly until the hang occurs.

#### Expected behavior
The file loads without problems.

#### Actual behavior
The loading of the file hangs the whole application.

#### Results from debugging
Debugging with gdb showed that the problem is caused by the LADSPA plugin "Allpass delay line, noninterpolating" which is contained in the project.

The application hangs in [line 66](https://github.com/swh/ladspa/blob/d99a0db521d13a87bdaa418c674ca8858e484452/allpass_1895.xml#L66) of [allpass_1895.xml](https://github.com/swh/ladspa/blob/d99a0db521d13a87bdaa418c674ca8858e484452/allpass_1895.xml#L66). In my case the value of `size` was 0 and the value of `minsize` was 2214592512 during the hang. This then results in never ending bit shifting in the main thread.

#### Affected LMMS versions
Current master at 8b94bd8e654653ea8e1b33428e80b95e29bebcb7 and potentially all older versions.

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by repeatedly loading the attached LADSPA-TestProject.zip under gdb and inspect the loading path when progress reaches 20%. Compare the plugin behavior at allpass_1895.xml line 66, where size and minsize were observed during the hang. Done means the project loads reliably without the application hanging.

Written by the indexing model from the issue text.

Assessment

Tech stack
cpp
Domain
audio-video-rtc
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
38/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.