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

MacOS X: using cursor.setBlockFormat in QSyntaxHighlighter::highlightBlock deadlocks

    XMLWordPrintable

Details

    • Bug
    • Resolution: Done
    • P1: Critical
    • 4.7.2
    • 4.7.0
    • GUI: Text handling
    • None
    • MacOS X 10.5 and 10.6, Qt 4.7
    • macOS
    • 64852122ba71bbb297b4f1e440f6fabee16ca2fe

    Description

      The attached program deadlocks in QFragmentMapData<QTextBlockData>::next(unsigned int). The problem is the use of cursor.setBlockFormat in the QSyntaxHighlighter::highlightBlock method.

      To consistently reproduce the bug, set MallocPreScribble=1 and MalloScribble=1 in the environment. Without these two environment variables, the behaviour is less consistent. Sometimes the app crashes, sometimes it just hangs.

      Steps to reproduce the bug:

      compile with:

      g++ -framework QtGui -framework QtCore -F/usr/local/qt/lib/ -I/usr/local/qt/include/QtGui crash.cc -o crash

      run with:

      MallocPreScribble=1 MallocScribble=1 ./crash

      The same code works flawlessly with Qt 4.6 and earlier.

      Attachments

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

        Activity

          People

            jiang Jiang Jiang
            mrcrick Marco Biasini
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes