-
Bug
-
Resolution: Unresolved
-
P2: Important
-
None
-
6.10.0
-
None
There is a deadlock when switching the source url of QSoundEffect quickly.
The attachment contains a minimal reproducible project. The program will hang as soon as you click the 'Switch' button.
Main Thread Call Stack
ntdll.dll!NtWaitForSingleObject() Unknown KernelBase.dll!WaitForSingleObjectEx() Unknown > Qt6Core.dll!QThreadPrivate::wait(QMutexLocker<QMutex> & locker, QDeadlineTimer deadline) Line 442 C++ Qt6Core.dll!QThread::wait(QDeadlineTimer deadline) Line 974 C++ Qt6Multimedia.dll!QtWASAPI::QWASAPIAudioSinkStream::stop(QtMultimediaPrivate::QPlatformAudioIOStream::ShutdownPolicy shutdownPolicy) Line 151 C++ Qt6Multimedia.dll!QtMultimediaPrivate::QPlatformAudioSinkImplementation<QtWASAPI::QWASAPIAudioSinkStream,QtWASAPI::QWindowsAudioSink>::reset() Line 229 C++ [Inline Frame] Qt6Multimedia.dll!QAudioSink::reset() Line 234 C++ Qt6Multimedia.dll!QtMultimediaPrivate::QRtAudioEngine::~QRtAudioEngine() Line 145 C++ Qt6Multimedia.dll!QtMultimediaPrivate::QRtAudioEngine::`vector deleting destructor'(unsigned int) C++ Qt6Core.dll!QObject::event(QEvent * e) Line 1446 C++ [Inline Frame] Qt6Core.dll!QCoreApplicationPrivate::notify_helper(QObject *) Line 1281 C++ [Inline Frame] Qt6Core.dll!doNotify(QObject *) Line 1210 C++ Qt6Core.dll!QCoreApplication::notify(QObject * receiver, QEvent * event) Line 1194 C++ Qt6Core.dll!QCoreApplication::notifyInternal2(QObject * receiver, QEvent * event) Line 1109 C++ [Inline Frame] Qt6Core.dll!QCoreApplication::sendEvent(QObject *) Line 1549 C++ Qt6Core.dll!QCoreApplicationPrivate::sendPostedEvents(QObject * receiver, int event_type, QThreadData * data) Line 1904 C++ Qt6Gui.dll!QWindowsGuiEventDispatcher::sendPostedEvents() Line 44 C++ Qt6Core.dll!QEventDispatcherWin32::processEvents(QFlags<enum QEventLoop::ProcessEventsFlag> flags) Line 485 C++ Qt6Gui.dll!QWindowsGuiEventDispatcher::processEvents(QFlags<enum QEventLoop::ProcessEventsFlag> flags) Line 37 C++ [Inline Frame] Qt6Core.dll!QEventLoop::processEvents(QFlags<enum QEventLoop::ProcessEventsFlag>) Line 104 C++ Qt6Core.dll!QEventLoop::exec(QFlags<enum QEventLoop::ProcessEventsFlag> flags) Line 185 C++ Qt6Core.dll!QCoreApplication::exec() Line 1452 C++ sound_effect_hang.exe!00007ff6c28814ed() Unknown sound_effect_hang.exe!00007ff6c2881100() Unknown sound_effect_hang.exe!00007ff6c288316a() Unknown kernel32.dll!BaseThreadInitThunk() Unknown ntdll.dll!RtlUserThreadStart() Unknown
Worker Thread Call Stack
ntdll.dll!NtWaitForSingleObject() Unknown KernelBase.dll!WaitForSingleObjectEx() Unknown > [Inline Frame] Qt6Multimedia.dll!QtWASAPI::QWASAPIAudioSinkStream::runProcessCallbackLoop() Line 286 C++ Qt6Multimedia.dll!QtWASAPI::QWASAPIAudioSinkStream::startAudioClient::__l2::<lambda_1>::operator()() Line 221 C++ [Inline Frame] Qt6Multimedia.dll!std::_Func_class<void>::operator()() Line 861 C++ Qt6Multimedia.dll!std::_Packaged_state<void __cdecl(void)>::_Call_immediate() Line 622 C++ Qt6Multimedia.dll!std::_Deferred_async_state<void>::_Run_deferred_function(std::unique_lock<std::mutex> & _Lock) Line 688 C++ [Inline Frame] Qt6Multimedia.dll!std::_Associated_state<int>::_Maybe_run_deferred_function(std::unique_lock<std::mutex> &) Line 407 C++ Qt6Multimedia.dll!std::_Associated_state<int>::_Get_value(bool _Get_only_once) Line 296 C++ [Inline Frame] Qt6Core.dll!std::_State_manager<int>::_Get_value() Line 817 C++ [Inline Frame] Qt6Core.dll!std::future<void>::get() Line 953 C++ Qt6Core.dll!QThreadCreateThread::run() Line 1387 C++ Qt6Core.dll!QThreadPrivate::start(void * arg) Line 192 C++ kernel32.dll!BaseThreadInitThunk() Unknown ntdll.dll!RtlUserThreadStart() Unknown
| For Gerrit Dashboard: QTBUG-141840 | ||||||
|---|---|---|---|---|---|---|
| # | Subject | Branch | Project | Status | CR | V |
| 689851,2 | WASAPI: harden worker thread termination | dev | qt/qtmultimedia | Status: NEW | 0 | 0 |