Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. General and Desktop
  4. unknown qml errors ,couldnt find the errors occured.
Forum Updated to NodeBB v4.3 + New Features

unknown qml errors ,couldnt find the errors occured.

Scheduled Pinned Locked Moved Unsolved General and Desktop
10 Posts 4 Posters 439 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • N Offline
    N Offline
    nicker player
    wrote on 13 Jun 2024, 14:39 last edited by
    #1
    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 ??    
    
    P 1 Reply Last reply 13 Jun 2024, 14:43
    0
    • N nicker player
      13 Jun 2024, 14:39
      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 ??    
      
      P Offline
      P Offline
      Pl45m4
      wrote on 13 Jun 2024, 14:43 last edited by
      #2

      @nicker-player

      Isn't that the same issue as in your last topic here?
      Debug your application, post your code, describe what your are doing...


      If debugging is the process of removing software bugs, then programming must be the process of putting them in.

      ~E. W. Dijkstra

      1 Reply Last reply
      0
      • N Offline
        N Offline
        nicker player
        wrote on 13 Jun 2024, 14:57 last edited by
        #3

        yeah but i dont know how to debug the code . I tried a lot of ways .But its hard for me to do that.

        1 Reply Last reply
        0
        • A Offline
          A Offline
          arceajin
          wrote on 14 Jun 2024, 01:49 last edited by
          #4

          please provide a Minimal reproducible example

          1 Reply Last reply
          0
          • N Offline
            N Offline
            nicker player
            wrote on 15 Jun 2024, 04:58 last edited by
            #5
            ;
            
            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);
            }

            C 1 Reply Last reply 17 Jun 2024, 04:59
            0
            • N Offline
              N Offline
              nicker player
              wrote on 15 Jun 2024, 07:32 last edited by
              #6

              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?

              P 1 Reply Last reply 15 Jun 2024, 14:27
              0
              • N nicker player
                15 Jun 2024, 07:32

                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?

                P Offline
                P Offline
                Pl45m4
                wrote on 15 Jun 2024, 14:27 last edited by Pl45m4
                #7

                @nicker-player

                What is "cef module of googles"?


                If debugging is the process of removing software bugs, then programming must be the process of putting them in.

                ~E. W. Dijkstra

                1 Reply Last reply
                0
                • N Offline
                  N Offline
                  nicker player
                  wrote on 16 Jun 2024, 09:32 last edited by nicker player
                  #8

                  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

                  1 Reply Last reply
                  0
                  • N nicker player
                    15 Jun 2024, 04:58
                    ;
                    
                    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);
                    }

                    C Offline
                    C Offline
                    ChrisW67
                    wrote on 17 Jun 2024, 04:59 last edited by ChrisW67
                    #9

                    @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 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?

                    N 1 Reply Last reply 17 Jun 2024, 08:34
                    0
                    • C ChrisW67
                      17 Jun 2024, 04:59

                      @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 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?

                      N Offline
                      N Offline
                      nicker player
                      wrote on 17 Jun 2024, 08:34 last edited by
                      #10

                      @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 Reply Last reply
                      0

                      1/10

                      13 Jun 2024, 14:39

                      • Login

                      • Login or register to search.
                      1 out of 10
                      • First post
                        1/10
                        Last post
                      0
                      • Categories
                      • Recent
                      • Tags
                      • Popular
                      • Users
                      • Groups
                      • Search
                      • Get Qt Extensions
                      • Unsolved