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

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

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Done
    • Icon: Not Evaluated Not Evaluated
    • Qt Creator 3.1.1
    • Qt Creator 3.1.0, Qt Creator 3.1.1, Qt Creator 3.2.0-beta1
    • Editors
    • None
    • 1f45eb2c210b033a30976ec9ddec5b4e8339ade4

      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.

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

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

              Created:
              Updated:
              Resolved:

                There are no open Gerrit changes