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. QVector Size assert

QVector Size assert

Scheduled Pinned Locked Moved Unsolved General and Desktop
4 Posts 4 Posters 2.8k Views
  • 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.
  • M Offline
    M Offline
    mlathrop
    wrote on 5 Jan 2017, 23:18 last edited by
    #1

    Hello,
    I am getting a strange error that is proving difficult to debug. It occurs at seemingly random times (i.e. I could just leave the software running and come back and it have happened). I get the following error:

    Program: C:\Qt\5.7\msvc2013_64\bin\Qt5Cored.dll
    Module: 5.7.0
    File: global\qglobal.cpp
    Line: 3063
    
    ASSERT: "d->size == asize" in file c:\users\qt\work\qt\qtbase\include\qtcore\../../src/corelib/tools/qvector.h, line 615
    

    and when I press retry and look at the stack trace it appears to occur somewhere in "QWidgetBackingStore::sync" following the stack trace up it goes through a lot of files which are just machine code until it ends up on my

    return app.exec();
    

    in main.cpp.

    Anyone have any idea what could cause this so I know where to start debugging?

    A 1 Reply Last reply 7 Jan 2017, 04:18
    0
    • D Offline
      D Offline
      dheerendra
      Qt Champions 2022
      wrote on 6 Jan 2017, 03:43 last edited by
      #2

      Any sample code which u can share ? This helps to look at.

      Dheerendra
      @Community Service
      Certified Qt Specialist
      http://www.pthinks.com

      1 Reply Last reply
      3
      • V Offline
        V Offline
        VRonin
        wrote on 6 Jan 2017, 08:26 last edited by
        #3

        The only case when I can see something like that happening is making a deep copy of the vector and either running out of memory (but this should trigger a bad_alloc) or, somehow, having a race condition on the vector... very strange... given the stack trace shows QWidgetBackingStore::sync I'd focus on any custom paint event. try commenting all of them out and see if the problem is still there

        "La mort n'est rien, mais vivre vaincu et sans gloire, c'est mourir tous les jours"
        ~Napoleon Bonaparte

        On a crusade to banish setIndexWidget() from the holy land of Qt

        1 Reply Last reply
        2
        • M mlathrop
          5 Jan 2017, 23:18

          Hello,
          I am getting a strange error that is proving difficult to debug. It occurs at seemingly random times (i.e. I could just leave the software running and come back and it have happened). I get the following error:

          Program: C:\Qt\5.7\msvc2013_64\bin\Qt5Cored.dll
          Module: 5.7.0
          File: global\qglobal.cpp
          Line: 3063
          
          ASSERT: "d->size == asize" in file c:\users\qt\work\qt\qtbase\include\qtcore\../../src/corelib/tools/qvector.h, line 615
          

          and when I press retry and look at the stack trace it appears to occur somewhere in "QWidgetBackingStore::sync" following the stack trace up it goes through a lot of files which are just machine code until it ends up on my

          return app.exec();
          

          in main.cpp.

          Anyone have any idea what could cause this so I know where to start debugging?

          A Offline
          A Offline
          ambershark
          wrote on 7 Jan 2017, 04:18 last edited by
          #4

          @mlathrop Post the backtrace for us to look at. It sounds as if you are deleting something that is still in use which cuases the assert in the QWidget backingStore.

          My guess is you delete a QWidget derived class that was still in use by something else. Check your code for things like delete myWidget and change them to myWidget->deleteLater(). That should help you find what is causing the problem.

          Also a backtrace might help. :)

          My L-GPL'd C++ Logger github.com/ambershark-mike/sharklog

          1 Reply Last reply
          2

          2/4

          6 Jan 2017, 03:43

          • Login

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