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. ASSERT error?!
Qt 6.11 is out! See what's new in the release blog

ASSERT error?!

Scheduled Pinned Locked Moved Solved General and Desktop
4 Posts 3 Posters 1.2k 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.
  • MucipM Offline
    MucipM Offline
    Mucip
    wrote on last edited by
    #1

    Hi,
    My running code (without problem!) just started to give below error. What is the reason?

    ASSERT: "uint(i) < uint(size())" in file c:\users\qt\work\qt\qtbase\src\corelib\tools\qstring.h, line 920
    How can I solve or investigate it?...
    Qt 5.11.2
    Qt Creator 4.7.1

    regards,
    Mucip:)

    J.HilkJ 1 Reply Last reply
    0
    • MucipM Mucip

      Hi,
      My running code (without problem!) just started to give below error. What is the reason?

      ASSERT: "uint(i) < uint(size())" in file c:\users\qt\work\qt\qtbase\src\corelib\tools\qstring.h, line 920
      How can I solve or investigate it?...
      Qt 5.11.2
      Qt Creator 4.7.1

      regards,
      Mucip:)

      J.HilkJ Online
      J.HilkJ Online
      J.Hilk
      Moderators
      wrote on last edited by
      #2

      @Mucip
      seems like you try to acsess chars, in a QString, that don't exist. Most likly via const QChar QString::at(int position) const
      or something similar.

      Hard to tell without stacktrace and/or code.


      Be aware of the Qt Code of Conduct, when posting : https://forum.qt.io/topic/113070/qt-code-of-conduct


      Q: What's that?
      A: It's blue light.
      Q: What does it do?
      A: It turns blue.

      1 Reply Last reply
      3
      • MucipM Offline
        MucipM Offline
        Mucip
        wrote on last edited by Mucip
        #3

        Hi,
        Yes. You were right.

        if(modelTableHareket->rowCount()>0){
                ui->tVDetay->horizontalHeader()->setSectionResizeMode(3, QHeaderView::Stretch);
                ui->tVDetay->horizontalHeader()->setSectionResizeMode(4, QHeaderView::Stretch);
            }
        

        I was trying to use above code without row count check. Now it's ok. Thanks.

        Regargds,
        Mucip:)

        aha_1980A 1 Reply Last reply
        1
        • MucipM Mucip

          Hi,
          Yes. You were right.

          if(modelTableHareket->rowCount()>0){
                  ui->tVDetay->horizontalHeader()->setSectionResizeMode(3, QHeaderView::Stretch);
                  ui->tVDetay->horizontalHeader()->setSectionResizeMode(4, QHeaderView::Stretch);
              }
          

          I was trying to use above code without row count check. Now it's ok. Thanks.

          Regargds,
          Mucip:)

          aha_1980A Offline
          aha_1980A Offline
          aha_1980
          Lifetime Qt Champion
          wrote on last edited by
          #4

          Hi @Mucip,

          I'm glad you solved the problem.

          So please close this topic as SOLVED. Thanks!

          Qt has to stay free or it will die.

          1 Reply Last reply
          0

          • Login

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