Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Selecting "GammaRay::OverlayWidget" in Widgets tree freezes GammaRay #109

Closed
danvratil opened this issue Feb 5, 2015 · 4 comments
Closed

Comments

@danvratil
Copy link
Contributor

I attached GammaRay to a running process and started inspecting widgets in the "Widgets" tree. I accidentally selected a "GammaRay::OverlayWidget" item in the tree, which GammaRay injected into the widget hierarchy of the inspected application. This caused the inspected application to freeze and use 100% CPU.

Using GammaRay 2.2.1 with Qt 5.

@iamsergio
Copy link
Contributor

Is there any use in showing these ? Maybe they should be hidden

@danvratil
Copy link
Contributor Author

I think they are hidden by default (but I couldn't find the code), except for when a new dialog/window is created at runtime - at least that's my impression from the behaviour: I don't see the GammaRay::OverlayWidget anywhere in the tree when I start the app from GammaRay (or when I attach GammaRay to a running process), but I can see them when I open a dialog and start inspecting it - in this particular case it was KDevelop, and "Assign shortcut" dialog in Documentation toolview.

@milianw
Copy link
Member

milianw commented Apr 30, 2015

reproduced with Qt4 and kwrite. Didn't even have to open any other dialog.

(gdb) bt
#0 0x00007fa11f8b8a5b in QWidget::window() const () from /usr/lib/libQtGui.so.4
#1 0x00007fa11fa992ae in QWidgetPrivate::invalidateBuffer(QRect const&) () from /usr/lib/libQtGui.so.4
#2 0x00007fa11f90f5d9 in QWidgetPrivate::setParent_sys(QWidget_, QFlagsQt::WindowType) () from /usr/lib/libQtGui.so.4
#3 0x00007fa11f8cd2c7 in QWidget::setParent(QWidget_, QFlagsQt::WindowType) () from /usr/lib/libQtGui.so.4
#4 0x00007fa11f8cdfc2 in QWidget::setParent(QWidget_) () from /usr/lib/libQtGui.so.4
#5 0x00007fa08d824178 in GammaRay::OverlayWidget::placeOn(QWidget_) ()
from /ssd/milian/projects/compiled/kde4/lib/gammaray/2.3/qt4.8-x86_64/gammaray_widgetinspector_plugin.so
#6 0x00007fa08d81fc93 in GammaRay::WidgetInspectorServer::widgetSelected(QItemSelection const&) ()
from /ssd/milian/projects/compiled/kde4/lib/gammaray/2.3/qt4.8-x86_64/gammaray_widgetinspector_plugin.so
#7 0x00007fa08d827385 in GammaRay::WidgetInspectorServer::qt_static_metacall(QObject_, QMetaObject::Call, int, void__) ()
from /ssd/milian/projects/compiled/kde4/lib/gammaray/2.3/qt4.8-x86_64/gammaray_widgetinspector_plugin.so
#8 0x00007fa11ec568ac in QMetaObject::activate(QObject_, QMetaObject const_, int, void__) () from /usr/lib/libQtCore.so.4
#9 0x00007fa11fdf63a7 in QItemSelectionModel::selectionChanged(QItemSelection const&, QItemSelection const&) ()
from /usr/lib/libQtGui.so.4
#10 0x00007fa11fdfbcce in QItemSelectionModel::emitSelectionChanged(QItemSelection const&, QItemSelection const&) ()
from /usr/lib/libQtGui.so.4
#11 0x00007fa11fdfc55b in QItemSelectionModel::select(QItemSelection const&, QFlagsQItemSelectionModel::SelectionFlag)
() from /usr/lib/libQtGui.so.4
#12 0x00007fa121a8dfbc in KLinkItemSelectionModel::select(QItemSelection const&, QFlagsQItemSelectionModel::SelectionFlag) () from /ssd/milian/projects/compiled/kde4/lib/libgammaray_common-qt4.8-x86_64.so.2.3.0
#13 0x00007fa11fde7508 in QTreeViewPrivate::select(QModelIndex const&, QModelIndex const&, QFlagsQItemSelectionModel::SelectionFlag) () from /usr/lib/libQtGui.so.4
#14 0x00007fa11fde7e8c in QTreeView::setSelection(QRect const&, QFlagsQItemSelectionModel::SelectionFlag) ()
from /usr/lib/libQtGui.so.4
#15 0x00007fa11fda4373 in QAbstractItemView::mousePressEvent(QMouseEvent_) () from /usr/lib/libQtGui.so.4
#16 0x00007fa11f8cc7e7 in QWidget::event(QEvent_) () from /usr/lib/libQtGui.so.4
#17 0x00007fa11fc8cbce in QFrame::event(QEvent_) () from /usr/lib/libQtGui.so.4
#18 0x00007fa11fdaa473 in QAbstractItemView::viewportEvent(QEvent_) () from /usr/lib/libQtGui.so.4
#19 0x00007fa11fdec810 in QTreeView::viewportEvent(QEvent_) () from /usr/lib/libQtGui.so.4
#20 0x00007fa11ec41ee6 in QCoreApplicationPrivate::sendThroughObjectEventFilters(QObject_, QEvent_) ()
from /usr/lib/libQtCore.so.4
#21 0x00007fa11f8789dc in QApplicationPrivate::notify_helper(QObject_, QEvent_) () from /usr/lib/libQtGui.so.4
#22 0x00007fa11f87f5bf in QApplication::notify(QObject_, QEvent_) () from /usr/lib/libQtGui.so.4
#23 0x00007fa12084882a in KApplication::notify(QObject_, QEvent_) () from /usr/lib/libkdeui.so.5
#24 0x00007fa11ec41d7d in QCoreApplication::notifyInternal(QObject_, QEvent_) () from /usr/lib/libQtCore.so.4
#25 0x00007fa11f87ec1f in QApplicationPrivate::sendMouseEvent(QWidget_, QMouseEvent_, QWidget_, QWidget_, QWidget*_, QPoint---Type to continue, or q to quit---
er&, bool) () from /usr/lib/libQtGui.so.4
#26 0x00007fa11f8f5712 in ?? () from /usr/lib/libQtGui.so.4
#27 0x00007fa11f8f410c in QApplication::x11ProcessEvent(XEvent) () from /usr/lib/libQtGui.so.4
#28 0x00007fa11f91c262 in ?? () from /usr/lib/libQtGui.so.4
#29 0x00007fa11acc19fd in g_main_context_dispatch () from /usr/lib/libglib-2.0.so.0
#30 0x00007fa11acc1ce0 in ?? () from /usr/lib/libglib-2.0.so.0
#31 0x00007fa11acc1d8c in g_main_context_iteration () from /usr/lib/libglib-2.0.so.0
#32 0x00007fa11ec70e8d in QEventDispatcherGlib::processEvents(QFlagsQEventLoop::ProcessEventsFlag) ()
from /usr/lib/libQtCore.so.4
#33 0x00007fa11f91c326 in ?? () from /usr/lib/libQtGui.so.4
#34 0x00007fa11ec408d1 in QEventLoop::processEvents(QFlagsQEventLoop::ProcessEventsFlag) () from /usr/lib/libQtCore.so.4
#35 0x00007fa11ec40c35 in QEventLoop::exec(QFlagsQEventLoop::ProcessEventsFlag) () from /usr/lib/libQtCore.so.4
#36 0x00007fa11ec461d9 in QCoreApplication::exec() () from /usr/lib/libQtCore.so.4
#37 0x00007fa121b65808 in kdemain (argc=1, argv=0x7ffde72224b8)
at /ssd/milian/projects/kde4/kate/kwrite/kwritemain.cpp:739
#38 0x00007fa11da74800 in __libc_start_main () from /usr/lib/libc.so.6
#39 0x00000000004007ce in _start ()

milianw added a commit to milianw/GammaRay that referenced this issue Apr 30, 2015
vkrause added a commit that referenced this issue Jun 16, 2015
Otherwise we end up in an infinite loop as described in issue #109.
@vkrause
Copy link
Contributor

vkrause commented Jul 2, 2015

cedf07c and 048b384 should fix this.

@vkrause vkrause closed this as completed Jul 2, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants