Details
-
Bug
-
Resolution: Done
-
P2: Important
-
Qt Creator 4.15.2, Qt Creator 5.0.0-beta1
-
None
-
-
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.