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

when destructing a container of QGlyphRun objects in GUI event handler an exception arises( _BLOCK_TYPE_IS_VALID assertion failed)

    XMLWordPrintable

Details

    • Bug
    • Resolution: Invalid
    • Not Evaluated
    • None
    • 4.8.0
    • None
    • I'm using QT 4.8 non-commercial with MSVC++2010 express.

    Description

      I'm trying to navigate through the set of glyphs in QTextEdit widget, but cannot overcome the following issue: after the list of QGlyphRuns is retrieved, it cannot be destuctured.

      Here is the code for getting list of QGlyphRuns:

      When glyphs is getting destructed I get _BLOCK_TYPE_IS_VALID assertion failed. I've been trying a several ways to launch the code above:
      QTextDocument* doc = ui->textEdit->document();
      QTextBlock block = doc->begin();
      while(block.isValid())
      {
      QTextLayout* tl = block.layout();

      { QList<QGlyphRun> glyphs = tl->glyphRuns(); // the exception raises here, upon exiting the block }

      block = block.next();
      }
      When glyphs is getting destructed I get _BLOCK_TYPE_IS_VALID assertion failed. I've been trying a several ways to launch the code above:

      • simple slot
      • slot handled in a separate thread (with and without use of moveToThread function)
      • as an event handler (the event is fired by postEvent method of QApplicaiton)
        But none of those helped to get rid of the exception. The only case when it doesn't arise is when the code above is called from MainWindows constructor (after calling ui->setupUI()).

      Attachments

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

        Activity

          People

            esabraha Eskil Abrahamsen Blomfeldt
            ant Anton Zorin
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes