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

QSS Stylesheet parsing asserts on 'QHeaderView::section:vertical'

    XMLWordPrintable

Details

    • Bug
    • Resolution: Done
    • P1: Critical
    • 5.3.0
    • 5.2.0 Alpha, 5.2.0 Beta1 , 5.2.0 RC1, 5.2.0, 5.2.1
    • GUI: Text handling
    • None
    • Windows 7 SP1 x64, VS2008 SP1
    • c453571d753160313a8dcb3f3aa4667c34616a8f

    Description

      The problem was probably caused by commit bacbf1fcf35afcece74270fda5521d43b039ee48 in which qBinaryFind() was substituted with std::lower_bound() in qcssparser.cpp. The QCssKnownValue array passed to findKnownValue() in bool Parser::parsePseudo(Pseudo *pseudo) is not fully initialized. The 'pseudos' array have only 44 values defined but the array is declared to be with size = NumPseudos - 1, where NumPseudos = 46. So the array is declared with size 45 and only 44 values are initialized. Changind the declaration of NumPseudos to 'const int NumPseudos = 45;' in qcssparser_p.h fixes the assert. The assert happens on the word 'vertical' probably because it is declared at the end of the pseudos array. For example 'horizontal' doesn't force std::lower_bound to go to the end and the assert doesn't get hit.

      Attachments

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

        Activity

          People

            peppe Giuseppe D'Angelo
            emobemo Emil Ivanov
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes