我的项目有一个QWebengineview小部件,该小部件存在,Qmediaplayer无法正常工作。当我删除QWebengineview部件时,mediaplayer恢复正常,可以播放mp3文件。
QWebEngineView *wv=new QWebEngineView(this);
QMediaPlayer *mplayer=new QMediaPlayer();
mplayer->setMedia(QUrl::fromLocalFile("D:\\download\\thistime.mp3"));
mplayer->play();
-程序崩溃,并显示以下信息:
[18736:6696:0409/141559.607:FATAL:com_init_util.cc(71)] Check failed: false. CoCreateInstance calls in Chromium require explicit COM initialization via base::CreateCOMSTATaskRunnerWithTraits() or ScopedCOMInitializer. See the comment in DCheckedCoCreateInstance for more details.
Backtrace:
GetHandleVerifier [0x11BEAF87+343399]
GetHandleVerifier [0x11BF22C1+372897]
QWebEngineUrlSchemeHandler::_q_destroyedUrlSchemeHandler [0x11B1A31E+2910]
GetHandleVerifier [0x11C43105+704229]
GetHandleVerifier [0x11C3E77D+685405]
DllCanUnloadNow [0x5AE07B5E+69134]
DllCanUnloadNow [0x5AE0711C+66508]
GetDeviceID [0x5ADF0D07+14535]
DllCanUnloadNow [0x5ADF8725+6613]
DirectSoundCreate [0x5ADED0BA+170]
AMGetErrorTextW [0x5AA2F6E7+635751]
AMGetErrorTextW [0x5AA3113E+642494]
AMGetErrorTextW [0x5AA30D51+641489]
AMGetErrorTextW [0x5AA331B8+650808]
AMGetErrorTextW [0x5A998B8C+18444]
AMGetErrorTextW [0x5AA35BDE+661598]
DllCanUnloadNow [0x65785F92+9906]
DllCanUnloadNow [0x657860A4+10180]
DllCanUnloadNow [0x657861CE+10478]
DllCanUnloadNow [0x65785EB4+9684]
DllCanUnloadNow [0x65799AF5+90645]
AMGetErrorTextW [0x5A9A04BA+49466]
AMGetErrorTextW [0x5A9AE0F3+105843]
AMGetErrorTextW [0x5A9AEA0C+108172]
AMGetErrorTextW [0x5A9AEFB2+109618]
AMGetErrorTextW [0x5A9AE970+108016]
AMGetErrorTextW [0x5A9ABC9E+96542]
AMGetErrorTextW [0x5A9AE178+105976]
AMGetErrorTextW [0x5A9AEBCB+108619]
AMGetErrorTextW [0x5A9AEFB2+109618]
AMGetErrorTextW [0x5A9AE970+108016]
AMGetErrorTextW [0x5A9ABC9E+96542]
AMGetErrorTextW [0x5A9AE178+105976]
AMGetErrorTextW [0x5A9AEBCB+108619]
AMGetErrorTextW [0x5A9AEFB2+109618]
AMGetErrorTextW [0x5A9AE970+108016]
AMGetErrorTextW [0x5A9ADE8A+105226]
AMGetErrorTextW [0x5A9A43B1+65585]
qt_plugin_instance [0x621076D5+88131]
qt_plugin_instance [0x62106A1A+84872]
qt_plugin_instance [0x6210CB32+109728]
QDirIterator::QDirIterator [0x5927CF13+583095]
BaseThreadInitThunk [0x76098494+36]
RtlAreBitsSet [0x777A41C8+136]
RtlAreBitsSet [0x777A4198+88]
删除webengineview:
//QWebEngineView *wv=new QWebEngineView(this);
QMediaPlayer *mplayer=new QMediaPlayer();
mplayer->setMedia(QUrl::fromLocalFile("D:\\download\\thistime.mp3"));
mplayer->play();
-成功
根据信息,我知道chrome core出了点问题,但是我不知道如何解决。请告诉我你是否知道。