Random crash in SID
- Dominant language
- C++
- Stars
- 10.4k
- Forks
- 1.3k
- Avg merge
- 2d 13h
- Merged PRs (30d)
- 7
Description
### System Information
Arch Linux with Wayland
### LMMS Version(s)
master
### Bug Summary
Debug builds of LMMS crash randomly when playing "Greippi - Krem Kaakkuja (Second Flight Remix)" due to segmentation faults. The crashes seem to be caused by the SID instrument(s) used in the song.
### Expected Behaviour
No crash.
### Steps To Reproduce
1. Start a debug build of LMMS.
2. Load "Greippi - Krem Kaakkuja (Second Flight Remix)".
3. Play the song until it crashes. Due to the random behavior this might be system dependent.
### Logs
Stack Trace
libsid.so!reSID::EnvelopeGenerator::clock(reSID::EnvelopeGenerator * const this, reSID::cycle_count delta_t) (/home/michael/Eigene Dateien/Development/LMMS/lmms-dev-mg/lmms/plugins/Sid/resid/resid/envelope.h:269)
libsid.so!reSID::SID::clock(reSID::SID * const this, reSID::cycle_count delta_t) (/home/michael/Eigene Dateien/Development/LMMS/lmms-dev-mg/lmms/plugins/Sid/resid/resid/sid.cc:758)
libsid.so!reSID::SID::clock_fast(reSID::SID * const this, reSID::cycle_count & delta_t, short * buf, int n, int interleave) (/home/michael/Eigene Dateien/Development/LMMS/lmms-dev-mg/lmms/plugins/Sid/resid/resid/sid.cc:867)
libsid.so!reSID::SID::clock(reSID::SID * const this, reSID::cycle_count & delta_t, short * buf, int n, int interleave) (/home/michael/Eigene Dateien/Development/LMMS/lmms-dev-mg/lmms/plugins/Sid/resid/resid/sid.cc:841)
libsid.so!lmms::sid_fillbuffer(unsigned char * sidreg, reSID::SID * sid, int tdelta, short * ptr, int samples) (/home/michael/Eigene Dateien/Development/LMMS/lmms-dev-mg/lmms/plugins/Sid/SidInstrument.cpp:273)
libsid.so!lmms::SidInstrument::playNote(lmms::SidInstrument * const this, lmms::NotePlayHandle * _n, lmms::SampleFrame * _working_buffer) (/home/michael/Eigene Dateien/Development/LMMS/lmms-dev-mg/lmms/plugins/Sid/SidInstrument.cpp:413)
lmms::InstrumentTrack::playNote(lmms::InstrumentTrack * const this, lmms::NotePlayHandle * n, lmms::SampleFrame * workingBuffer) (/home/michael/Eigene Dateien/Development/LMMS/lmms-dev-mg/lmms/src/tracks/InstrumentTrack.cpp:584)
lmms::NotePlayHandle::play(lmms::NotePlayHandle * const this, lmms::SampleFrame * _working_buffer) (/home/michael/Eigene Dateien/Development/LMMS/lmms-dev-mg/lmms/src/core/NotePlayHandle.cpp:263)
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:87)
lmms::AudioEngineWorkerThread::startAndWaitForJobs() (/home/michael/Eigene Dateien/Development/LMMS/lmms-dev-mg/lmms/src/core/AudioEngineWorkerThread.cpp:160)
lmms::AudioEngine::renderStageInstruments(lmms::AudioEngine * const this) (/home/michael/Eigene Dateien/Development/LMMS/lmms-dev-mg/lmms/src/core/AudioEngine.cpp:340)
lmms::AudioEngine::renderNextBuffer(lmms::AudioEngine * const this) (/home/michael/Eigene Dateien/Development/LMMS/lmms-dev-mg/lmms/src/core/AudioEngine.cpp:409)
lmms::AudioEngine::fifoWriter::run(lmms::AudioEngine::fifoWriter * const this) (/home/michael/Eigene Dateien/Development/LMMS/lmms-dev-mg/lmms/src/core/AudioEngine.cpp:1111)
libQt5Core.so.5![Unknown/Just-In-Time compiled code] (Unbekannte Quelle:0)
### 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.
Contributor guide
No contributing guide indexed for this repository
Research direction
Reproduce the crash in a debug build by loading “Greippi - Krem Kaakkuja (Second Flight Remix)” and playing it until failure. Start with plugins/Sid/resid/resid/envelope.h:269, then trace through sid.cc and plugins/Sid/SidInstrument.cpp using the supplied stack trace. Done means the song can play without 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
- 35/100