Details
-
Bug
-
Resolution: Done
-
P1: Critical
-
4.6.1, 4.6.2
-
None
-
Windows XP (SP2), MinGW 4.4
-
747a4dfc5a333c2f7066d344f7da1684226551bd
Description
Sometimes I get SIGSEGV after QAudioOutout stopped/closed.
BackTrace:
0 QScopedPointer<QObjectData, QScopedPointerDeleter<QObjectData> >::data qscopedpointer.h 135 0x014a3a8e
1 qGetPtrHelper<QScopedPointer<QObjectData, QScopedPointerDeleter<QObjectData> > > qglobal.h 2317 0x013aa416
2 QIODevice::d_func qiodevice.h 168 0x014a0e94
3 QIODevice::read qiodevice.cpp 748 0x013a841a
4 QAudioOutputPrivate::deviceReady qaudiooutput_win32_p.cpp 465 0x64dc69ab
5 QAudioOutputPrivate::qt_metacall moc_qaudiooutput_win32_p.cpp 75 0x64dcc9be
6 QMetaObject::metacall qmetaobject.cpp 237 0x01401c14
7 QMetaCallEvent::placeMetaCall qobject.cpp 561 0x0140bee3
8 QObject::event qobject.cpp 1240 0x0140df06
9 QApplicationPrivate::notify_helper qapplication.cpp 4300 0x035b252e
10 QApplication::notify qapplication.cpp 3704 0x035afe3a
11 QCoreApplication::notifyInternal qcoreapplication.cpp 704 0x013fd310
12 QCoreApplication::sendEvent qcoreapplication.h 215 0x01461bec
13 QCoreApplicationPrivate::sendPostedEvents qcoreapplication.cpp 1345 0x013fe3a1
14 qt_internal_proc qeventdispatcher_win.cpp 482 0x0141f74f
15 USER32!GetDC C:\WINDOWS\system32\user32.dll 0 0x77d48709
Th real problem is in qaudiooutput_win32_p.cpp:465
int l = audioSource->read(audioBuffer,input);
When this call is occurred, the audioBuffer is 0.
It is possible because the QAudioOutputPrivate::feedback() put the QAudioOutputPrivate::deviceReady() to the queue, and after that, the QAudioOutputPrivate::close() start running before the deviceReady() started.