KDAB / GammaRay

GammaRay is a tool to poke around in a Qt-application and also to manipulate the application to some extent.
https://www.kdab.com/gammaray
Other
1.59k stars 279 forks source link

Object/Widget inspector Search Bar doesn't Select anything in Large Applications #842

Open psacawa opened 11 months ago

psacawa commented 11 months ago

Thanks for your work on this invaluable inspection tool.

When inspecting widgets on large applications, e.g. wireshark, the search bar in the object inspector and widget inspector do not work. It you enter a filter there, the QTreeView will just show all the widgets in the whole application, irrespective of the query.

In smaller applications, this functionality works fine. But it's in large applications where it's actually necessary. I guess the issue is an operation timed out in the search bar. I can see in the source ui/searchlinecontroller.cpp there are QTimers used, but I can't investigate further because gammaray can't inspect itself.

I observed the regression with:

GammaRay version 2.99.50 (revision: 8f2dfd4eb)
Copyright (C) 2010-2023 Klaralvdalens Datakonsult AB, a KDAB Group company, info@kdab.com
Protocol version 38
Broadcast version 2

Using probe qt5_15-x86_64 (Qt 5.15 (x86_64)) on Ubuntu 22.10 to probe wireshark.

I did not observe the regression with:

GammaRay version 2.11.3
Copyright (C) 2010-2021 Klaralvdalens Datakonsult AB, a KDAB Group company, info@kdab.com
Protocol version 36
Broadcast version 2

using the same probe on the same client.

psacawa commented 11 months ago

I could also get rid of the issue by rebuild wireshark with Qt6.3, so the issue may be only with Qt5

Waqar144 commented 10 months ago

In the latest version (3.0) the filter tries to search + expand the tree, perhaps something is broken there.

mattkdab commented 7 months ago

@Waqar144 I've been looking into this today. I think the issue may have something to do with the delayedExpandTimer, as I was able to change the behavior but not fully resolve by lengthening the time interval. However, building both GammaRay and Wireshark against Qt 6.6 without making changes to GR sources also resolves this, which is kind of weird. I'm going to take a closer look at the onSearchFinished and tree expansion algorithms this weekend.