Uploaded image for project: 'Qt Creator'
  1. Qt Creator
  2. QTCREATORBUG-12172

Crash when using custom highlight definition with indentation-based folding enabled

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Not Evaluated
    • Resolution: Done
    • Affects Version/s: Qt Creator 3.1.0, Qt Creator 3.1.1, Qt Creator 3.2.0-beta1
    • Fix Version/s: Qt Creator 3.1.1
    • Component/s: Editors
    • Labels:
      None
    • Commits:
      1f45eb2c210b033a30976ec9ddec5b4e8339ade4

      Description

      Creator crashes when opening a file which:

      • loads Kate's definition file
      • has indentation-based folding enabled
      • has at least one line starting with whitespace.

      The crash is a result of null pointer reference in Highlighter::applyIndentationBasedFolding(const QString &text) const

      m_tabSettings is null, and never set for files other than C++.

      To reproduce:
      1. Run Creator on Linux (or possibly other environment when default Kate definitions are available)
      2. Open a file which will load Kate definition with indentation-based folding, ie *.ccss or haskell
      3. Immediate sigsegv

      Simple patch working around the issue (but not fixing it properly, ie not setting valid tab settings) attached.

        Attachments

          Issue Links

          For Gerrit Dashboard: QTCREATORBUG-12172
          # Subject Branch Project Status CR V

            Activity

              People

              • Assignee:
                davschul David Schulz
                Reporter:
                maciej.gajewski Maciej Gajewski
              • Votes:
                0 Vote for this issue
                Watchers:
                2 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved:

                  Gerrit Reviews

                  There are no open Gerrit changes