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

Serious bugs in code folding: Code loss or crash when saving folded code

    XMLWordPrintable

Details

    • Bug
    • Resolution: Done
    • Not Evaluated
    • None
    • Qt Creator 2.0.1, Qt Creator 2.1.0
    • Editors
    • None
    • Windows, Linux

    Description

      Using the code folding feature together with the "Clean Whitespace"-Option leads to different issues depending on OS used:
      Windows 7 64bit: Crash or loss of code
      Linux (Debian, Ubuntu, install with Qt SDK from nokia.com): Loss of code

      How to reproduce:
      Open a file (or create a new one) with some simple code, include a foldable block. Fold it and save the file (Ctrl-S) while the Clean Whitespace (and possibly also Clean Intendation) option is enabled. It seems to be better reproduceable, if there are some empty lines at the end of the block.

      Result: On windows, frequent crashes (hangup or segfault) occur, or on both windows and linux all folded code or all but the last bracket is lost. I had no crash on linux so far

      You can use the file attached to try it yourself - simply add two new lines after "return a.exec();", fold int main and press ctrl+s or save in any other way

      Attachments

        Issue Links

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

          Activity

            People

              leamelo Leandro T. C. Melo
              tornado Florian Satzger
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Gerrit Reviews

                  There are no open Gerrit changes