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

QtCreator crashes while following a symbol

    XMLWordPrintable

Details

    • Linux/X11
    • 2e7891bedd768f9fde65fb4584167ee1dadf44ed (qt-creator/qt-creator/5.0)

    Description

      In short, when I press F2 (follow the symbol) on PostDelayedTask, QtCreator crashes.

      It seems that it happens due to an infinite recursion in function `TypeHierarchyBuilder::followTypedef`. The function tries to "follow" this:
      ```
      File1 (chromium/src/components/cronet/native/upload_data_sink.h):
      class Cronet_UploadDataSinkImpl : public Cronet_UploadDataSink {
      ...

      File2 (chromium/src/components/cronet/native/generated/cronet.idl_c.h):

      // Forward declare interfaces.

      typedef struct Cronet_UploadDataSink Cronet_UploadDataSink;
      ```

       

      Below is more info about why I think so.

      So, after I realised that the last 20-30 stack frames in gdb are `TypeHierarchyBuilder::followTypedef`, I added a bunch of qDebug() in all functions in the file `cpptools/typehierarchybuilder.cpp`. Here is my diff. And here is what I have got:

      ```
      TypeHierarchyBuilder::followTypedef: enclosingScope: "0 0 /home/dimanne/devel/chromium/src/components/webdata/common/web_database_service.cc" symbolName: "Delegate"
      DerivedHierarchyVisitor::execute: doc: "/home/dimanne/devel/chromium/src/media/capture/video/create_video_capture_device_factory.h"
      DerivedHierarchyVisitor::execute: doc: "/home/dimanne/devel/chromium/src/components/cronet/native/upload_data_sink.h"
      DerivedHierarchyVisitor::visit: symbol: "11 25 /home/dimanne/devel/chromium/src/components/cronet/native/upload_data_sink.h"
      TypeHierarchyBuilder::followTypedef: enclosingScope: "2 18 /home/dimanne/devel/chromium/src/components/cronet/native/upload_data_sink.h" symbolName: "Cronet_UploadDataSink"
      TypeHierarchyBuilder::followTypedef: enclosingScope: "0 0 /home/dimanne/devel/chromium/src/components/cronet/native/generated/cronet.idl_c.h" symbolName: "Cronet_UploadDataSink"
      TypeHierarchyBuilder::followTypedef: enclosingScope: "0 0 /home/dimanne/devel/chromium/src/components/cronet/native/generated/cronet.idl_c.h" symbolName: "Cronet_UploadDataSink"

      (the last line repeats ~40000 times)
      ```

      So, it looks like this is the culprit.

      Attachments

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

        Activity

          People

            kandeler Christian Kandeler
            dimanne DimanNe
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes