unknown qml errors ,couldnt find the errors occured.
-
wrote on 13 Jun 2024, 14:39 last edited by
1 QElapsedTimer::nsecsElapsed() const 0x68cc1f0b 2 QDebugMessageServiceImpl::sendDebugMessage(QtMsgType, QMessageLogContext const&, QString const&) 0x2d1f17ef 3 DebugMessageHandler(QtMsgType, QMessageLogContext const&, QString const&) 0x2d1f196e 4 qt_message(QtMsgType, QMessageLogContext const&, const char *, char *) 0x68a9ac3d 5 QMessageLogger::fatal(const char *, ...) const 0x68e1b2ac 6 QThread::~QThread() 0x68a9fce2 7 QQmlDebugServerImpl::~QQmlDebugServerImpl() 0x307379d3 8 QQmlDebugConnectorFactory::~QQmlDebugConnectorFactory() 0x664a0ca4 9 QQmlDebugServerFactory::~QQmlDebugServerFactory() 0x30738052 10 QLibraryPrivate::unload(QLibraryPrivate::UnloadFlag) 0x68c6039b 11 QFactoryLoaderPrivate::~QFactoryLoaderPrivate() 0x68c587b7 12 QFactoryLoaderPrivate::~QFactoryLoaderPrivate() 0x68c5889b 13 QObject::~QObject() 0x68ca0ef4 14 __tcf_0 0x664a1afe 15 _execute_onexit_table 0x664ce361 16 _CRT_INIT *12 0x662c116c 17 __DllMainCRTStartup 0x662c1281 18 DllMainCRTStartup *12 0x662c13a3 19 ntdll!RtlIpv6AddressToStringA 0x77586526 20 ntdll!RtlDeactivateActivationContextUnsafeFast 0x7755719e 21 ntdll!LdrShutdownProcess 0x7756e93d 22 ??
-
1 QElapsedTimer::nsecsElapsed() const 0x68cc1f0b 2 QDebugMessageServiceImpl::sendDebugMessage(QtMsgType, QMessageLogContext const&, QString const&) 0x2d1f17ef 3 DebugMessageHandler(QtMsgType, QMessageLogContext const&, QString const&) 0x2d1f196e 4 qt_message(QtMsgType, QMessageLogContext const&, const char *, char *) 0x68a9ac3d 5 QMessageLogger::fatal(const char *, ...) const 0x68e1b2ac 6 QThread::~QThread() 0x68a9fce2 7 QQmlDebugServerImpl::~QQmlDebugServerImpl() 0x307379d3 8 QQmlDebugConnectorFactory::~QQmlDebugConnectorFactory() 0x664a0ca4 9 QQmlDebugServerFactory::~QQmlDebugServerFactory() 0x30738052 10 QLibraryPrivate::unload(QLibraryPrivate::UnloadFlag) 0x68c6039b 11 QFactoryLoaderPrivate::~QFactoryLoaderPrivate() 0x68c587b7 12 QFactoryLoaderPrivate::~QFactoryLoaderPrivate() 0x68c5889b 13 QObject::~QObject() 0x68ca0ef4 14 __tcf_0 0x664a1afe 15 _execute_onexit_table 0x664ce361 16 _CRT_INIT *12 0x662c116c 17 __DllMainCRTStartup 0x662c1281 18 DllMainCRTStartup *12 0x662c13a3 19 ntdll!RtlIpv6AddressToStringA 0x77586526 20 ntdll!RtlDeactivateActivationContextUnsafeFast 0x7755719e 21 ntdll!LdrShutdownProcess 0x7756e93d 22 ??
wrote on 13 Jun 2024, 14:43 last edited byIsn't that the same issue as in your last topic here?
Debug your application, post your code, describe what your are doing... -
wrote on 13 Jun 2024, 14:57 last edited by
yeah but i dont know how to debug the code . I tried a lot of ways .But its hard for me to do that.
-
wrote on 14 Jun 2024, 01:49 last edited by
please provide a Minimal reproducible example
-
wrote on 15 Jun 2024, 04:58 last edited by
; UiBaseQml::UiBaseQml() { qDebug()<<"UiBaseQml::UiBaseQml()"; } int UiBaseQml::onCreateAllChild(){ QQmlContext * context = rootContext(); context->setContextProperty("dataRoot", this); context->setContextProperty("dataContext",mDataJson); } int UiBaseQml::onInitCtrl(){ setAttribute(Qt::WA_AlwaysStackOnTop); setClearColor(Qt::transparent); setResizeMode(QQuickWidget::SizeViewToRootObject); QString t_url = "qrc:/qres/qml/default.qml"; if(mDataJson.contains("url")){ t_url = mDataJson.find("url").value().toString(); } setSource(QUrl(t_url)); if(mDataJson.contains("title")){ QString t_title = mDataJson.find("title").value().toString(); } } int UiBaseQml::onInitSlots(){ connect(this,SIGNAL(statusChanged(QQuickWidget::Status)),this,SLOT(onChangeState(QQuickWidget::Status))); } int UiBaseQml::onRelayout(){ QWidget * t_parent = (QWidget *)parent(); auto s = (t_parent->size()) / 2; s = (t_parent->size() - size()) / 2; move(s.width(), s.height()); } int UiBaseQml::onInit(void* p ){ setParent((QWidget *)p); onCreateAllChild(); onInitCtrl(); onInitSlots(); onRelayout(); } int UiBaseQml::onSendMsg(const QJsonObject & value){ mDataJson.insert("msg",value); }
//when added the code below ,the errors occured.
UiBaseQml * m_WidgetQml =NULL;
if(m_WidgetQml!=NULL){
m_WidgetQml = new UiBaseQml();
QJsonObject t_data = {{"url","qrc:/qres/qml/default.qml"}};
m_WidgetQml->setDataJson(t_data);
m_WidgetQml->onInit(this);
m_WidgetQml->setSizePolicy(QSizePolicy::Expanding,QSizePolicy::Expanding);
m_WidgetQml->setResizeMode(QQuickWidget::ResizeMode::SizeRootObjectToView);
mLayoutMain->addWidget(m_WidgetQml);
} -
wrote on 15 Jun 2024, 07:32 last edited by
I found that if I used the cef module of the googles,sometimes came out the errors.If I removed these codes or removed the cef module it will run normally.I dont konw why.Maybe the cef messages loops influenced the qt loops?
-
I found that if I used the cef module of the googles,sometimes came out the errors.If I removed these codes or removed the cef module it will run normally.I dont konw why.Maybe the cef messages loops influenced the qt loops?
wrote on 15 Jun 2024, 14:27 last edited by Pl45m4What is "cef module of googles"?
-
wrote on 16 Jun 2024, 09:32 last edited by nicker player
its my mistake.I used the cefview to replacing the module of the webengine.cause the mingw-make version dosent support web view on the windo ws platform.the cef is Chromium Embedded Framework.
and by the way.I found a line from the programe output:DirectWrite: CreateFontFaceFromHDC() failed (ָʾÊäÈëÎļþ (ÀýÈç×ÖÌåÎļþ) ÖеĴíÎó¡£) for QFontDef(Family="Fixedsys", pointsize=13.5, pixelsize=20, styleHint=5, weight=50, stretch=100, hintingPreference=0) LOGFONT("Fixedsys", lfWidth=0, lfHeight=-20) dpi=144
so is it possible that the code here caused the errors?
https://bugreports.qt.io/browse/QTBUG-57180
and i used the qt 5.14.0 msvc 2017
Based on Qt 5.14.0 (MSVC 2017, 32 bit)
Built on Dec 10 2019 12:27:13
From revision 017ed74400 -
; UiBaseQml::UiBaseQml() { qDebug()<<"UiBaseQml::UiBaseQml()"; } int UiBaseQml::onCreateAllChild(){ QQmlContext * context = rootContext(); context->setContextProperty("dataRoot", this); context->setContextProperty("dataContext",mDataJson); } int UiBaseQml::onInitCtrl(){ setAttribute(Qt::WA_AlwaysStackOnTop); setClearColor(Qt::transparent); setResizeMode(QQuickWidget::SizeViewToRootObject); QString t_url = "qrc:/qres/qml/default.qml"; if(mDataJson.contains("url")){ t_url = mDataJson.find("url").value().toString(); } setSource(QUrl(t_url)); if(mDataJson.contains("title")){ QString t_title = mDataJson.find("title").value().toString(); } } int UiBaseQml::onInitSlots(){ connect(this,SIGNAL(statusChanged(QQuickWidget::Status)),this,SLOT(onChangeState(QQuickWidget::Status))); } int UiBaseQml::onRelayout(){ QWidget * t_parent = (QWidget *)parent(); auto s = (t_parent->size()) / 2; s = (t_parent->size() - size()) / 2; move(s.width(), s.height()); } int UiBaseQml::onInit(void* p ){ setParent((QWidget *)p); onCreateAllChild(); onInitCtrl(); onInitSlots(); onRelayout(); } int UiBaseQml::onSendMsg(const QJsonObject & value){ mDataJson.insert("msg",value); }
//when added the code below ,the errors occured.
UiBaseQml * m_WidgetQml =NULL;
if(m_WidgetQml!=NULL){
m_WidgetQml = new UiBaseQml();
QJsonObject t_data = {{"url","qrc:/qres/qml/default.qml"}};
m_WidgetQml->setDataJson(t_data);
m_WidgetQml->onInit(this);
m_WidgetQml->setSizePolicy(QSizePolicy::Expanding,QSizePolicy::Expanding);
m_WidgetQml->setResizeMode(QQuickWidget::ResizeMode::SizeRootObjectToView);
mLayoutMain->addWidget(m_WidgetQml);
}wrote on 17 Jun 2024, 04:59 last edited by ChrisW67its my mistake.I used the cefview to replacing the module of the webengine.cause the mingw-make version dosent support web view on the windo ws platform.the cef is Chromium Embedded Framework.
and i used the qt 5.14.0 msvc 2017
What does MingW have to do with this? You claim to be using the MSVC libraries and thus toolchain.
You do not say where you put this code. However, your code, my comments:
UiBaseQml * m_WidgetQml =NULL; // ^^^ m_WidgetQml is NULL // vvv so this condition is never true if(m_WidgetQml!=NULL){ m_WidgetQml = new UiBaseQml(); QJsonObject t_data = {{"url","qrc:/qres/qml/default.qml"}}; m_WidgetQml->setDataJson(t_data); m_WidgetQml->onInit(this); m_WidgetQml->setSizePolicy(QSizePolicy::Expanding,QSizePolicy::Expanding); m_WidgetQml->setResizeMode(QQuickWidget::ResizeMode::SizeRootObjectToView); mLayoutMain->addWidget(m_WidgetQml); } // m_WidgetQml is still NULL and none of that setup happened. // m_WidgetQml is a local variable and will go out of whatever scope contains this code.
Is that really what you expected?
-
its my mistake.I used the cefview to replacing the module of the webengine.cause the mingw-make version dosent support web view on the windo ws platform.the cef is Chromium Embedded Framework.
and i used the qt 5.14.0 msvc 2017
What does MingW have to do with this? You claim to be using the MSVC libraries and thus toolchain.
You do not say where you put this code. However, your code, my comments:
UiBaseQml * m_WidgetQml =NULL; // ^^^ m_WidgetQml is NULL // vvv so this condition is never true if(m_WidgetQml!=NULL){ m_WidgetQml = new UiBaseQml(); QJsonObject t_data = {{"url","qrc:/qres/qml/default.qml"}}; m_WidgetQml->setDataJson(t_data); m_WidgetQml->onInit(this); m_WidgetQml->setSizePolicy(QSizePolicy::Expanding,QSizePolicy::Expanding); m_WidgetQml->setResizeMode(QQuickWidget::ResizeMode::SizeRootObjectToView); mLayoutMain->addWidget(m_WidgetQml); } // m_WidgetQml is still NULL and none of that setup happened. // m_WidgetQml is a local variable and will go out of whatever scope contains this code.
Is that really what you expected?
wrote on 17 Jun 2024, 08:34 last edited by@ChrisW67
on ,its my mistake. the code is
if(m_WidgetQml==NULL){
in fact.
what I used the != just a pre code .so I thought it would be caused by the third web view components of the programe.the messages loops influnced the qt msg loops.
1/10