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

crash during replace inside selection

    XMLWordPrintable

Details

    • Bug
    • Resolution: Done
    • P1: Critical
    • Qt Creator 2.1.0-rc1
    • Qt Creator 2.1.0
    • Editors
    • 2.1 built from source on 64 bit linux with Qt 4.7
    • 3564feacce6fea7296294da5b424524a65bc5396

    Description

      During a replace operation on a selection, Creator crashed. Backtrace:

      #0  0x00007f608983e3b3 in QVector<QScriptLine>::operator[] (this=0x0, i=0)
          at ../../include/QtCore/../../../47/src/corelib/tools/qvector.h:347
      #1  0x00007f6089986d7c in QTextLine::naturalTextRect (this=0x7fff468187e0)
          at /home/kamm/dev/qt/47/src/gui/text/qtextlayout.cpp:1454
      #2  0x00007f60782b1539 in TextEditor::Internal::TextEditorOverlay::createSelectionPath (this=0x62a0270, 
          begin=..., end=..., clip=...) at /home/kamm/dev/creator/2.1/src/plugins/texteditor/texteditoroverlay.cpp:193
      #3  0x00007f60782b2bcf in TextEditor::Internal::TextEditorOverlay::paintSelection (this=0x62a0270, 
          painter=0x7fff46819a40, selection=...)
          at /home/kamm/dev/creator/2.1/src/plugins/texteditor/texteditoroverlay.cpp:322
      #4  0x00007f60782b3572 in TextEditor::Internal::TextEditorOverlay::paint (this=0x62a0270, painter=0x7fff46819a40, 
          clip=...) at /home/kamm/dev/creator/2.1/src/plugins/texteditor/texteditoroverlay.cpp:403
      #5  0x00007f6078246cfb in TextEditor::BaseTextEditor::paintEvent (this=0x5a22660, e=0x7fff4681a6e0)
          at /home/kamm/dev/creator/2.1/src/plugins/texteditor/basetexteditor.cpp:2444
      #6  0x00007f60896d6508 in QWidget::event (this=0x5a22660, event=0x7fff4681a6e0)
          at /home/kamm/dev/qt/47/src/gui/kernel/qwidget.cpp:8406
      #7  0x00007f6089ba40ef in QFrame::event (this=0x5a22660, e=0x7fff4681a6e0)
          at /home/kamm/dev/qt/47/src/gui/widgets/qframe.cpp:557
      #8  0x00007f6089c560c7 in QAbstractScrollArea::viewportEvent (this=0x5a22660, e=0x7fff4681a6e0)
          at /home/kamm/dev/qt/47/src/gui/widgets/qabstractscrollarea.cpp:1043
      #9  0x00007f607824406a in TextEditor::BaseTextEditor::viewportEvent (this=0x5a22660, event=0x7fff4681a6e0)
          at /home/kamm/dev/creator/2.1/src/plugins/texteditor/basetexteditor.cpp:2060
      #10 0x00007f6089c56d47 in QAbstractScrollAreaPrivate::viewportEvent (this=0x5a22860, event=0x7fff4681a6e0)
          at /home/kamm/dev/qt/47/src/gui/widgets/qabstractscrollarea_p.h:100
      #11 0x00007f6089c56e52 in QAbstractScrollAreaFilter::eventFilter (this=0x5e9b110, o=0x5a21a90, e=0x7fff4681a6e0)
          at /home/kamm/dev/qt/47/src/gui/widgets/qabstractscrollarea_p.h:116
      #12 0x00007f608a8243e7 in QCoreApplicationPrivate::sendThroughObjectEventFilters (this=0x1e56060, 
          receiver=0x5a21a90, event=0x7fff4681a6e0) at /home/kamm/dev/qt/47/src/corelib/kernel/qcoreapplication.cpp:846
      #13 0x00007f6089666083 in QApplicationPrivate::notify_helper (this=0x1e56060, receiver=0x5a21a90, 
          e=0x7fff4681a6e0) at /home/kamm/dev/qt/47/src/gui/kernel/qapplication.cpp:4458
      #14 0x00007f6089665f0d in QApplication::notify (this=0x7fff4681ba50, receiver=0x5a21a90, e=0x7fff4681a6e0)
          at /home/kamm/dev/qt/47/src/gui/kernel/qapplication.cpp:4427
      #15 0x00007f608a82413e in QCoreApplication::notifyInternal (this=0x7fff4681ba50, receiver=0x5a21a90, 
          event=0x7fff4681a6e0) at /home/kamm/dev/qt/47/src/corelib/kernel/qcoreapplication.cpp:731
      #16 0x00007f608966907b in QCoreApplication::sendSpontaneousEvent (receiver=0x5a21a90, event=0x7fff4681a6e0)
          at ../../include/QtCore/../../../47/src/corelib/kernel/qcoreapplication.h:218
      #17 0x00007f60896cdf03 in QWidgetPrivate::drawWidget (this=0x5a22b40, pdev=0x28c24a8, rgn=..., offset=..., 
          flags=4, sharedPainter=0x0, backingStore=0x28c20d0) at /home/kamm/dev/qt/47/src/gui/kernel/qwidget.cpp:5493
      #18 0x00007f6089926ce8 in QWidgetBackingStore::sync (this=0x28c20d0)
          at /home/kamm/dev/qt/47/src/gui/painting/qbackingstore.cpp:1325
      #19 0x00007f60896c4a55 in QWidgetPrivate::syncBackingStore (this=0x2085660)
          at /home/kamm/dev/qt/47/src/gui/kernel/qwidget.cpp:1843
      #20 0x00007f60896d6baa in QWidget::event (this=0x20854e0, event=0x4d354f0)
          at /home/kamm/dev/qt/47/src/gui/kernel/qwidget.cpp:8553
      #21 0x00007f6089bc7d91 in QMainWindow::event (this=0x20854e0, event=0x4d354f0)
          at /home/kamm/dev/qt/47/src/gui/widgets/qmainwindow.cpp:1480
      #22 0x00007f60896660ac in QApplicationPrivate::notify_helper (this=0x1e56060, receiver=0x20854e0, e=0x4d354f0)
          at /home/kamm/dev/qt/47/src/gui/kernel/qapplication.cpp:4462
      #23 0x00007f6089665f0d in QApplication::notify (this=0x7fff4681ba50, receiver=0x20854e0, e=0x4d354f0)
          at /home/kamm/dev/qt/47/src/gui/kernel/qapplication.cpp:4427
      #24 0x00007f608a82413e in QCoreApplication::notifyInternal (this=0x7fff4681ba50, receiver=0x20854e0, 
      

      Interesting parts (in frame 2):

      (gdb) p line
      $14 = {i = 0, eng = 0x0}
      (gdb) p *blockLayout
      $15 = {d = 0x5450b00}
      

      I think this is caused by

      beginChar = begin.positionInBlock();
      line = blockLayout->lineForTextPosition(beginChar);
      

      setting line to an invalid QTextLine as begin.block() is not blockLayout's block.

      Attachments

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

        Activity

          People

            con Eike Ziller
            ckamm Christian Kamm
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes