[solved] Unusual segmentation error?
-
Adding more variables to Tutor class solved this unusual segmentation error. Thanks.
The application is running correctly. Here is the code to initialize audio output :
@
void Tutor::init_audio_output()
{
has_audio_flag=true;
QList<QAudioDeviceInfo> devices = QAudioDeviceInfo::availableDevices(QAudio::AudioOutput);
if (devices.size()<1)
{
has_audio_flag=false;
return;
}
format.setFrequency(11025);
format.setChannels(1);
format.setSampleSize(8);
format.setSampleType(QAudioFormat::UnSignedInt);
format.setByteOrder(QAudioFormat::LittleEndian);
format.setCodec("audio/pcm");audioOutput = new QAudioOutput(format,this); if (audioOutput==NULL) { has_audio_flag=false; return; } audioOutput->setBufferSize (MAX_BUFFER_SIZE); audioOutput->reset();
}
@But, when I cloase it, it give me this error :
@
QAudioOutputPrivate::~QAudioOutputPrivate()
{
EnterCriticalSection(&waveOutCriticalSection);
finished = true;
LeaveCriticalSection(&waveOutCriticalSection);close(); DeleteCriticalSection(&waveOutCriticalSection);
}
0 ntdll!EtwEventWriteTransfer C:\Windows\system32\ntdll.dll 0 0x7772308e
1 ntdll!EtwEventWriteTransfer C:\Windows\system32\ntdll.dll 0 0x77722f4c
2 ~QAudioOutputPrivate qaudiooutput_win32_p.cpp 83 0x64dc5799
3 ~QAudioOutput qaudiooutput.cpp 176 0x64dc2117
4 QObjectPrivate::deleteChildren qobject.cpp 1978 0x6a20e234
5 ~QWidget qwidget.cpp 1459 0x017ebec2
6 ~QMainWindow qmainwindow.cpp 342 0x01b7df60
7 ~Tutor tutor.cpp 299 0x0040a2f8
8 qMain main.cpp 9 0x0040141d
9 WinMain@16 qtmain_win.cpp 131 0x0050bb02
10 main 0 0x0050b828@
-
That section of the code is not even mentioned in the output you provided, so why did you post it?