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

QtCreator crashing in designer mode

    XMLWordPrintable

Details

    • Bug
    • Resolution: Unresolved
    • Not Evaluated
    • None
    • Qt Creator 4.12.0
    • Quick Designer
    • None
    • ArchLinux
    • Linux/X11

    Description

      Hello,

      I wanted to learn Qt, so I have installed QtCreator 4.12.0 from the ArchLinux repos. However, when I want to add (or manipulate) elements in a QML file in the design mode, QtCreator crashes on a null pointer dereference. 

      Steps to reproduce:

      1. Create a new project - QtQuick application, scroll template
        Choose Qt version (I tried both 5.12 and 5.14), leave the rest of the options to their defaults
      2. Switch to the design mode and try to drag and drop a QtQuick positioner in between the ApplicationWindow and the ScrollView:
      3. QtCreator crashes every single time on a null pointer dereference. The positioner can sometimes be added elsewhere into the hierarchy but when changing the hierarchy order later on, QtCreator crashes.

      GDB log:

      ...

      [Thread 0x7fff49dbe700 (LWP 233375) exited]
      PropertyEditor: invalid node for setup
      -Type <RET> for more, q to quit, c to continue without paging-c

      Thread 1 "qtcreator" received signal SIGSEGV, Segmentation fault.
      0x00007ffff7779e00 in QWidget::window() const () from /usr/lib/libQt5Widgets.so.5
      (gdb) i s
      #0 0x00007ffff7779e00 in QWidget::window() const () from /usr/lib/libQt5Widgets.so.5
      #1 0x00007fffb9c6812a in ?? () from /usr/lib/qtcreator/plugins/libQmlDesigner.so
      #2 0x00007ffff7a349ea in QTreeView::drawRow(QPainter*, QStyleOptionViewItem const&, QModelIndex const&) const () from /usr/lib/libQt5Widgets.so.5
      #3 0x00007ffff7a3a95b in QTreeView::drawTree(QPainter*, QRegion const&) const ()
      from /usr/lib/libQt5Widgets.so.5
      #4 0x00007ffff7a3aec9 in QTreeViewPrivate::renderTreeToPixmapForAnimation(QRect const&) const ()
      from /usr/lib/libQt5Widgets.so.5
      #5 0x00007ffff7a3c7fd in QTreeViewPrivate::prepareAnimatedOperation(int, QAbstractAnimation::Direction) () from /usr/lib/libQt5Widgets.so.5
      #6 0x00007ffff7a3ccab in QTreeViewPrivate::expand(int, bool) () from /usr/lib/libQt5Widgets.so.5
      #7 0x00007ffff7a3cea1 in QTreeView::expand(QModelIndex const&) () from /usr/lib/libQt5Widgets.so.5
      #8 0x00007fffb9c5cf04 in ?? () from /usr/lib/qtcreator/plugins/libQmlDesigner.so
      #9 0x00007fffb9c5ddf9 in ?? () from /usr/lib/qtcreator/plugins/libQmlDesigner.so
      #10 0x00007ffff6b27ada in QObject::event(QEvent*) () from /usr/lib/libQt5Core.so.5
      #11 0x00007ffff774f352 in QApplicationPrivate::notify_helper(QObject*, QEvent*) ()
      from /usr/lib/libQt5Widgets.so.5
      #12 0x00007ffff7758829 in QApplication::notify(QObject*, QEvent*) ()
      from /usr/lib/libQt5Widgets.so.5
      #13 0x00007ffff6afa4f2 in QCoreApplication::notifyInternal2(QObject*, QEvent*) ()
      from /usr/lib/libQt5Core.so.5
      #14 0x00007ffff6afcd56 in QCoreApplicationPrivate::sendPostedEvents(QObject*, int, QThreadData*) ()
      from /usr/lib/libQt5Core.so.5
      #15 0x00007ffff6b53244 in ?? () from /usr/lib/libQt5Core.so.5
      #16 0x00007ffff511e6be in g_main_context_dispatch () from /usr/lib/libglib-2.0.so.0
      -Type <RET> for more, q to quit, c to continue without paging-
      #17 0x00007ffff5120531 in ?? () from /usr/lib/libglib-2.0.so.0
      #18 0x00007ffff5120571 in g_main_context_iteration () from /usr/lib/libglib-2.0.so.0
      #19 0x00007ffff6b52890 in QEventDispatcherGlib::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) () from /usr/lib/libQt5Core.so.5
      #20 0x00007ffff6af905c in QEventLoop::exec(QFlags<QEventLoop::ProcessEventsFlag>) ()
      from /usr/lib/libQt5Core.so.5
      #21 0x00007ffff6b01066 in QCoreApplication::exec() () from /usr/lib/libQt5Core.so.5
      #22 0x000055555555e8d3 in ?? ()
      #23 0x00007ffff648f023 in __libc_start_main () from /usr/lib/libc.so.6
      #24 0x000055555555ed7e in ?? ()
      (gdb) disass
      Dump of assembler code for function _ZNK7QWidget6windowEv:
      => 0x00007ffff7779e00 <+0>: mov 0x8(%rdi),%rax
      0x00007ffff7779e04 <+4>: mov 0x10(%rax),%rdx
      0x00007ffff7779e08 <+8>: mov 0x28(%rdi),%rax
      0x00007ffff7779e0c <+12>: testb $0x1,0xc(%rax)
      0x00007ffff7779e10 <+16>: jne 0x7ffff7779e48 <_ZNK7QWidget6windowEv+72>
      0x00007ffff7779e12 <+18>: test %rdx,%rdx
      0x00007ffff7779e15 <+21>: jne 0x7ffff7779e25 <_ZNK7QWidget6windowEv+37>
      0x00007ffff7779e17 <+23>: jmp 0x7ffff7779e48 <_ZNK7QWidget6windowEv+72>
      0x00007ffff7779e19 <+25>: nopl 0x0(%rax)
      0x00007ffff7779e20 <+32>: test %rdx,%rdx
      0x00007ffff7779e23 <+35>: je 0x7ffff7779e40 <_ZNK7QWidget6windowEv+64>
      0x00007ffff7779e25 <+37>: mov %rdx,%rax
      0x00007ffff7779e28 <+40>: mov 0x8(%rdx),%rdx
      0x00007ffff7779e2c <+44>: mov 0x28(%rax),%rcx
      0x00007ffff7779e30 <+48>: mov 0x10(%rdx),%rdx
      0x00007ffff7779e34 <+52>: testb $0x1,0xc(%rcx)
      0x00007ffff7779e38 <+56>: je 0x7ffff7779e20 <_ZNK7QWidget6windowEv+32>
      0x00007ffff7779e3a <+58>: retq
      0x00007ffff7779e3b <+59>: nopl 0x0(%rax,%rax,1)
      0x00007ffff7779e40 <+64>: retq
      0x00007ffff7779e41 <+65>: nopl 0x0(%rax)
      0x00007ffff7779e48 <+72>: mov %rdi,%rax
      0x00007ffff7779e4b <+75>: retq
      End of assembler dump.
      (gdb) i r
      rax 0x0 0
      rbx 0x7fffffffd630 140737488344624
      rcx 0x7fffffffda90 140737488345744
      rdx 0x0 0
      rsi 0x7fffffffd340 140737488343872
      rdi 0x0 0
      rbp 0x7fffffffd3e0 0x7fffffffd3e0
      rsp 0x7fffffffd388 0x7fffffffd388
      r8 0x7fffffffda90 140737488345744
      r9 0x7ffff75dcd58 140737343507800
      r10 0x7fffffffd290 140737488343696
      r11 0x7ffff65fbcf0 140737326857456
      r12 0x7fffffffd5d0 140737488344528
      r13 0x7fffffffd3b0 140737488343984
      r14 0x7fffffffd930 140737488345392
      r15 0x0 0
      rip 0x7ffff7779e00 0x7ffff7779e00 <QWidget::window() const>
      eflags 0x10202 [ IF RF ]
      cs 0x33 51
      ss 0x2b 43
      ds 0x0 0
      es 0x0 0
      fs 0x0 0
      gs 0x0 0
      (gdb)

       

      Attachments

        Issue Links

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

          Activity

            People

              thohartm Thomas Hartmann
              mikeeee Mike D
              Votes:
              1 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated:

                Gerrit Reviews

                  There are no open Gerrit changes