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

Crash when inputting double quotation mark (") to end of line while cursor position is outside of visible editor view

    XMLWordPrintable

Details

    • Bug
    • Resolution: Fixed
    • P1: Critical
    • Qt Creator 15.0.1, Qt Creator 16.0.0-beta1
    • Editors
    • None
    • Linux/X11
    • d44ec5455 (15.0)

    Description

      When editing QML or JavaScript files the QtCreator crashes if you try to input " character to end of the line while cursor line is not visible. Text Editor Completion for automatically inserting matching characters needs to enabled.

      To reproduce:

      1. Open up/create a QML/JS file that is longer than the editor view.
      2. Move mouse cursor to end of line somewhere at the top of the file (for example end of line 2)
      3. Scroll down with mouse while keeping the cursor position at the top (line 2)
      4. Once line where the cursor is located (line 2) is no longer visible you have scrolled enough
      5. Insert " character
      6. Crash

      Backtrace:

      #0  0x00007ffff6cd61ed in QTextLine::naturalTextRect() const () from /home/tommi/Qt/Tools/QtCreator/bin/../lib/Qt/lib/libQt6Gui.so.6
      #1  0x00007ffff75d0ecc in ?? () from /home/tommi/Qt/Tools/QtCreator/bin/../lib/Qt/lib/libQt6Widgets.so.6
      #2  0x00007ffff75d130c in ?? () from /home/tommi/Qt/Tools/QtCreator/bin/../lib/Qt/lib/libQt6Widgets.so.6
      #3  0x00007ffff75d5ef1 in ?? () from /home/tommi/Qt/Tools/QtCreator/bin/../lib/Qt/lib/libQt6Widgets.so.6
      #4  0x00007ffff75ff3c6 in QWidgetTextControl::setTextCursor(QTextCursor const&, bool) () from /home/tommi/Qt/Tools/QtCreator/bin/../lib/Qt/lib/libQt6Widgets.so.6
      #5  0x00007fffd432fec2 in TextEditor::TextEditorWidget::doSetTextCursor(QTextCursor const&, bool) () from /home/tommi/Qt/Tools/QtCreator/lib/qtcreator/plugins/libTextEditor.so
      #6  0x00007fffd433a993 in TextEditor::TextEditorWidget::keyPressEvent(QKeyEvent*) () from /home/tommi/Qt/Tools/QtCreator/lib/qtcreator/plugins/libTextEditor.so
      #7  0x00007ffff7409cab in QWidget::event(QEvent*) () from /home/tommi/Qt/Tools/QtCreator/bin/../lib/Qt/lib/libQt6Widgets.so.6
      #8  0x00007ffff749b426 in QFrame::event(QEvent*) () from /home/tommi/Qt/Tools/QtCreator/bin/../lib/Qt/lib/libQt6Widgets.so.6
      #9  0x00007ffff73a93f6 in QApplicationPrivate::notify_helper(QObject*, QEvent*) () from /home/tommi/Qt/Tools/QtCreator/bin/../lib/Qt/lib/libQt6Widgets.so.6
      #10 0x00007ffff73b265b in QApplication::notify(QObject*, QEvent*) () from /home/tommi/Qt/Tools/QtCreator/bin/../lib/Qt/lib/libQt6Widgets.so.6
      #11 0x00007ffff5f74caa in QCoreApplication::notifyInternal2(QObject*, QEvent*) () from /home/tommi/Qt/Tools/QtCreator/bin/../lib/Qt/lib/libQt6Core.so.6
      #12 0x00007ffff741f4db in ?? () from /home/tommi/Qt/Tools/QtCreator/bin/../lib/Qt/lib/libQt6Widgets.so.6
      #13 0x00007ffff73a93f6 in QApplicationPrivate::notify_helper(QObject*, QEvent*) () from /home/tommi/Qt/Tools/QtCreator/bin/../lib/Qt/lib/libQt6Widgets.so.6
      #14 0x00007ffff5f74caa in QCoreApplication::notifyInternal2(QObject*, QEvent*) () from /home/tommi/Qt/Tools/QtCreator/bin/../lib/Qt/lib/libQt6Core.so.6
      #15 0x00007ffff6966213 in QGuiApplicationPrivate::processKeyEvent(QWindowSystemInterfacePrivate::KeyEvent*) () from /home/tommi/Qt/Tools/QtCreator/bin/../lib/Qt/lib/libQt6Gui.so.6
      #16 0x00007fffed594fcb in ?? () from /home/tommi/Qt/Tools/QtCreator/lib/Qt/plugins/platforminputcontexts/libibusplatforminputcontextplugin.so
      #17 0x00007ffff5fd7038 in ?? () from /home/tommi/Qt/Tools/QtCreator/bin/../lib/Qt/lib/libQt6Core.so.6
      #18 0x00007ffff2a403c3 in QDBusPendingCallWatcher::finished(QDBusPendingCallWatcher*) () from /home/tommi/Qt/Tools/QtCreator/bin/../lib/Qt/lib/libQt6DBus.so.6
      #19 0x00007ffff5fcb010 in QObject::event(QEvent*) () from /home/tommi/Qt/Tools/QtCreator/bin/../lib/Qt/lib/libQt6Core.so.6
      #20 0x00007ffff73a93f6 in QApplicationPrivate::notify_helper(QObject*, QEvent*) () from /home/tommi/Qt/Tools/QtCreator/bin/../lib/Qt/lib/libQt6Widgets.so.6
      #21 0x00007ffff5f74caa in QCoreApplication::notifyInternal2(QObject*, QEvent*) () from /home/tommi/Qt/Tools/QtCreator/bin/../lib/Qt/lib/libQt6Core.so.6
      #22 0x00007ffff5f7866a in QCoreApplicationPrivate::sendPostedEvents(QObject*, int, QThreadData*) () from /home/tommi/Qt/Tools/QtCreator/bin/../lib/Qt/lib/libQt6Core.so.6
      #23 0x00007ffff624f257 in ?? () from /home/tommi/Qt/Tools/QtCreator/bin/../lib/Qt/lib/libQt6Core.so.6
      #24 0x00007ffff2ad1d3b in g_main_context_dispatch () from /lib/x86_64-linux-gnu/libglib-2.0.so.0
      #25 0x00007ffff2b272b8 in ?? () from /lib/x86_64-linux-gnu/libglib-2.0.so.0
      #26 0x00007ffff2acf3e3 in g_main_context_iteration () from /lib/x86_64-linux-gnu/libglib-2.0.so.0
      #27 0x00007ffff624e91e in QEventDispatcherGlib::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) () from /home/tommi/Qt/Tools/QtCreator/bin/../lib/Qt/lib/libQt6Core.so.6
      #28 0x00007ffff5f81fe2 in QEventLoop::exec(QFlags<QEventLoop::ProcessEventsFlag>) () from /home/tommi/Qt/Tools/QtCreator/bin/../lib/Qt/lib/libQt6Core.so.6
      #29 0x00007ffff5f7e166 in QCoreApplication::exec() () from /home/tommi/Qt/Tools/QtCreator/bin/../lib/Qt/lib/libQt6Core.so.6

      Attachments

        For Gerrit Dashboard: QTCREATORBUG-32401
        # Subject Branch Project Status CR V

        Activity

          People

            davschul David Schulz
            tommi.korhonen Tommi Korhonen
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes