Uploaded image for project: 'Qt'
  1. Qt
  2. QTBUG-132839

QOpcUaProvider::availableBackends() causes _CrtIsValidHeapPointer(block) FALSE in Debug Configuration

    XMLWordPrintable

Details

    • Bug
    • Resolution: Invalid
    • P1: Critical
    • None
    • 6.8.1
    • OpcUA
    • None
    • Windows

    Description

      Hi,

       

      QtOpcUa version 6.8.1

      When running my application in Release the connection to the Plc works fine.

      When running my application in Debug and actually debugging it crashes after leaving the function in which I retrieve the available backends from the QOpcUaProvider.

       

      UaClient::init()

      ...
         QStringList available = provider.availableBackends();
         if (!available.isEmpty()) {
            m_client = provider.createClient(available[0]);
            if (m_client)
               qDebug() << "Client successfully created";
         } 
      ...
                                                                                                        
                                                                                                        
      1  RtlRegisterSecureMemoryCacheCallback                    ntdll                   0x7fffb17d72ce 
      2  EtwLogTraceEvent                                        ntdll                   0x7fffb17a2157 
      3  RtlValidateHeap                                         ntdll                   0x7fffb17573d1 
      4  HeapValidate                                            KERNELBASE              0x7fffaebf131b 
      5  CrtIsValidHeapPointer                                   ucrtbased               0x7fff1fdfe912 
      6  calloc_base                                             ucrtbased               0x7fff1fdfcb51 
      7  free_dbg                                                ucrtbased               0x7fff1fe00335 
      8  free                                                    ucrtbased               0x7fff1fe00a48 
      9  QArrayDataPointer<QString>::~QArrayDataPointer<QString> qarraydatapointer.h 110 0x7ff60b44ddcb 
      10 QList<QString>::~QList<QString>                         Client                  0x7ff60b44df67 
      11 UaClient::init                                          UaClient.cpp        66  0x7ff60b6b10ca 
      12 PlcList::init                                           PlcList.cpp         51  0x7ff60b69a748 
      13 main                                                    main.cpp            113 0x7ff60b446b94 
      14 invoke_main                                             exe_common.inl      79  0x7ff60b997b09 
      15 __scrt_common_main_seh                                  exe_common.inl      288 0x7ff60b9979ee 
      16 __scrt_common_main                                      exe_common.inl      331 0x7ff60b9978ae 
      17 mainCRTStartup                                          exe_main.cpp        17  0x7ff60b997b9e 
      18 BaseThreadInitThunk                                     KERNEL32                0x7fffaf5b259d 
      19 RtlUserThreadStart                                      ntdll                   0x7fffb172af38 
       

      qarraydatapointer.h:110 is the last debuggable line before the crash occurs.

      HEAP[Client.exe]: 
      Invalid address specified to RtlValidateHeap( 000002A8BD720000, 000002A8C1B4CF40 )
      Debug Assertion Failed!Program: C:\...\Client.exe
      File: minkernel\crts\ucrt\src\appcrt\heap\debug_heap.cpp
      Line: 904

      EDIT:

       

      This issue can be closed.

      It had to to with this issue and the debug version not being built correctly

      QTBUG-132338 QtOpcUa Required QtVersion Wrong - Qt Bug Tracker

      QtOpcUa release was on 6.8.1 but debug was on 6.7.2. Strangely enough, the 6.7.2 version was present in the Qt6.8 path...

       

      With the fix from Alexandru I was able to fix the problem.

      Attachments

        No reviews matched the request. Check your Options in the drop-down menu of this sections header.

        Activity

          People

            basyskom.jannis.voelker Jannis Völker
            redman Calvin Flatt
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes