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

Completion of private class structure crashing Creator (OSX)

    XMLWordPrintable

Details

    • Bug
    • Resolution: Done
    • P2: Important
    • Qt Creator 1.3.0
    • Qt Creator 1.3.0 rc1
    • Editors
    • None
    • e2925540675b3c723f46f4f6a21a0cbf3dff26ad

    Description

      While the completion crashes are rarer than they used to be, Creator will still occasionally crash when attempting to complete certain items (trashing the session if it was not saved, of course). Internal/private struct members are very prone to this.

      Eg:

      .hpp file

      #ifndef MYCLASS_HPP
      #define MYCLASS_HPP
      class MyClass
      {
      struct PImpl;
      PImpl *m_pimpl;
      public:
      MyClass(); 
      ~MyClass();
      };
      
      #endif // MYCLASS_HPP
      

      .cpp file

      #include "MyClass.hpp"
      #include <vector>
      struct MyClass::PImpl
      {
      std::vector<int> data;
      };
      MyClass::MyClass()
      :
      m_pimpl(new PImpl)
      {
      //// try to access m_pimpl using completion here
      //// m_pimpl->data CRASH
      }
      MyClass::~MyClass()
      {
      delete m_pimpl;
      }
      

      OSX crash report attached.

      Attachments

        1. crash-report.txt
          38 kB
        2. CrashTest.zip
          2 kB
        No reviews matched the request. Check your Options in the drop-down menu of this sections header.

        Activity

          People

            raggi Roberto Raggi
            danny77uk Daniel
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes