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

QtCreator 4.15.2 sometimes crashes when refactor->create setter/getter is used

    XMLWordPrintable

Details

    • Bug
    • Resolution: Done
    • Not Evaluated
    • Qt Creator 5.0.0-beta1
    • Qt Creator 4.15.2
    • Editors
    • None
    • Debian Linux
    • Linux/X11

    Description

      After having used refactor in a few .h files to create setter/getters in both .h (declarations) and .cpp (definitions) one particular file's member variable consistently crashes qtcreator. Sorry that I can't include the source code to reproduce the problem ATM; I'll try to create a minimal test case and unload non-default plugins.  Running under gdb produced the following:

      Thread 1 "qtcreator" received signal SIGSEGV, Segmentation fault.
      0x00007fffe357ea79 in std::Hashtable<CPlusPlus::Name const*, std::pair<CPlusPlus::Name const* const, CPlusPlus::ClassOrNamespace*>, std::allocator<std::pair<CPlusPlus::Name const* const, CPlusPlus::ClassOrNamespace*> >, std::detail::_Select1st, CPlusPlus::Name::Equals, CPlusPlus::Name::Hash, std::detail::_Mod_range_hashing, std::detail::_Default_ranged_hash, std::detail::_Prime_rehash_policy, std::_detail::_Hashtable_traits<true, false, true> >::_M_find_before_node (this=this@entry=0x2d7fff0, __n=41,
      __k=@0x7fffff7ff118: 0x7fff947beb18, __code=9971158671206323968) at /opt/rh/devtoolset-7/root/usr/include/c++/7/bits/hashtable.h:1535
      1535 /opt/rh/devtoolset-7/root/usr/include/c++/7/bits/hashtable.h: No such file or directory.

      Executing a bt cmd in gdb makes it look like some kind of infinite recursion is going on.

      it prints the following line over and over w/ only the scope field changing

      #13442 0x00007fffde9edce3 in CppEditor::Internal::(anonymous namespace)::GetterSetterRefactoringHelper::<lambda(const CPlusPlus::Name*, CPlusPlus::Scope*, auto:12&)>::operator()<CppEditor::Internal::(anonymous namespace)::GetterSetterRefactoringHelper::isValueType(CPlusPlus::FullySpecifiedType, CPlusPlus::Scope*, bool*)::<lambda(const CPlusPlus::Name*, CPlusPlus::Scope*, auto:12&)> >(const CPlusPlus::Name , CPlusPlus::Scope *, CppEditor::Internal::(anonymous namespace)::GetterSetterRefactoringHelper::<lambda(const CPlusPlus::Name, CPlusPlus::Scope*, auto:12&)> &) (_closure=_closure@entry=0x7fffffffc260, name=name@entry=0x2d80a80, scope=0x7fff9485b820, isValueType=...) at /home/qt/work/build/qt-creator/src/plugins/cppeditor/cppquickfixes.cpp:3585

      Attachments

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

        Activity

          People

            kandeler Christian Kandeler
            bpriest William Priest
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes