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

segfault on dialog "cancel" after calling QSpinBox.setValue() from GammaRay #9

Closed
ydirson opened this issue Jan 26, 2012 · 4 comments
Closed

Comments

@ydirson
Copy link

ydirson commented Jan 26, 2012

Seen with 1.1.0, built on a Debian testing upgraded today before building gammaray.

The app to look at though gammaray is https://alioth.debian.org/projects/omaha/, at commit
http://anonscm.debian.org/gitweb/?p=omaha/omaha.git;a=commit;h=30ef5e94c98ccd18ccd2eae9dd5cbd2d420d053b

To reproduce:

  • launch ./scripts/omaha --toolkit Qt4
  • attach gammaray
  • select "Checkers", and menu Main/Play

From gammaray:

  • browse widgets until finding the "Board Size" QSpinBox in the QDialog
  • call setValue(10) on it

Hit cancel in the dialog:
=> omaha terminates with "Segmentation fault"

Gammaray cannot attach if python is run under gdb, and a corefile does not get properly decoded by gdb. Any hint to get more precise info ?

@aholza
Copy link
Member

aholza commented Jan 26, 2012

Can you try startup method?

  • launch gammaray ./scripts/omaha --toolkit Qt4

Gammaray uses gdb to attach to a application, so thats why it cannot be easily used. There is a code hack to get it workiing with gdb, but this needs an answer from a linux expert. But when you use the startup method, you can use gdb.

@milianw
Copy link
Member

milianw commented Jan 26, 2012

I have no idea whether this work with python scripts, but you could try this (on linux at least):

GAMMARAY_GDB=1 gammaray ./scripts/omaha --toolkit Qt4

this should start the latter in GDB and should give the opportunity to get a proper backtrace etc.

@ydirson
Copy link
Author

ydirson commented Jan 26, 2012

On Thu, Jan 26, 2012 at 01:39:40PM -0800, Milian Wolff wrote:

I have no idea whether this work with python scripts, but you could try this (on linux at least):

GAMMARAY_GDB=1 gammaray ./scripts/omaha --toolkit Qt4

this should start the latter in GDB and should give the opportunity to get a proper backtrace etc.

Great!

GAMMARAY_GDB=1 .../gammaray python ./scripts/omaha --toolkit Qt4

Here it is, hope this helps:

#0 0x00007ffff5404040 in QLayout::parentWidget() const () from /usr/lib/libQtGui.so.4
#1 0x00007ffff7afdbf1 in GammaRay::WidgetTreeModel::data (this=0xfbc910, index=..., role=9) at /work/yann/softs/GammaRay/tools/widgetinspector/widgettreemodel.cpp:45
#2 0x00007ffff59632fc in QSortFilterProxyModel::data(QModelIndex const&, int) const () from /usr/lib/libQtGui.so.4
#3 0x00007ffff5985817 in QStyledItemDelegate::initStyleOption(QStyleOptionViewItem_, QModelIndex const&) const () from /usr/lib/libQtGui.so.4
#4 0x00007ffff5986dc6 in QStyledItemDelegate::sizeHint(QStyleOptionViewItem const&, QModelIndex const&) const () from /usr/lib/libQtGui.so.4
#5 0x00007ffff591c64b in QTreeView::indexRowSizeHint(QModelIndex const&) const () from /usr/lib/libQtGui.so.4
#6 0x00007ffff591feb9 in QTreeViewPrivate::itemHeight(int) const () from /usr/lib/libQtGui.so.4
#7 0x00007ffff5920153 in QTreeViewPrivate::updateScrollBars() () from /usr/lib/libQtGui.so.4
#8 0x00007ffff592050f in QTreeView::updateGeometries() () from /usr/lib/libQtGui.so.4
#9 0x00007ffff58df8f9 in QAbstractItemView::doItemsLayout() () from /usr/lib/libQtGui.so.4
#10 0x00007ffff5927844 in QTreeView::doItemsLayout() () from /usr/lib/libQtGui.so.4
#11 0x00007ffff59201e4 in QTreeViewPrivate::updateScrollBars() () from /usr/lib/libQtGui.so.4
#12 0x00007ffff592a5ce in QTreeView::scrollTo(QModelIndex const&, QAbstractItemView::ScrollHint) () from /usr/lib/libQtGui.so.4
#13 0x00007ffff58e8b72 in QAbstractItemView::currentChanged(QModelIndex const&, QModelIndex const&) () from /usr/lib/libQtGui.so.4
#14 0x00007ffff591d691 in QTreeView::currentChanged(QModelIndex const&, QModelIndex const&) () from /usr/lib/libQtGui.so.4
#15 0x00007ffff58e42a3 in QAbstractItemView::qt_metacall(QMetaObject::Call, int, void__) () from /usr/lib/libQtGui.so.4
#16 0x00007ffff592ae05 in QTreeView::qt_metacall(QMetaObject::Call, int, void__) () from /usr/lib/libQtGui.so.4
#17 0x00007ffff601beba in QMetaObject::activate(QObject_, QMetaObject const_, int, void__) () from /usr/lib/libQtCore.so.4
#18 0x00007ffff593434a in QItemSelectionModel::currentChanged(QModelIndex const&, QModelIndex const&) () from /usr/lib/libQtGui.so.4
#19 0x00007ffff5934440 in QItemSelectionModel::setCurrentIndex(QModelIndex const&, QFlagsQItemSelectionModel::SelectionFlag) () from /usr/lib/libQtGui.so.4
#20 0x00007ffff58dd29e in QAbstractItemView::setCurrentIndex(QModelIndex const&) () from /usr/lib/libQtGui.so.4
#21 0x00007ffff58e9928 in QAbstractItemView::rowsAboutToBeRemoved(QModelIndex const&, int, int) () from /usr/lib/libQtGui.so.4
#22 0x00007ffff5922f0f in QTreeView::rowsAboutToBeRemoved(QModelIndex const&, int, int) () from /usr/lib/libQtGui.so.4
#23 0x00007ffff58e426f in QAbstractItemView::qt_metacall(QMetaObject::Call, int, void__) () from /usr/lib/libQtGui.so.4
#24 0x00007ffff592ae05 in QTreeView::qt_metacall(QMetaObject::Call, int, void__) () from /usr/lib/libQtGui.so.4
#25 0x00007ffff601beba in QMetaObject::activate(QObject_, QMetaObject const_, int, void__) () from /usr/lib/libQtCore.so.4
#26 0x00007ffff6064834 in QAbstractItemModel::rowsAboutToBeRemoved(QModelIndex const&, int, int) () from /usr/lib/libQtCore.so.4
#27 0x00007ffff60037e8 in QAbstractItemModel::beginRemoveRows(QModelIndex const&, int, int) () from /usr/lib/libQtCore.so.4
#28 0x00007ffff596528d in QSortFilterProxyModelPrivate::remove_proxy_interval(QVector&, QVector&, int, int, QModelIndex const&, Qt::Orientation, bool) ()
from /usr/lib/libQtGui.so.4
#29 0x00007ffff5969d3a in QSortFilterProxyModelPrivate::remove_source_items(QVector&, QVector&, QVector const&, QModelIndex const&, Qt::Orientation, bool) ()
from /usr/lib/libQtGui.so.4
#30 0x00007ffff596b704 in QSortFilterProxyModelPrivate::source_items_about_to_be_removed(QModelIndex const&, int, int, Qt::Orientation) () from /usr/lib/libQtGui.so.4
#31 0x00007ffff596b9ec in QSortFilterProxyModel::qt_metacall(QMetaObject::Call, int, void__) () from /usr/lib/libQtGui.so.4
#32 0x00007ffff7b0433b in KRecursiveFilterProxyModel::qt_metacall (this=0xf9f630, c=QMetaObject::InvokeMetaMethod, id=38, a=0x7fffffff9ca0)
at /work/yann/softs/GammaRay/build/krecursivefilterproxymodel.moc:78
#33 0x00007ffff6010510 in QMetaMethod::invoke(QObject
, Qt::ConnectionType, QGenericReturnArgument, QGenericArgument, QGenericArgument, QGenericArgument, QGenericArgument, QGenericArgument, QGenericArgument, QGenericArgument, QGenericArgument, QGenericArgument, QGenericArgument) const () from /usr/lib/libQtCore.so.4
#34 0x00007ffff60126d0 in QMetaObject::invokeMethod(QObject
, char const
, Qt::ConnectionType, QGenericReturnArgument, QGenericArgument, QGenericArgument, QGenericArgument, QGenericArgument, QGenericArgument, QGenericArgument, QGenericArgument, QGenericArgument, QGenericArgument, QGenericArgument) () from /usr/lib/libQtCore.so.4
#35 0x00007ffff7aa3067 in QMetaObject::invokeMethod (obj=0xf9f630, member=0x7ffff7b2ada4 "_q_sourceRowsAboutToBeRemoved", type=Qt::DirectConnection, val0=..., val1=..., val2=...,
val3=..., val4=..., val5=..., val6=..., val7=..., val8=..., val9=...) at /usr/include/qt4/QtCore/qobjectdefs.h:410
#36 0x00007ffff7b0527b in KRecursiveFilterProxyModelPrivate::invokeRowsAboutToBeRemoved (this=0xfbc8f0, source_parent=..., start=0, end=0)
at /work/yann/softs/GammaRay/3rdparty/kde/krecursivefilterproxymodel.cpp:99
#37 0x00007ffff7b036dc in KRecursiveFilterProxyModelPrivate::sourceRowsAboutToBeRemoved (this=0xfbc8f0, source_parent=..., start=0, end=0)
at /work/yann/softs/GammaRay/3rdparty/kde/krecursivefilterproxymodel.cpp:220
#38 0x00007ffff7b0448f in KRecursiveFilterProxyModel::qt_metacall (this=0xf9f630, _c=QMetaObject::InvokeMetaMethod, id=3, a=0x7fffffffa510)
at /work/yann/softs/GammaRay/build/krecursivefilterproxymodel.moc:86
#39 0x00007ffff601beba in QMetaObject::activate(QObject
, QMetaObject const
, int, void**) () from /usr/lib/libQtCore.so.4
#40 0x00007ffff6064834 in QAbstractItemModel::rowsAboutToBeRemoved(QModelIndex const&, int, int) () from /usr/lib/libQtCore.so.4
#41 0x00007ffff60037e8 in QAbstractItemModel::beginRemoveRows(QModelIndex const&, int, int) () from /usr/lib/libQtCore.so.4
#42 0x00007ffff596528d in QSortFilterProxyModelPrivate::remove_proxy_interval(QVector&, QVector&, int, int, QModelIndex const&, Qt::Orientation, bool) ()
from /usr/lib/libQtGui.so.4
#43 0x00007ffff5969d3a in QSortFilterProxyModelPrivate::remove_source_items(QVector&, QVector&, QVector const&, QModelIndex const&, Qt::Orientation, bool) ()
from /usr/lib/libQtGui.so.4
#44 0x00007ffff596b704 in QSortFilterProxyModelPrivate::source_items_about_to_be_removed(QModelIndex const&, int, int, Qt::Orientation) () from /usr/lib/libQtGui.so.4
#45 0x00007ffff596b9ec in QSortFilterProxyModel::qt_metacall(QMetaObject::Call, int, void**) () from /usr/lib/libQtGui.so.4
#46 0x00007ffff7afddbe in GammaRay::WidgetTreeModel::qt_metacall (this=0xfbc910, _c=QMetaObject::InvokeMetaMethod, id=38, a=0x7fffffffa850)
at /work/yann/softs/GammaRay/build/widgettreemodel.moc:64
#47 0x00007ffff601beba in QMetaObject::activate(QObject
, QMetaObject const
, int, void**) () from /usr/lib/libQtCore.so.4
#48 0x00007ffff6064834 in QAbstractItemModel::rowsAboutToBeRemoved(QModelIndex const&, int, int) () from /usr/lib/libQtCore.so.4
#49 0x00007ffff60037e8 in QAbstractItemModel::beginRemoveRows(QModelIndex const&, int, int) () from /usr/lib/libQtCore.so.4
#50 0x00007ffff7ab4dd7 in GammaRay::ObjectTreeModel::objectRemoved (this=0xde2750, obj=0xf95550) at /work/yann/softs/GammaRay/objecttreemodel.cpp:129
#51 0x00007ffff7ab5577 in GammaRay::ObjectTreeModel::qt_metacall (this=0xde2750, _c=QMetaObject::InvokeMetaMethod, id=1, a=0x7fffffffaa30)
at /work/yann/softs/GammaRay/build/objecttreemodel.moc:77
#52 0x00007ffff601beba in QMetaObject::activate(QObject
, QMetaObject const
, int, void**) () from /usr/lib/libQtCore.so.4
#53 0x00007ffff7aa2def in GammaRay::Probe::objectDestroyed (this=0xdec210, _t1=0xf95550) at /work/yann/softs/GammaRay/build/probe.moc:179
#54 0x00007ffff7aa1c33 in GammaRay::Probe::objectRemoved (obj=0xf95550) at /work/yann/softs/GammaRay/probe.cpp:481
#55 0x00007ffff7aa2721 in qt_removeObject (obj=0xf95550) at /work/yann/softs/GammaRay/probe.cpp:665
#56 0x00007ffff6020323 in QObject::~QObject() () from /usr/lib/libQtCore.so.4
#57 0x00007ffff54267c1 in QWidget::~QWidget() () from /usr/lib/libQtGui.so.4
#58 0x00007ffff0cb8c51 in ?? () from /usr/lib/python2.7/dist-packages/PyQt4/QtGui.so
#59 0x00007ffff601ad75 in QObjectPrivate::deleteChildren() () from /usr/lib/libQtCore.so.4
#60 0x00007ffff5426733 in QWidget::~QWidget() () from /usr/lib/libQtGui.so.4
#61 0x00007ffff0de49cd in ?? () from /usr/lib/python2.7/dist-packages/PyQt4/QtGui.so
#62 0x00007ffff601ad75 in QObjectPrivate::deleteChildren() () from /usr/lib/libQtCore.so.4
#63 0x00007ffff5426733 in QWidget::~QWidget() () from /usr/lib/libQtGui.so.4
#64 0x00007ffff0eba845 in ?? () from /usr/lib/python2.7/dist-packages/PyQt4/QtGui.so
#65 0x00007ffff0eb1eb2 in ?? () from /usr/lib/python2.7/dist-packages/PyQt4/QtGui.so
#66 0x00007ffff133c534 in ?? () from /usr/lib/python2.7/dist-packages/sip.so
#67 0x00007ffff133cd39 in ?? () from /usr/lib/python2.7/dist-packages/sip.so
#68 0x0000000000480b2b in subtype_dealloc (self=<QDialog at remote 0x7ffff08e3560>) at ../Objects/typeobject.c:1014
#69 0x00000000004b96ab in PyEval_EvalFrameEx (f=, throwflag=) at ../Python/ceval.c:1137
#70 0x00000000004b9d77 in fast_function (nk=, na=, n=, pp_stack=0x7fffffffaff0, func=<function at remote 0x7ffff1a06500>)
at ../Python/ceval.c:4107
#71 call_function (oparg=, pp_stack=0x7fffffffaff0) at ../Python/ceval.c:4042
#72 PyEval_EvalFrameEx (f=, throwflag=) at ../Python/ceval.c:2666
#73 0x00000000004bfccd in PyEval_EvalCodeEx (co=0x7ffff19e2630, globals=, locals=, args=, argcount=, kws=,
kwcount=5, defs=0x7ffff19fd9a8, defcount=1, closure=0x0) at ../Python/ceval.c:3253
#74 0x000000000044b658 in function_call (func=, arg=
(<Qt4Play(canvas=None, _Parametrizable__initial_params={}, game=<Checkers(_Game__moves=<MoveList(_MoveList__current=0, _MoveList__moves=[], _MoveList__game=<...>) at remote 0x7ffff08e7950>, rowcount=None, whose_turn=None, _Parametrizable__initial_params={...}, boardwidth=None, pieces=[], players=None, boardheight=None, board=None, context={'app': <...>, <type at remote 0xa271b0>: <type at remote 0xee24b0>, <type at remote 0xa205f0>: <type at remote 0x104a460>}, phase='setting up', _Game__listeners=[], outcome={}) at remote 0x7ffff08e7990>, tk=<Qt4(_paramwidget_classes={<type at remote 0xa18c10>: <NotImplementedType at remote 0x84a840>, <type at remote 0xa18260>: <NotImplementedType at remote 0x84a840>, <type at remote 0xa17670>: <type at remote 0xbe3c30>, <type at remote 0xa16b70>: <type at remote 0xbe01b0>, <type at remote 0xa167b0>: <NotImplementedType at remote 0x84a840>, <type at remote 0xa195c0>: <type at remote 0xa269f0>}) at remote 0x7ffff0a0a750>, context={'app': <...>, <type at remote 0xa271b0>: <typ...(truncated), kw=
{'gamedesc': <Plugin(_Plugin__path='./plugins/Games/Checkers.desktop', _Plugin__entry=<DesktopEntry(content={'Desktop Entry': {'Comment': 'A checkers plugin (international rules) for Omaha', 'X-Omaha-DefaultRenderer-SquareBoard': 'CheckeredSquareBoard', 'Name': 'Checkers', 'X-Omaha-DefaultRenderer': 'FullscreenPieceDelegating', 'X-Omaha-Package': 'Omaha.Games.Checkers', 'Comment[fr]': 'Un jeu de dames (r\xc3\xa8gles internationales) pour Omaha', 'X-Omaha-ID': 'Checkers', 'Type': 'X-Omaha-Game', 'Name[fr]': 'Dames', 'Categories': '', 'X-Omaha-Class': 'Checkers'}}, defaultGroup='Desktop Entry', tainted=False, filename='./plugins/Games/Checkers.desktop') at remote 0x7ffff08e0cb0>, _Plugin__usable=True, _Plugin__manager=<PluginManager(_PluginManager__directory='./plugins', _PluginManager__plugin_cache={('./plugins/Games/MiniShogi.desktop', 'X-Omaha-Game', True): <Plugin(_Plugin__path='./plugins/Games/MiniShogi.desktop', _Plugin__entry=<DesktopEntry(content={'Desktop Entry': {'Comment': 'A MiniShogi plugin (japane...(truncated)) at ../Objects/funcobject.c:526
#75 0x000000000041d42a in PyObject_Call (func=<function at remote 0x7ffff1a06410>, arg=, kw=) at ../Objects/abstract.c:2529
#76 0x0000000000432d1b in instancemethod_call (func=<function at remote 0x7ffff1a06410>, arg=
(<Qt4Play(canvas=None, _Parametrizable__initial_params={}, game=<Checkers(_Game__moves=<MoveList(_MoveList__current=0, _MoveList__moves=[], _MoveList__game=<...>) at remote 0x7ffff08e7950>, rowcount=None, whose_turn=None, _Parametrizable__initial_params={...}, boardwidth=None, pieces=[], players=None, boardheight=None, board=None, context={'app': <...>, <type at remote 0xa271b0>: <type at remote 0xee24b0>, <type at remote 0xa205f0>: <type at remote 0x104a460>}, phase='setting up', _Game__listeners=[], outcome={}) at remote 0x7ffff08e7990>, tk=<Qt4(_paramwidget_classes={<type at remote 0xa18c10>: <NotImplementedType at remote 0x84a840>, <type at remote 0xa18260>: <NotImplementedType at remote 0x84a840>, <type at remote 0xa17670>: <type at remote 0xbe3c30>, <type at remote 0xa16b70>: <type at remote 0xbe01b0>, <type at remote 0xa167b0>: <NotImplementedType at remote 0x84a840>, <type at remote 0xa195c0>: <type at remote 0xa269f0>}) at remote 0x7ffff0a0a750>, context={'app': <...>, <type at remote 0xa271b0>: <typ...(truncated), kw=
{'gamedesc': <Plugin(_Plugin__path='./plugins/Games/Checkers.desktop', _Plugin__entry=<DesktopEntry(content={'Desktop Entry': {'Comment': 'A checkers plugin (international rules) for Omaha', 'X-Omaha-DefaultRenderer-SquareBoard': 'CheckeredSquareBoard', 'Name': 'Checkers', 'X-Omaha-DefaultRenderer': 'FullscreenPieceDelegating', 'X-Omaha-Package': 'Omaha.Games.Checkers', 'Comment[fr]': 'Un jeu de dames (r\xc3\xa8gles internationales) pour Omaha', 'X-Omaha-ID': 'Checkers', 'Type': 'X-Omaha-Game', 'Name[fr]': 'Dames', 'Categories': '', 'X-Omaha-Class': 'Checkers'}}, defaultGroup='Desktop Entry', tainted=False, filename='./plugins/Games/Checkers.desktop') at remote 0x7ffff08e0cb0>, _Plugin__usable=True, _Plugin__manager=<PluginManager(_PluginManager__directory='./plugins', _PluginManager__plugin_cache={('./plugins/Games/MiniShogi.desktop', 'X-Omaha-Game', True): <Plugin(_Plugin__path='./plugins/Games/MiniShogi.desktop', _Plugin__entry=<DesktopEntry(content={'Desktop Entry': {'Comment': 'A MiniShogi plugin (japane...(truncated)) at ../Objects/classobject.c:2578
#77 0x000000000041d42a in PyObject_Call (func=<instancemethod at remote 0x7ffff7ef7d20>, arg=, kw=) at ../Objects/abstract.c:2529
#78 0x0000000000483aa3 in slot_tp_init (self=, args=(), kwds=
{'gamedesc': <Plugin(_Plugin__path='./plugins/Games/Checkers.desktop', _Plugin__entry=<DesktopEntry(content={'Desktop Entry': {'Comment': 'A checkers plugin (international rules) for Omaha', 'X-Omaha-DefaultRenderer-SquareBoard': 'CheckeredSquareBoard', 'Name': 'Checkers', 'X-Omaha-DefaultRenderer': 'FullscreenPieceDelegating', 'X-Omaha-Package': 'Omaha.Games.Checkers', 'Comment[fr]': 'Un jeu de dames (r\xc3\xa8gles internationales) pour Omaha', 'X-Omaha-ID': 'Checkers', 'Type': 'X-Omaha-Game', 'Name[fr]': 'Dames', 'Categories': '', 'X-Omaha-Class': 'Checkers'}}, defaultGroup='Desktop Entry', tainted=False, filename='./plugins/Games/Checkers.desktop') at remote 0x7ffff08e0cb0>, _Plugin__usable=True, _Plugin__manager=<PluginManager(_PluginManager__directory='./plugins', _PluginManager__plugin_cache={('./plugins/Games/MiniShogi.desktop', 'X-Omaha-Game', True): <Plugin(_Plugin__path='./plugins/Games/MiniShogi.desktop', _Plugin__entry=<DesktopEntry(content={'Desktop Entry': {'Comment': 'A MiniShogi plugin (japane...(truncated)) at ../Objects/typeobject.c:5661
#79 0x000000000047f071 in type_call (type=, args=(), kwds=
{'gamedesc': <Plugin(_Plugin__path='./plugins/Games/Checkers.desktop', _Plugin__entry=<DesktopEntry(content={'Desktop Entry': {'Comment': 'A checkers plugin (international rules) for Omaha', 'X-Omaha-DefaultRenderer-SquareBoard': 'CheckeredSquareBoard', 'Name': 'Checkers', 'X-Omaha-DefaultRenderer': 'FullscreenPieceDelegating', 'X-Omaha-Package': 'Omaha.Games.Checkers', 'Comment[fr]': 'Un jeu de dames (r\xc3\xa8gles internationales) pour Omaha', 'X-Omaha-ID': 'Checkers', 'Type': 'X-Omaha-Game', 'Name[fr]': 'Dames', 'Categories': '', 'X-Omaha-Class': 'Checkers'}}, defaultGroup='Desktop Entry', tainted=False, filename='./plugins/Games/Checkers.desktop') at remote 0x7ffff08e0cb0>, _Plugin__usable=True, _Plugin__manager=<PluginManager(_PluginManager__directory='./plugins', PluginManager__plugin_cache={('./plugins/Games/MiniShogi.desktop', 'X-Omaha-Game', True): <Plugin(Plugin__path='./plugins/Games/MiniShogi.desktop', Plugin__entry=<DesktopEntry(content={'Desktop Entry': {'Comment': 'A MiniShogi plugin (japane...(truncated)) at ../Objects/typeobject.c:737
#80 0x000000000041d42a in PyObject_Call (func=<type at remote 0xee24b0>, arg=, kw=) at ../Objects/abstract.c:2529
#81 0x00000000004bb1db in ext_do_call (nk=4, na=0, flags=, pp_stack=0x7fffffffb5a0, func=<type at remote 0xee24b0>) at ../Python/ceval.c:4334
#82 PyEval_EvalFrameEx (f=, throwflag=) at ../Python/ceval.c:2705
#83 0x00000000004bfccd in PyEval_EvalCodeEx (co=0x7ffff1a09bb0, globals=, locals=, args=, argcount=, kws=,
kwcount=1, defs=0x0, defcount=0, closure=0x0) at ../Python/ceval.c:3253
#84 0x00000000004b9a5b in fast_function (nk=, na=1, n=, pp_stack=0x7fffffffb790, func=<function at remote 0x7ffff0a0fed8>) at ../Python/ceval.c:4117
#85 call_function (oparg=, pp_stack=0x7fffffffb790) at ../Python/ceval.c:4042
#86 PyEval_EvalFrameEx (f=, throwflag=) at ../Python/ceval.c:2666
#87 0x00000000004bfccd in PyEval_EvalCodeEx (co=0x7ffff1a099b0, globals=, locals=, args=, argcount=, kws=,
kwcount=0, defs=0x0, defcount=0, closure=0x0) at ../Python/ceval.c:3253
#88 0x000000000044b49f in function_call (func=<function at remote 0x7ffff0a0fe60>, arg=
(<Launcher(actionQuit=<QAction at remote 0x7ffff19c2dd0>, pluginlist={<QListWidgetItem at remote 0x7ffff08e3200>: <Plugin(Plugin__path='./plugins/Games/Free.desktop', Plugin__entry=<DesktopEntry(content={'Desktop Entry': {'Comment': 'A dummy Omaha game plugin for testing new boards', 'Name': 'Free play', 'X-Omaha-Package': 'Omaha.Games.Free', 'Comment[fr]': 'Un pseudo jeu pour tester de nouveaux plateaux dans Omaha', 'X-Omaha-ID': 'FreeGame', 'Type': 'X-Omaha-Game', 'Name[fr]': 'Jeu libre', 'Categories': '', 'X-Omaha-Class': 'FreeGame'}}, defaultGroup='Desktop Entry', tainted=False, filename='./plugins/Games/Free.desktop') at remote 0x7ffff08e09e0>, Plugin__usable=True, Plugin__manager=<PluginManager(PluginManager__directory='./plugins', PluginManager__plugin_cache={('./plugins/Games/MiniShogi.desktop', 'X-Omaha-Game', True): <Plugin(Plugin__path='./plugins/Games/MiniShogi.desktop', Plugin__entry=<DesktopEntry(content={'Desktop Entry': {'Comment': 'A MiniShogi plugin (japanese chess on 5x5 board) for ...(truncated), kw=0x0) at ../Objects/funcobject.c:526
#89 0x000000000041d42a in PyObject_Call (func=<function at remote 0x7ffff0a0fe60>, arg=, kw=) at ../Objects/abstract.c:2529
#90 0x0000000000432d1b in instancemethod_call (func=<function at remote 0x7ffff0a0fe60>, arg=
(<Launcher(actionQuit=<QAction at remote 0x7ffff19c2dd0>, pluginlist={<QListWidgetItem at remote 0x7ffff08e3200>: <Plugin(Plugin__path='./plugins/Games/Free.desktop', Plugin__entry=<DesktopEntry(content={'Desktop Entry': {'Comment': 'A dummy Omaha game plugin for testing new boards', 'Name': 'Free play', 'X-Omaha-Package': 'Omaha.Games.Free', 'Comment[fr]': 'Un pseudo jeu pour tester de nouveaux plateaux dans Omaha', 'X-Omaha-ID': 'FreeGame', 'Type': 'X-Omaha-Game', 'Name[fr]': 'Jeu libre', 'Categories': '', 'X-Omaha-Class': 'FreeGame'}}, defaultGroup='Desktop Entry', tainted=False, filename='./plugins/Games/Free.desktop') at remote 0x7ffff08e09e0>, Plugin__usable=True, Plugin__manager=<PluginManager(PluginManager__directory='./plugins', PluginManager__plugin_cache={('./plugins/Games/MiniShogi.desktop', 'X-Omaha-Game', True): <Plugin(Plugin__path='./plugins/Games/MiniShogi.desktop', Plugin__entry=<DesktopEntry(content={'Desktop Entry': {'Comment': 'A MiniShogi plugin (japanese chess on 5x5 board) for ...(truncated), kw=0x0) at ../Objects/classobject.c:2578
#91 0x000000000041d42a in PyObject_Call (func=<instancemethod at remote 0x7ffff7f656e0>, arg=, kw=) at ../Objects/abstract.c:2529
#92 0x00000000004b8da6 in PyEval_CallObjectWithKeywords (func=<instancemethod at remote 0x7ffff7f656e0>, arg=(False,), kw=) at ../Python/ceval.c:3890
#93 0x00007ffff13474e0 in sip_api_invoke_slot () from /usr/lib/python2.7/dist-packages/sip.so
#94 0x00007ffff16c8536 in ?? () from /usr/lib/python2.7/dist-packages/PyQt4/QtCore.so
#95 0x00007ffff16c8830 in ?? () from /usr/lib/python2.7/dist-packages/PyQt4/QtCore.so
#96 0x00007ffff16c8912 in ?? () from /usr/lib/python2.7/dist-packages/PyQt4/QtCore.so
#97 0x00007ffff601beba in QMetaObject::activate(QObject
, QMetaObject const
, int, void**) () from /usr/lib/libQtCore.so.4
#98 0x00007ffff53d4652 in QAction::triggered(bool) () from /usr/lib/libQtGui.so.4
#99 0x00007ffff53d483f in QAction::activate(QAction::ActionEvent) () from /usr/lib/libQtGui.so.4
#100 0x00007ffff580a539 in QMenuPrivate::activateCausedStack(QList<QPointer > const&, QAction
, QAction::ActionEvent, bool) () from /usr/lib/libQtGui.so.4
#101 0x00007ffff5810172 in QMenuPrivate::activateAction(QAction
, QAction::ActionEvent, bool) () from /usr/lib/libQtGui.so.4
#102 0x00007ffff0d78c41 in ?? () from /usr/lib/python2.7/dist-packages/PyQt4/QtGui.so
#103 0x00007ffff542b346 in QWidget::event(QEvent
) () from /usr/lib/libQtGui.so.4
#104 0x00007ffff58116db in QMenu::event(QEvent
) () from /usr/lib/libQtGui.so.4
#105 0x00007ffff0d7c861 in ?? () from /usr/lib/python2.7/dist-packages/PyQt4/QtGui.so
#106 0x00007ffff53dac64 in QApplicationPrivate::notify_helper(QObject
, QEvent
) () from /usr/lib/libQtGui.so.4
#107 0x00007ffff53e03eb in QApplication::notify(QObject, QEvent) () from /usr/lib/libQtGui.so.4
#108 0x00007ffff0ec4695 in ?? () from /usr/lib/python2.7/dist-packages/PyQt4/QtGui.so
#109 0x00007ffff600928c in QCoreApplication::notifyInternal(QObject, QEvent) () from /usr/lib/libQtCore.so.4
#110 0x00007ffff53dbc32 in QApplicationPrivate::sendMouseEvent(QWidget, QMouseEvent, QWidget, QWidget, QWidget**, QPointer&, bool) () from /usr/lib/libQtGui.so.4
#111 0x00007ffff5458794 in QETWidget::translateMouseEvent(XEvent const) () from /usr/lib/libQtGui.so.4
#112 0x00007ffff5456f1a in QApplication::x11ProcessEvent(XEvent) () from /usr/lib/libQtGui.so.4
#113 0x00007ffff547f252 in x11EventSourceDispatch(GSource, int ()(void), void) () from /usr/lib/libQtGui.so.4
#114 0x00007ffff483c0cf in g_main_dispatch (context=0xa25c70) at /tmp/buildd/glib2.0-2.30.2/./glib/gmain.c:2442
#115 g_main_context_dispatch (context=0xa25c70) at /tmp/buildd/glib2.0-2.30.2/./glib/gmain.c:2998
#116 0x00007ffff483c8c8 in g_main_context_iterate (context=0xa25c70, block=, dispatch=1, self=) at /tmp/buildd/glib2.0-2.30.2/./glib/gmain.c:3076
#117 0x00007ffff483ca99 in g_main_context_iteration (context=0xa25c70, may_block=1) at /tmp/buildd/glib2.0-2.30.2/./glib/gmain.c:3139
#118 0x00007ffff6033e2f in QEventDispatcherGlib::processEvents(QFlagsQEventLoop::ProcessEventsFlag) () from /usr/lib/libQtCore.so.4
#119 0x00007ffff547eeee in QGuiEventDispatcherGlib::processEvents(QFlagsQEventLoop::ProcessEventsFlag) () from /usr/lib/libQtGui.so.4
#120 0x00007ffff6008492 in QEventLoop::processEvents(QFlagsQEventLoop::ProcessEventsFlag) () from /usr/lib/libQtCore.so.4
#121 0x00007ffff600868f in QEventLoop::exec(QFlagsQEventLoop::ProcessEventsFlag) () from /usr/lib/libQtCore.so.4
#122 0x00007ffff600c837 in QCoreApplication::exec() () from /usr/lib/libQtCore.so.4
#123 0x00007ffff0e9a9ae in ?? () from /usr/lib/python2.7/dist-packages/PyQt4/QtGui.so
#124 0x00000000004b9589 in call_function (oparg=, pp_stack=0x7fffffffd610) at ../Python/ceval.c:4021
#125 PyEval_EvalFrameEx (f=, throwflag=) at ../Python/ceval.c:2666
#126 0x00000000004b9d77 in fast_function (nk=, na=, n=, pp_stack=0x7fffffffd750, func=<function at remote 0x7ffff0a0f8c0>)
at ../Python/ceval.c:4107
#127 call_function (oparg=, pp_stack=0x7fffffffd750) at ../Python/ceval.c:4042
#128 PyEval_EvalFrameEx (f=, throwflag=) at ../Python/ceval.c:2666
#129 0x00000000004bfccd in PyEval_EvalCodeEx (co=0x7ffff7f03a30, globals=, locals=, args=, argcount=, kws=,
kwcount=0, defs=0x0, defcount=0, closure=0x0) at ../Python/ceval.c:3253
#130 0x00000000004c07a2 in PyEval_EvalCode (co=, globals=, locals=) at ../Python/ceval.c:667
#131 0x00000000004dfa02 in run_mod (mod=, filename=, globals=
{'argparse': <module at remote 0x7ffff7e55248>, 'unknownargs': [], '__icons_dir': './icons', 'importlib': <module at remote 0x7ffff7ebf830>, 'Core': <module at remote 0x7ffff7ebfcc8>, 'builtins': <module at remote 0x7ffff7f7fad0>, 'file': './scripts/omaha', 'args': <Namespace(toolkit='Qt4') at remote 0x7ffff7e2bf90>, 'l': <Launcher(actionQuit=<QAction at remote 0x7ffff19c2dd0>, pluginlist={<QListWidgetItem at remote 0x7ffff08e3200>: <Plugin(_Plugin__path='./plugins/Games/Free.desktop', _Plugin__entry=<DesktopEntry(content={'Desktop Entry': {'Comment': 'A dummy Omaha game plugin for testing new boards', 'Name': 'Free play', 'X-Omaha-Package': 'Omaha.Games.Free', 'Comment[fr]': 'Un pseudo jeu pour tester de nouveaux plateaux dans Omaha', 'X-Omaha-ID': 'FreeGame', 'Type': 'X-Omaha-Game', 'Name[fr]': 'Jeu libre', 'Categories': '', 'X-Omaha-Class': 'FreeGame'}}, defaultGroup='Desktop Entry', tainted=False, filename='./plugins/Games/Free.desktop') at remote 0x7ffff08e09e0>, _Plugin__usable=True, _Plugin__ma...(truncated), locals=
{'argparse': <module at remote 0x7ffff7e55248>, 'unknownargs': [], '__icons_dir': './icons', 'importlib': <module at remote 0x7ffff7ebf830>, 'Core': <module at remote 0x7ffff7ebfcc8>, 'builtins': <module at remote 0x7ffff7f7fad0>, 'file': './scripts/omaha', 'args': <Namespace(toolkit='Qt4') at remote 0x7ffff7e2bf90>, 'l': <Launcher(actionQuit=<QAction at remote 0x7ffff19c2dd0>, pluginlist={<QListWidgetItem at remote 0x7ffff08e3200>: <Plugin(_Plugin__path='./plugins/Games/Free.desktop', _Plugin__entry=<DesktopEntry(content={'Desktop Entry': {'Comment': 'A dummy Omaha game plugin for testing new boards', 'Name': 'Free play', 'X-Omaha-Package': 'Omaha.Games.Free', 'Comment[fr]': 'Un pseudo jeu pour tester de nouveaux plateaux dans Omaha', 'X-Omaha-ID': 'FreeGame', 'Type': 'X-Omaha-Game', 'Name[fr]': 'Jeu libre', 'Categories': '', 'X-Omaha-Class': 'FreeGame'}}, defaultGroup='Desktop Entry', tainted=False, filename='./plugins/Games/Free.desktop') at remote 0x7ffff08e09e0>, _Plugin__usable=True, _Plugin__ma...(truncated), flags=, arena=) at ../Python/pythonrun.c:1346
#132 0x00000000004e0594 in PyRun_FileExFlags (fp=0x974eb0, filename=0x7fffffffdf2f "./scripts/omaha", start=, globals=
{'argparse': <module at remote 0x7ffff7e55248>, 'unknownargs': [], '__icons_dir': './icons', 'importlib': <module at remote 0x7ffff7ebf830>, 'Core': <module at remote 0x7ffff7ebfcc8>, 'builtins': <module at remote 0x7ffff7f7fad0>, 'file': './scripts/omaha', 'args': <Namespace(toolkit='Qt4') at remote 0x7ffff7e2bf90>, 'l': <Launcher(actionQuit=<QAction at remote 0x7ffff19c2dd0>, pluginlist={<QListWidgetItem at remote 0x7ffff08e3200>: <Plugin(_Plugin__path='./plugins/Games/Free.desktop', _Plugin__entry=<DesktopEntry(content={'Desktop Entry': {'Comment': 'A dummy Omaha game plugin for testing new boards', 'Name': 'Free play', 'X-Omaha-Package': 'Omaha.Games.Free', 'Comment[fr]': 'Un pseudo jeu pour tester de nouveaux plateaux dans Omaha', 'X-Omaha-ID': 'FreeGame', 'Type': 'X-Omaha-Game', 'Name[fr]': 'Jeu libre', 'Categories': '', 'X-Omaha-Class': 'FreeGame'}}, defaultGroup='Desktop Entry', tainted=False, filename='./plugins/Games/Free.desktop') at remote 0x7ffff08e09e0>, _Plugin__usable=True, _Plugin__ma...(truncated), locals=
{'argparse': <module at remote 0x7ffff7e55248>, 'unknownargs': [], '__icons_dir': './icons', 'importlib': <module at remote 0x7ffff7ebf830>, 'Core': <module at remote 0x7ffff7ebfcc8>, 'builtins': <module at remote 0x7ffff7f7fad0>, 'file': './scripts/omaha', 'args': <Namespace(toolkit='Qt4') at remote 0x7ffff7e2bf90>, 'l': <Launcher(actionQuit=<QAction at remote 0x7ffff19c2dd0>, pluginlist={<QListWidgetItem at remote 0x7ffff08e3200>: <Plugin(_Plugin__path='./plugins/Games/Free.desktop', _Plugin__entry=<DesktopEntry(content={'Desktop Entry': {'Comment': 'A dummy Omaha game plugin for testing new boards', 'Name': 'Free play', 'X-Omaha-Package': 'Omaha.Games.Free', 'Comment[fr]': 'Un pseudo jeu pour tester de nouveaux plateaux dans Omaha', 'X-Omaha-ID': 'FreeGame', 'Type': 'X-Omaha-Game', 'Name[fr]': 'Jeu libre', 'Categories': '', 'X-Omaha-Class': 'FreeGame'}}, defaultGroup='Desktop Entry', tainted=False, filename='./plugins/Games/Free.desktop') at remote 0x7ffff08e09e0>, _Plugin__usable=True, _Plugin__ma...(truncated), closeit=1, flags=0x7fffffffda80) at ../Python/pythonrun.c:1332
#133 0x00000000004e109e in PyRun_SimpleFileExFlags (fp=0x974eb0, filename=, closeit=1, flags=0x7fffffffda80) at ../Python/pythonrun.c:936
#134 0x00000000004f10ed in Py_Main (argc=, argv=) at ../Modules/main.c:599
#135 0x00007ffff655fead in __libc_start_main (main=, argc=, ubp_av=, init=, fini=, rtld_fini=,
stack_end=0x7fffffffdb98) at libc-start.c:228
#136 0x000000000041f269 in _start ()

@krf
Copy link
Contributor

krf commented Apr 8, 2012

That should be fixed.

commit 3370841
Author: Kevin Funk kevin.funk@kdab.com
Date: Sun Apr 8 21:54:55 2012 +0200

Fix crash in widgettreemodel after widget destruction

Fixes https://github.com/KDAB/GammaRay/issues/9

@krf krf closed this as completed Apr 8, 2012
milianw added a commit to milianw/GammaRay that referenced this issue Nov 1, 2017
Fixes stack overflow when running plasmashell through gammaray:

Thread 1 "plasmashell" received signal SIGSEGV, Segmentation fault.
0x00007ffff3ec51fc in ?? () from /usr/lib/libQt5Gui.so.5
(gdb)
(gdb) bt
#0  0x00007ffff3ec51fc in ?? () from /usr/lib/libQt5Gui.so.5
KDAB#1  0x00007ffff3eb4c16 in QImage::convertToFormat_helper(QImage::Format, QFlags<Qt::ImageConversionFlag>) const () from /usr/lib/libQt5Gui.so.5
KDAB#2  0x00007fffe6d8c185 in QXcbWindow::setWindowIcon(QIcon const&) () from /usr/lib/libQt5XcbQpa.so.5
KDAB#3  0x00007ffff3e75ef4 in QWindow::setIcon(QIcon const&) () from /usr/lib/libQt5Gui.so.5
KDAB#4  0x00007fffddae596a in GammaRay::GuiSupport::updateWindowIcon (this=0x55555577d8a0, w=0x555555aef4e0) at /home/milian/projects/src/gammaray/plugins/guisupport/guisupport.cpp:539
KDAB#5  0x00007fffddae5eff in GammaRay::GuiSupport::eventFilter (this=0x55555577d8a0, watched=0x555555aef4e0, event=0x7fffff801490) at /home/milian/projects/src/gammaray/plugins/guisupport/guisupport.cpp:594
KDAB#6  0x00007ffff23d40bf in GammaRay::Probe::eventFilter (this=0x555555705c00, receiver=0x555555aef4e0, event=0x7fffff801490) at /home/milian/projects/src/gammaray/core/probe.cpp:920
KDAB#7  0x00007ffff3446bdc in QCoreApplicationPrivate::sendThroughApplicationEventFilters(QObject*, QEvent*) () from /usr/lib/libQt5Core.so.5
KDAB#8  0x00007ffff462af6a in QApplicationPrivate::notify_helper(QObject*, QEvent*) () from /usr/lib/libQt5Widgets.so.5
KDAB#9  0x00007ffff4632a06 in QApplication::notify(QObject*, QEvent*) () from /usr/lib/libQt5Widgets.so.5
KDAB#10 0x00007ffff3447060 in QCoreApplication::notifyInternal2(QObject*, QEvent*) () from /usr/lib/libQt5Core.so.5
KDAB#11 0x00007ffff3e75f16 in QWindow::setIcon(QIcon const&) () from /usr/lib/libQt5Gui.so.5
KDAB#12 0x00007fffddae596a in GammaRay::GuiSupport::updateWindowIcon (this=0x55555577d8a0, w=0x555555aef4e0) at /home/milian/projects/src/gammaray/plugins/guisupport/guisupport.cpp:539
KDAB#13 0x00007fffddae5eff in GammaRay::GuiSupport::eventFilter (this=0x55555577d8a0, watched=0x555555aef4e0, event=0x7fffff801860) at /home/milian/projects/src/gammaray/plugins/guisupport/guisupport.cpp:594
KDAB#14 0x00007ffff23d40bf in GammaRay::Probe::eventFilter (this=0x555555705c00, receiver=0x555555aef4e0, event=0x7fffff801860) at /home/milian/projects/src/gammaray/core/probe.cpp:920
KDAB#15 0x00007ffff3446bdc in QCoreApplicationPrivate::sendThroughApplicationEventFilters(QObject*, QEvent*) () from /usr/lib/libQt5Core.so.5
KDAB#16 0x00007ffff462af6a in QApplicationPrivate::notify_helper(QObject*, QEvent*) () from /usr/lib/libQt5Widgets.so.5
KDAB#17 0x00007ffff4632a06 in QApplication::notify(QObject*, QEvent*) () from /usr/lib/libQt5Widgets.so.5
KDAB#18 0x00007ffff3447060 in QCoreApplication::notifyInternal2(QObject*, QEvent*) () from /usr/lib/libQt5Core.so.5
KDAB#19 0x00007ffff3e75f16 in QWindow::setIcon(QIcon const&) () from /usr/lib/libQt5Gui.so.5
KDAB#20 0x00007fffddae596a in GammaRay::GuiSupport::updateWindowIcon (this=0x55555577d8a0, w=0x555555aef4e0) at /home/milian/projects/src/gammaray/plugins/guisupport/guisupport.cpp:539
KDAB#21 0x00007fffddae5eff in GammaRay::GuiSupport::eventFilter (this=0x55555577d8a0, watched=0x555555aef4e0, event=0x7fffff801c30) at /home/milian/projects/src/gammaray/plugins/guisupport/guisupport.cpp:594
KDAB#22 0x00007ffff23d40bf in GammaRay::Probe::eventFilter (this=0x555555705c00, receiver=0x555555aef4e0, event=0x7fffff801c30) at /home/milian/projects/src/gammaray/core/probe.cpp:920
milianw added a commit to milianw/GammaRay that referenced this issue May 6, 2020
This patch fixes runtime attaching to an ASAN-enabled QiTissue.
Previously I got the following crash reliably at startup:

```
==352112==ERROR: AddressSanitizer: SEGV on unknown address 0x604016000459 (pc 0x7feb421bed63 bp 0x7ffdaed25490 sp 0x7ffdaed25478 T0)
==352112==The signal is caused by a READ memory access.
    #0 0x7feb421bed62 in QHashData::nextNode(QHashData::Node*) (/usr/lib/libQt5Core.so.5+0x104d62)
    KDAB#1 0x7fea9efc9932 in QHash<GammaRay::ToolFactory*, QHashDummyValue>::iterator::operator++() /usr/include/qt/QtCore/qhash.h:345
    KDAB#2 0x7fea9efc8663 in QSet<GammaRay::ToolFactory*>::iterator::operator++() /usr/include/qt/QtCore/qset.h:129
    KDAB#3 0x7fea9efc6e0c in GammaRay::ToolManager::objectAdded(QMetaObject const*) ../core/toolmanager.cpp:217
    KDAB#4 0x7fea9efc6b67 in GammaRay::ToolManager::objectAdded(QObject*) ../core/toolmanager.cpp:194
    KDAB#5 0x7fea9efa7b22 in GammaRay::Probe::objectFullyConstructed(QObject*) ../core/probe.cpp:688
    KDAB#6 0x7fea9efa76b0 in GammaRay::Probe::objectAdded(QObject*, bool) ../core/probe.cpp:612
    KDAB#7 0x7fea9efa8a30 in GammaRay::Probe::discoverObject(QObject*) ../core/probe.cpp:907
    KDAB#8 0x7fea9efa8876 in GammaRay::Probe::findExistingObjects() ../core/probe.cpp:889
    KDAB#9 0x7fea9efa6097 in GammaRay::Probe::createProbe(bool) ../core/probe.cpp:351
    KDAB#10 0x7fead53fb5e7 in GammaRay::ProbeCreator::createProbe() ../probe/probecreator.cpp:92
    KDAB#11 0x7fead53fae5f in GammaRay::ProbeCreator::qt_static_metacall(QObject*, QMetaObject::Call, int, void**) probe/gammaray_probe_obj_autogen/EWIEGA46WW/moc_probecreator.cpp:72
    KDAB#12 0x7feb4238cad9 in QObject::event(QEvent*) (/usr/lib/libQt5Core.so.5+0x2d2ad9)
    KDAB#13 0x7feb43294351 in QApplicationPrivate::notify_helper(QObject*, QEvent*) (/usr/lib/libQt5Widgets.so.5+0x15b351)
    KDAB#14 0x7feb4329d828 in QApplication::notify(QObject*, QEvent*) (/usr/lib/libQt5Widgets.so.5+0x164828)
    KDAB#15 0x7feb4235f4f1 in QCoreApplication::notifyInternal2(QObject*, QEvent*) (/usr/lib/libQt5Core.so.5+0x2a54f1)
    KDAB#16 0x7feb42361d55 in QCoreApplicationPrivate::sendPostedEvents(QObject*, int, QThreadData*) (/usr/lib/libQt5Core.so.5+0x2a7d55)
    KDAB#17 0x7feb423b8243  (/usr/lib/libQt5Core.so.5+0x2fe243)
    KDAB#18 0x7feb206da6bd in g_main_context_dispatch (/usr/lib/libglib-2.0.so.0+0x6b6bd)
    KDAB#19 0x7feb206dc530  (/usr/lib/libglib-2.0.so.0+0x6d530)
    KDAB#20 0x7feb206dc570 in g_main_context_iteration (/usr/lib/libglib-2.0.so.0+0x6d570)
    KDAB#21 0x7feb423b788f in QEventDispatcherGlib::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) (/usr/lib/libQt5Core.so.5+0x2fd88f)
    KDAB#22 0x7feb4235e05b in QEventLoop::exec(QFlags<QEventLoop::ProcessEventsFlag>) (/usr/lib/libQt5Core.so.5+0x2a405b)
    KDAB#23 0x7feb42366065 in QCoreApplication::exec() (/usr/lib/libQt5Core.so.5+0x2ac065)
    KDAB#24 0x5643dbe05406 in main ../KDAB/qitissue/main.cpp:258
    KDAB#25 0x7feb41269022 in __libc_start_main (/usr/lib/libc.so.6+0x27022)
    KDAB#26 0x5643dbdfd1ed in _start (/home/milian/projects/kdab/qitissue/build-asan/bin/QiTissue+0x6b1ed)
```

I can only explain this by assuming that the list got mutated while
iterating over it, i.e. basically a recursion of `objectAdded` which
could happen when we init the factory?
milianw added a commit that referenced this issue May 7, 2020
This patch fixes runtime attaching to an ASAN-enabled QiTissue.
Previously I got the following crash reliably at startup:

```
==352112==ERROR: AddressSanitizer: SEGV on unknown address 0x604016000459 (pc 0x7feb421bed63 bp 0x7ffdaed25490 sp 0x7ffdaed25478 T0)
==352112==The signal is caused by a READ memory access.
    #0 0x7feb421bed62 in QHashData::nextNode(QHashData::Node*) (/usr/lib/libQt5Core.so.5+0x104d62)
    #1 0x7fea9efc9932 in QHash<GammaRay::ToolFactory*, QHashDummyValue>::iterator::operator++() /usr/include/qt/QtCore/qhash.h:345
    #2 0x7fea9efc8663 in QSet<GammaRay::ToolFactory*>::iterator::operator++() /usr/include/qt/QtCore/qset.h:129
    #3 0x7fea9efc6e0c in GammaRay::ToolManager::objectAdded(QMetaObject const*) ../core/toolmanager.cpp:217
    #4 0x7fea9efc6b67 in GammaRay::ToolManager::objectAdded(QObject*) ../core/toolmanager.cpp:194
    #5 0x7fea9efa7b22 in GammaRay::Probe::objectFullyConstructed(QObject*) ../core/probe.cpp:688
    #6 0x7fea9efa76b0 in GammaRay::Probe::objectAdded(QObject*, bool) ../core/probe.cpp:612
    #7 0x7fea9efa8a30 in GammaRay::Probe::discoverObject(QObject*) ../core/probe.cpp:907
    #8 0x7fea9efa8876 in GammaRay::Probe::findExistingObjects() ../core/probe.cpp:889
    #9 0x7fea9efa6097 in GammaRay::Probe::createProbe(bool) ../core/probe.cpp:351
    #10 0x7fead53fb5e7 in GammaRay::ProbeCreator::createProbe() ../probe/probecreator.cpp:92
    #11 0x7fead53fae5f in GammaRay::ProbeCreator::qt_static_metacall(QObject*, QMetaObject::Call, int, void**) probe/gammaray_probe_obj_autogen/EWIEGA46WW/moc_probecreator.cpp:72
    #12 0x7feb4238cad9 in QObject::event(QEvent*) (/usr/lib/libQt5Core.so.5+0x2d2ad9)
    #13 0x7feb43294351 in QApplicationPrivate::notify_helper(QObject*, QEvent*) (/usr/lib/libQt5Widgets.so.5+0x15b351)
    #14 0x7feb4329d828 in QApplication::notify(QObject*, QEvent*) (/usr/lib/libQt5Widgets.so.5+0x164828)
    #15 0x7feb4235f4f1 in QCoreApplication::notifyInternal2(QObject*, QEvent*) (/usr/lib/libQt5Core.so.5+0x2a54f1)
    #16 0x7feb42361d55 in QCoreApplicationPrivate::sendPostedEvents(QObject*, int, QThreadData*) (/usr/lib/libQt5Core.so.5+0x2a7d55)
    #17 0x7feb423b8243  (/usr/lib/libQt5Core.so.5+0x2fe243)
    #18 0x7feb206da6bd in g_main_context_dispatch (/usr/lib/libglib-2.0.so.0+0x6b6bd)
    #19 0x7feb206dc530  (/usr/lib/libglib-2.0.so.0+0x6d530)
    #20 0x7feb206dc570 in g_main_context_iteration (/usr/lib/libglib-2.0.so.0+0x6d570)
    #21 0x7feb423b788f in QEventDispatcherGlib::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) (/usr/lib/libQt5Core.so.5+0x2fd88f)
    #22 0x7feb4235e05b in QEventLoop::exec(QFlags<QEventLoop::ProcessEventsFlag>) (/usr/lib/libQt5Core.so.5+0x2a405b)
    #23 0x7feb42366065 in QCoreApplication::exec() (/usr/lib/libQt5Core.so.5+0x2ac065)
    #24 0x5643dbe05406 in main ../KDAB/qitissue/main.cpp:258
    #25 0x7feb41269022 in __libc_start_main (/usr/lib/libc.so.6+0x27022)
    #26 0x5643dbdfd1ed in _start (/home/milian/projects/kdab/qitissue/build-asan/bin/QiTissue+0x6b1ed)
```

I can only explain this by assuming that the list got mutated while
iterating over it, i.e. basically a recursion of `objectAdded` which
could happen when we init the factory?
milianw added a commit that referenced this issue Sep 21, 2021
This patch fixes runtime attaching to an ASAN-enabled QiTissue.
Previously I got the following crash reliably at startup:

```
==352112==ERROR: AddressSanitizer: SEGV on unknown address 0x604016000459 (pc 0x7feb421bed63 bp 0x7ffdaed25490 sp 0x7ffdaed25478 T0)
==352112==The signal is caused by a READ memory access.
    #0 0x7feb421bed62 in QHashData::nextNode(QHashData::Node*) (/usr/lib/libQt5Core.so.5+0x104d62)
    #1 0x7fea9efc9932 in QHash<GammaRay::ToolFactory*, QHashDummyValue>::iterator::operator++() /usr/include/qt/QtCore/qhash.h:345
    #2 0x7fea9efc8663 in QSet<GammaRay::ToolFactory*>::iterator::operator++() /usr/include/qt/QtCore/qset.h:129
    #3 0x7fea9efc6e0c in GammaRay::ToolManager::objectAdded(QMetaObject const*) ../core/toolmanager.cpp:217
    #4 0x7fea9efc6b67 in GammaRay::ToolManager::objectAdded(QObject*) ../core/toolmanager.cpp:194
    #5 0x7fea9efa7b22 in GammaRay::Probe::objectFullyConstructed(QObject*) ../core/probe.cpp:688
    #6 0x7fea9efa76b0 in GammaRay::Probe::objectAdded(QObject*, bool) ../core/probe.cpp:612
    #7 0x7fea9efa8a30 in GammaRay::Probe::discoverObject(QObject*) ../core/probe.cpp:907
    #8 0x7fea9efa8876 in GammaRay::Probe::findExistingObjects() ../core/probe.cpp:889
    #9 0x7fea9efa6097 in GammaRay::Probe::createProbe(bool) ../core/probe.cpp:351
    #10 0x7fead53fb5e7 in GammaRay::ProbeCreator::createProbe() ../probe/probecreator.cpp:92
    #11 0x7fead53fae5f in GammaRay::ProbeCreator::qt_static_metacall(QObject*, QMetaObject::Call, int, void**) probe/gammaray_probe_obj_autogen/EWIEGA46WW/moc_probecreator.cpp:72
    #12 0x7feb4238cad9 in QObject::event(QEvent*) (/usr/lib/libQt5Core.so.5+0x2d2ad9)
    #13 0x7feb43294351 in QApplicationPrivate::notify_helper(QObject*, QEvent*) (/usr/lib/libQt5Widgets.so.5+0x15b351)
    #14 0x7feb4329d828 in QApplication::notify(QObject*, QEvent*) (/usr/lib/libQt5Widgets.so.5+0x164828)
    #15 0x7feb4235f4f1 in QCoreApplication::notifyInternal2(QObject*, QEvent*) (/usr/lib/libQt5Core.so.5+0x2a54f1)
    #16 0x7feb42361d55 in QCoreApplicationPrivate::sendPostedEvents(QObject*, int, QThreadData*) (/usr/lib/libQt5Core.so.5+0x2a7d55)
    #17 0x7feb423b8243  (/usr/lib/libQt5Core.so.5+0x2fe243)
    #18 0x7feb206da6bd in g_main_context_dispatch (/usr/lib/libglib-2.0.so.0+0x6b6bd)
    #19 0x7feb206dc530  (/usr/lib/libglib-2.0.so.0+0x6d530)
    #20 0x7feb206dc570 in g_main_context_iteration (/usr/lib/libglib-2.0.so.0+0x6d570)
    #21 0x7feb423b788f in QEventDispatcherGlib::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) (/usr/lib/libQt5Core.so.5+0x2fd88f)
    #22 0x7feb4235e05b in QEventLoop::exec(QFlags<QEventLoop::ProcessEventsFlag>) (/usr/lib/libQt5Core.so.5+0x2a405b)
    #23 0x7feb42366065 in QCoreApplication::exec() (/usr/lib/libQt5Core.so.5+0x2ac065)
    #24 0x5643dbe05406 in main ../KDAB/qitissue/main.cpp:258
    #25 0x7feb41269022 in __libc_start_main (/usr/lib/libc.so.6+0x27022)
    #26 0x5643dbdfd1ed in _start (/home/milian/projects/kdab/qitissue/build-asan/bin/QiTissue+0x6b1ed)
```

I can only explain this by assuming that the list got mutated while
iterating over it, i.e. basically a recursion of `objectAdded` which
could happen when we init the factory?
tsdgeos added a commit to tsdgeos/GammaRay that referenced this issue Nov 30, 2022
AddressSanitizer:DEADLYSIGNAL
=================================================================
==84890==ERROR: AddressSanitizer: SEGV on unknown address 0x000000000000 (pc 0x000111d654b0 bp 0x00016dbf8120 sp 0x00016dbf8020 T0)
==84890==The signal is caused by a UNKNOWN memory access.
==84890==Hint: address points to the zero page.
    #0 0x111d654b0 in QPainterPrivate::attachPainterPrivate(QPainter*, QPaintDevice*) qpainter.cpp:242
    KDAB#1 0x111d6931c in QPainter::QPainter(QPaintDevice*) qpainter.cpp:1466
    KDAB#2 0x12bc00dd8 in GammaRay::SoftwareScreenGrabber::drawDecorations()+0x168 (gammaray_quickinspector.so:arm64+0x48dd8)
    KDAB#3 0x12bc004f4 in GammaRay::SoftwareScreenGrabber::windowAfterRendering()+0x34 (gammaray_quickinspector.so:arm64+0x484f4)
    KDAB#4 0x1142334e4 in void doActivate<true>(QObject*, int, void**) qobject.cpp:3972
    KDAB#5 0x112547b78 in QQuickWindowPrivate::renderSceneGraph(QSize const&, QSize const&) qquickwindow.cpp:664
    KDAB#6 0x1125669ac in QSGSoftwareRenderLoop::renderWindow(QQuickWindow*, bool) qsgsoftwarerenderloop.cpp:142
    KDAB#7 0x11254a7f4 in QQuickWindow::event(QEvent*) qquickwindow.cpp
    KDAB#8 0x1141eb3f8 in QCoreApplicationPrivate::notify_helper(QObject*, QEvent*) qcoreapplication.cpp:1193
    KDAB#9 0x1141eaf60 in QCoreApplication::notifyInternal2(QObject*, QEvent*) qcoreapplication.cpp:1026
    KDAB#10 0x111ca8620 in QPlatformWindow::deliverUpdateRequest() qplatformwindow.cpp:774
    KDAB#11 0x119dc7e30 in QCocoaWindow::deliverUpdateRequest() qcocoawindow.mm:1581
    KDAB#12 0x119db37bc in QCocoaScreen::deliverUpdateRequests() qcocoascreen.mm:454
Waqar144 pushed a commit that referenced this issue Nov 30, 2022
AddressSanitizer:DEADLYSIGNAL
=================================================================
==84890==ERROR: AddressSanitizer: SEGV on unknown address 0x000000000000 (pc 0x000111d654b0 bp 0x00016dbf8120 sp 0x00016dbf8020 T0)
==84890==The signal is caused by a UNKNOWN memory access.
==84890==Hint: address points to the zero page.
    #0 0x111d654b0 in QPainterPrivate::attachPainterPrivate(QPainter*, QPaintDevice*) qpainter.cpp:242
    #1 0x111d6931c in QPainter::QPainter(QPaintDevice*) qpainter.cpp:1466
    #2 0x12bc00dd8 in GammaRay::SoftwareScreenGrabber::drawDecorations()+0x168 (gammaray_quickinspector.so:arm64+0x48dd8)
    #3 0x12bc004f4 in GammaRay::SoftwareScreenGrabber::windowAfterRendering()+0x34 (gammaray_quickinspector.so:arm64+0x484f4)
    #4 0x1142334e4 in void doActivate<true>(QObject*, int, void**) qobject.cpp:3972
    #5 0x112547b78 in QQuickWindowPrivate::renderSceneGraph(QSize const&, QSize const&) qquickwindow.cpp:664
    #6 0x1125669ac in QSGSoftwareRenderLoop::renderWindow(QQuickWindow*, bool) qsgsoftwarerenderloop.cpp:142
    #7 0x11254a7f4 in QQuickWindow::event(QEvent*) qquickwindow.cpp
    #8 0x1141eb3f8 in QCoreApplicationPrivate::notify_helper(QObject*, QEvent*) qcoreapplication.cpp:1193
    #9 0x1141eaf60 in QCoreApplication::notifyInternal2(QObject*, QEvent*) qcoreapplication.cpp:1026
    #10 0x111ca8620 in QPlatformWindow::deliverUpdateRequest() qplatformwindow.cpp:774
    #11 0x119dc7e30 in QCocoaWindow::deliverUpdateRequest() qcocoawindow.mm:1581
    #12 0x119db37bc in QCocoaScreen::deliverUpdateRequests() qcocoascreen.mm:454
shaan7 pushed a commit to shaan7/GammaRay that referenced this issue Jul 31, 2023
AddressSanitizer:DEADLYSIGNAL
=================================================================
==84890==ERROR: AddressSanitizer: SEGV on unknown address 0x000000000000 (pc 0x000111d654b0 bp 0x00016dbf8120 sp 0x00016dbf8020 T0)
==84890==The signal is caused by a UNKNOWN memory access.
==84890==Hint: address points to the zero page.
    #0 0x111d654b0 in QPainterPrivate::attachPainterPrivate(QPainter*, QPaintDevice*) qpainter.cpp:242
    KDAB#1 0x111d6931c in QPainter::QPainter(QPaintDevice*) qpainter.cpp:1466
    KDAB#2 0x12bc00dd8 in GammaRay::SoftwareScreenGrabber::drawDecorations()+0x168 (gammaray_quickinspector.so:arm64+0x48dd8)
    KDAB#3 0x12bc004f4 in GammaRay::SoftwareScreenGrabber::windowAfterRendering()+0x34 (gammaray_quickinspector.so:arm64+0x484f4)
    KDAB#4 0x1142334e4 in void doActivate<true>(QObject*, int, void**) qobject.cpp:3972
    KDAB#5 0x112547b78 in QQuickWindowPrivate::renderSceneGraph(QSize const&, QSize const&) qquickwindow.cpp:664
    KDAB#6 0x1125669ac in QSGSoftwareRenderLoop::renderWindow(QQuickWindow*, bool) qsgsoftwarerenderloop.cpp:142
    KDAB#7 0x11254a7f4 in QQuickWindow::event(QEvent*) qquickwindow.cpp
    KDAB#8 0x1141eb3f8 in QCoreApplicationPrivate::notify_helper(QObject*, QEvent*) qcoreapplication.cpp:1193
    KDAB#9 0x1141eaf60 in QCoreApplication::notifyInternal2(QObject*, QEvent*) qcoreapplication.cpp:1026
    KDAB#10 0x111ca8620 in QPlatformWindow::deliverUpdateRequest() qplatformwindow.cpp:774
    KDAB#11 0x119dc7e30 in QCocoaWindow::deliverUpdateRequest() qcocoawindow.mm:1581
    KDAB#12 0x119db37bc in QCocoaScreen::deliverUpdateRequests() qcocoascreen.mm:454
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

No branches or pull requests

4 participants