diff --git a/src/effects/backends/effectprocessor.h b/src/effects/backends/effectprocessor.h index fbee277f2a17..c5884f1f61ae 100644 --- a/src/effects/backends/effectprocessor.h +++ b/src/effects/backends/effectprocessor.h @@ -157,6 +157,11 @@ class EffectProcessorImpl : public EffectProcessor { const EffectEnableState enableState, const GroupFeatureState& groupFeatures) final { EffectSpecificState* pState = m_channelStateMatrix[inputHandle][outputHandle]; + // TODO: The state can be null if we are in the deleteStatesForInputChannel() loop. + // A protection against this is missing. Since it can happen the assertion is incorrect + // The memory will be leaked. + // Idea: Skip the processing here? + // Probably related: https://bugs.launchpad.net/mixxx/+bug/1775497 VERIFY_OR_DEBUG_ASSERT(pState != nullptr) { if (kEffectDebugOutput) { qWarning() << "EffectProcessorImpl::process could not retrieve" @@ -268,6 +273,11 @@ class EffectProcessorImpl : public EffectProcessor { // m_channelStateMatrix may be accessed concurrently in the audio // engine thread in loadStatesForInputChannel. + // TODO: How is ensure that the statMap is not accessed during this loop? + // This is called in responds to DISABLE_EFFECT_CHAIN_FOR_INPUT_CHANNEL + // and it looks like that the objects pointed by m_channelStateMatrix + // may be still in use. + // Probably related: https://bugs.launchpad.net/mixxx/+bug/1775497 ChannelHandleMap& stateMap = m_channelStateMatrix[*inputChannel]; for (EffectSpecificState* pState : stateMap) {