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

Crash when editing a lambda expression

    XMLWordPrintable

Details

    Description

      When trying to enter code like

       
          VariableManager::registerFileVariables(kCurrentDocumentPrefix, tr("Current document"),
              [=]() {...}
      

      with cursor near to the = I tend to get crashes like

      Program terminated with signal 11, Segmentation fault.
      #0  CPlusPlus::DesignatorAST::lastToken (this=0x7f4411487e80) at ../3rdparty/cplusplus/AST.cpp:4511
      4511                if (unsigned candidate = u.bracket.expression->lastToken())
      (gdb) bt
      #0  CPlusPlus::DesignatorAST::lastToken (this=0x7f4411487e80) at ../3rdparty/cplusplus/AST.cpp:4511
      #1  0x00007f44b36c6944 in CPlusPlus::ASTPath::preVisit (this=0x7fff2ce403a0, ast=0x7f4411487e80) at ASTPath.cpp:68
      #2  0x00007f44b36409d8 in CPlusPlus::AST::accept (this=0x7f4411487e80, visitor=0x7fff2ce403a0) at ../3rdparty/cplusplus/AST.cpp:50
      #3  0x00007f44b36480a9 in accept (visitor=0x7fff2ce403a0, ast=<optimized out>) at ../3rdparty/cplusplus/AST.h:93
      #4  accept<CPlusPlus::DesignatorAST*> (visitor=0x7fff2ce403a0, it=0x7f4411487ea8) at ../3rdparty/cplusplus/AST.h:99
      #5  CPlusPlus::DesignatedInitializerAST::accept0 (this=0x7f4411487e60, visitor=0x7fff2ce403a0)
          at ../3rdparty/cplusplus/ASTVisit.cpp:1292
      #6  0x00007f44b36409ec in CPlusPlus::AST::accept (this=0x7f4411487e60, visitor=0x7fff2ce403a0) at ../3rdparty/cplusplus/AST.cpp:51
      #7  0x00007f44b3646571 in accept (visitor=0x7fff2ce403a0, ast=<optimized out>) at ../3rdparty/cplusplus/AST.h:93
      #8  accept<CPlusPlus::ExpressionAST*> (visitor=0x7fff2ce403a0, it=0x7f4411487ee8) at ../3rdparty/cplusplus/AST.h:99
      #9  CPlusPlus::CallAST::accept0 (this=0x7f4411487cf0, visitor=0x7fff2ce403a0) at ../3rdparty/cplusplus/ASTVisit.cpp:721
      #10 0x00007f44b36409ec in CPlusPlus::AST::accept (this=0x7f4411487cf0, visitor=0x7fff2ce403a0) at ../3rdparty/cplusplus/AST.cpp:51
      #11 0x00007f44b36458e0 in accept (visitor=0x7fff2ce403a0, ast=<optimized out>) at ../3rdparty/cplusplus/AST.h:93
      #12 CPlusPlus::ExpressionStatementAST::accept0 (this=0x7f4411487f00, visitor=0x7fff2ce403a0) at ../3rdparty/cplusplus/ASTVisit.cpp:464
      #13 0x00007f44b36409ec in CPlusPlus::AST::accept (this=0x7f4411487f00, visitor=0x7fff2ce403a0) at ../3rdparty/cplusplus/AST.cpp:51
      #14 0x00007f44b36450d9 in accept (visitor=0x7fff2ce403a0, ast=<optimized out>) at ../3rdparty/cplusplus/AST.h:93
      #15 accept<CPlusPlus::StatementAST*> (visitor=0x7fff2ce403a0, it=0x7f4411487f18) at ../3rdparty/cplusplus/AST.h:99
      #16 CPlusPlus::CompoundStatementAST::accept0 (this=0x7f4410b651d8, visitor=0x7fff2ce403a0) at ../3rdparty/cplusplus/ASTVisit.cpp:290
      #17 0x00007f44b36409ec in CPlusPlus::AST::accept (this=0x7f4410b651d8, visitor=0x7fff2ce403a0) at ../3rdparty/cplusplus/AST.cpp:51
      #18 0x00007f44b3645998 in accept (visitor=0x7fff2ce403a0, ast=<optimized out>) at ../3rdparty/cplusplus/AST.h:93
      #19 CPlusPlus::FunctionDefinitionAST::accept0 (this=0x7f4410b651a0, visitor=0x7fff2ce403a0) at ../3rdparty/cplusplus/ASTVisit.cpp:475
      #20 0x00007f44b36409ec in CPlusPlus::AST::accept (this=0x7f4410b651a0, visitor=0x7fff2ce403a0) at ../3rdparty/cplusplus/AST.cpp:51
      #21 0x00007f44b3646e49 in accept (visitor=0x7fff2ce403a0, ast=<optimized out>) at ../3rdparty/cplusplus/AST.h:93
      #22 accept<CPlusPlus::DeclarationAST*> (visitor=0x7fff2ce403a0, it=0x7f441148e4d8) at ../3rdparty/cplusplus/AST.h:99
      #23 CPlusPlus::TranslationUnitAST::accept0 (this=0x7f4410e7d420, visitor=0x7fff2ce403a0) at ../3rdparty/cplusplus/ASTVisit.cpp:928
      #24 0x00007f44b36409ec in CPlusPlus::AST::accept (this=0x7f4410e7d420, visitor=0x7fff2ce403a0) at ../3rdparty/cplusplus/AST.cpp:51
      #25 0x00007f44b36c688d in CPlusPlus::ASTPath::operator() (this=0x7fff2ce403a0, line=1029, column=11) at ASTPath.cpp:50
      #26 0x00007f44b0dd596c in findDeclOrDef (doc=..., line=1029, column=11, parent=0x7fff2ce40440, decl=0x7fff2ce40450, 
          funcDecl=0x7fff2ce40448) at cppfunctiondecldeflink.cpp:93
      #27 0x00007f44b0dd658c in CppEditor::Internal::FunctionDeclDefLinkFinder::startFindLinkAt (this=0x4ab0780, cursor=..., doc=..., 
          snapshot=...) at cppfunctiondecldeflink.cpp:220
      #28 0x00007f44b0db94a3 in CppEditor::Internal::CPPEditorWidget::updateFunctionDeclDefLinkNow (this=0x4db6480) at cppeditor.cpp:1047
      #29 0x00007f44b0e5e10c in CppEditor::Internal::CPPEditorWidget::qt_static_metacall (_o=0x4db6480, _c=QMetaObject::InvokeMetaMethod, 
          _id=17, _a=0x7fff2ce40640) at .moc/debug-shared/moc_cppeditor.cpp:184
      #30 0x00007f44c068f949 in QMetaObject::activate (sender=0x3b22570, m=0x7f44c0a2da20 <QTimer::staticMetaObject>, local_signal_index=0, 
          argv=0x0) at kernel/qobject.cpp:3539
      #31 0x00007f44c06f099b in QTimer::timeout (this=0x3b22570) at .moc/debug-shared/moc_qtimer.cpp:147
      #32 0x00007f44c0698e2b in QTimer::timerEvent (this=0x3b22570, e=0x7fff2ce40d10) at kernel/qtimer.cpp:280
      #33 0x00007f44c068a294 in QObject::event (this=0x3b22570, e=0x7fff2ce40d10) at kernel/qobject.cpp:1156
      #34 0x00007f44c0ffd54a in QApplicationPrivate::notify_helper (this=0x1e059e0, receiver=0x3b22570, e=0x7fff2ce40d10)
          at kernel/qapplication.cpp:4562
      #35 0x00007f44c0ffa95d in QApplication::notify (this=0x7fff2ce416a0, receiver=0x3b22570, e=0x7fff2ce40d10)
          at kernel/qapplication.cpp:3944
      #36 0x00007f44c0670f77 in QCoreApplication::notifyInternal (this=0x7fff2ce416a0, receiver=0x3b22570, event=0x7fff2ce40d10)
          at kernel/qcoreapplication.cpp:953
      #37 0x00007f44c0fedf95 in QCoreApplication::sendEvent (receiver=0x3b22570, event=0x7fff2ce40d10)
          at ../../include/QtCore/../../src/corelib/kernel/qcoreapplication.h:231
      #38 0x00007f44c06b0573 in QTimerInfoList::activateTimers (this=0x1e08260) at kernel/qeventdispatcher_unix.cpp:621
      #39 0x00007f44c06ac879 in timerSourceDispatch (source=0x1e08200) at kernel/qeventdispatcher_glib.cpp:186
      #40 0x00007f44c06ac960 in idleTimerSourceDispatch (source=0x1e082b0) at kernel/qeventdispatcher_glib.cpp:233
      #41 0x00007f44bf135e04 in g_main_context_dispatch () from /lib/x86_64-linux-gnu/libglib-2.0.so.0
      #42 0x00007f44bf136048 in ?? () from /lib/x86_64-linux-gnu/libglib-2.0.so.0
      #43 0x00007f44bf1360ec in g_main_context_iteration () from /lib/x86_64-linux-gnu/libglib-2.0.so.0
      #44 0x00007f44c06ad309 in QEventDispatcherGlib::processEvents (this=0x1e06cf0, flags=...) at kernel/qeventdispatcher_glib.cpp:425
      #45 0x00007f44c10d6d9a in QGuiEventDispatcherGlib::processEvents (this=0x1e06cf0, flags=...)
          at kernel/qguieventdispatcher_glib.cpp:204
      #46 0x00007f44c066e265 in QEventLoop::processEvents (this=0x7fff2ce41040, flags=...) at kernel/qeventloop.cpp:149
      #47 0x00007f44c066e3f8 in QEventLoop::exec (this=0x7fff2ce41040, flags=...) at kernel/qeventloop.cpp:204
      #48 0x00007f44c067160a in QCoreApplication::exec () at kernel/qcoreapplication.cpp:1225
      #49 0x00007f44c0ffa544 in QApplication::exec () at kernel/qapplication.cpp:3823
      

      Attachments

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

        Activity

          People

            kosjar Nikolai Kosjar
            hjk hjk
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes