LMMS / LMMS/lmms

Segmentation fault when just playing a song

Open
#7,047 2 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

I got a segmentation fault from just playing a song (with a debug build). The song was "Greippi - Krem Kaakkuja (Second Flight Remix).mmpz" and the crash seems to have happened around the 108th beat. Please also refer to the attached screenshot for times, etc.

Steps to reproduce

This cannot be reproduced deterministically but I was able to reproduce it several times by setting a loop point as follows and then let it play in that loop until the segmentation fault occurs:
LoopCrash

No actions were taken at the time of the crash.

Expected behavior

No crash. 😉

Actual behavior

Crash.

Screenshot

Here's how the screen looked during the crash:
Screenshot_20240104_204612

Affected LMMS versions

master at commit c2f2b7e0d76.

Stack trace
Stack trace
lmms::InstrumentTrack::processAudioBuffer(lmms::InstrumentTrack * const this, lmms::sampleFrame * buf, const lmms::fpp_t frames, lmms::NotePlayHandle * n) (/home/michael/Eigene Dateien/Development/LMMS/lmms-dev-mg/lmms/src/tracks/InstrumentTrack.cpp:236)
lmms::InstrumentPlayHandle::play(lmms::InstrumentPlayHandle * const this, lmms::sampleFrame * working_buffer) (/home/michael/Eigene Dateien/Development/LMMS/lmms-dev-mg/lmms/src/core/InstrumentPlayHandle.cpp:71)
lmms::PlayHandle::doProcessing(lmms::PlayHandle * const this) (/home/michael/Eigene Dateien/Development/LMMS/lmms-dev-mg/lmms/src/core/PlayHandle.cpp:59)
lmms::ThreadableJob::process(lmms::ThreadableJob * const this) (/home/michael/Eigene Dateien/Development/LMMS/lmms-dev-mg/lmms/include/ThreadableJob.h:77)
lmms::AudioEngineWorkerThread::JobQueue::run(lmms::AudioEngineWorkerThread::JobQueue * const this) (/home/michael/Eigene Dateien/Development/LMMS/lmms-dev-mg/lmms/src/core/AudioEngineWorkerThread.cpp:88)
lmms::AudioEngineWorkerThread::startAndWaitForJobs() (/home/michael/Eigene Dateien/Development/LMMS/lmms-dev-mg/lmms/src/core/AudioEngineWorkerThread.cpp:161)
lmms::AudioEngine::renderStageInstruments(lmms::AudioEngine * const this) (/home/michael/Eigene Dateien/Development/LMMS/lmms-dev-mg/lmms/src/core/AudioEngine.cpp:387)
lmms::AudioEngine::renderNextBuffer(lmms::AudioEngine * const this) (/home/michael/Eigene Dateien/Development/LMMS/lmms-dev-mg/lmms/src/core/AudioEngine.cpp:454)
lmms::AudioEngine::fifoWriter::run(lmms::AudioEngine::fifoWriter * const this) (/home/michael/Eigene Dateien/Development/LMMS/lmms-dev-mg/lmms/src/core/AudioEngine.cpp:1245)
libQt5Core.so.5![Unknown/Just-In-Time compiled code] (Unbekannte Quelle:0)

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 with the debug stack trace at src/tracks/InstrumentTrack.cpp:236, then read the related playback flow in src/core/InstrumentPlayHandle.cpp, src/core/PlayHandle.cpp, and src/core/AudioEngine.cpp. Use the reported .mmpz song and loop-point setup to reproduce the crash during playback. Done means repeated looped playback no longer causes a segmentation fault.

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.