[Kmymoney-devel] Help with debugging "Buy" investment Interest/Fees widgets hiding

Kumar Appaiah a.kumar at alumni.iitm.ac.in
Sun Aug 7 04:19:22 UTC 2011


Hi!

This is with regard to the problem discussed here, specifically the
second quoted text, where the author has said that this is a "known
bug":

http://mail.kde.org/pipermail/kmymoney/2011-January/000154.html

To summarize, for new investments, the "Buy Shares" option is the
default, and it causes the display of the fees and interest boxes,
which is quite irritating when we don't want to enter any values for
those sections.

I tried debugging this a bit further, and made a bit of headway. The
primary problem is that the fees and interest widgets are initially
hidden, but they end up appearing anyway mysteriously later on. What I
did is to add a breakpoint to capture the location (memory) address of
the fees/interest widgets concerned. I then set a breakpoint for
QWidget::setVisible(bool), and found where the widgets in question are
being set to visible again, and I found this backtrace:

#0  QWidget::setVisible (this=0x2046860, visible=true) at kernel/qwidget.cpp:7579
#1  0x00007ffff3590bba in show (this=0x13c4360) at ../../include/QtGui/../../src/gui/kernel/qwidget.h:487
#2  QAbstractItemView::updateEditorGeometries (this=0x13c4360) at itemviews/qabstractitemview.cpp:2602
#3  0x00007ffff35826bd in QAbstractItemView::updateGeometries (this=0x13c4360) at itemviews/qabstractitemview.cpp:2633
#4  0x00007ffff35b2dfa in QTableView::updateGeometries (this=0x13c4360) at itemviews/qtableview.cpp:2122
#5  0x00007ffff35b6449 in QTableView::timerEvent (this=0x13c4360, event=0x7fffffffcf90) at itemviews/qtableview.cpp:2720
#6  0x00007ffff3f5d3f9 in QObject::event (this=0x13c4360, e=<value optimized out>) at kernel/qobject.cpp:1181
#7  0x00007ffff30d4a5b in QWidget::event (this=0x13c4360, event=0x7fffffffcf90) at kernel/qwidget.cpp:8718
#8  0x00007ffff3476066 in QFrame::event (this=0x13c4360, e=0x7fffffffcf90) at widgets/qframe.cpp:557
#9  0x00007ffff34f7693 in QAbstractScrollArea::event (this=0x13c4360, e=0x7fffffffcf90) at widgets/qabstractscrollarea.cpp:996
#10 0x00007ffff358fa8b in QAbstractItemView::event (this=0x13c4360, event=0x7fffffffcf90) at itemviews/qabstractitemview.cpp:1564
#11 0x00007ffff30849f4 in notify_helper (this=0xc55c90, receiver=0x13c4360, e=0x7fffffffcf90) at kernel/qapplication.cpp:4467
#12 QApplicationPrivate::notify_helper (this=0xc55c90, receiver=0x13c4360, e=0x7fffffffcf90) at kernel/qapplication.cpp:4439
#13 0x00007ffff3089881 in QApplication::notify (this=0xc50e50, receiver=0x13c4360, e=0x7fffffffcf90) at kernel/qapplication.cpp:4346
#14 0x00007ffff6574a66 in KApplication::notify(QObject*, QEvent*) () from /usr/lib/libkdeui.so.5
#15 0x00007ffff3f46fbc in QCoreApplication::notifyInternal (this=0xc50e50, receiver=0x13c4360, event=0x7fffffffcf90) at kernel/qcoreapplication.cpp:731
#16 0x00007ffff3f73942 in sendEvent (this=0xc59390) at ../../include/QtCore/../../src/corelib/kernel/qcoreapplication.h:215
#17 QTimerInfoList::activateTimers (this=0xc59390) at kernel/qeventdispatcher_unix.cpp:604
#18 0x00007ffff3f71134 in timerSourceDispatch (source=<value optimized out>) at kernel/qeventdispatcher_glib.cpp:184
#19 0x00007fffed7654a3 in g_main_dispatch (context=0xc584e0) at /tmp/buildd/glib2.0-2.28.6/./glib/gmain.c:2440
#20 g_main_context_dispatch (context=0xc584e0) at /tmp/buildd/glib2.0-2.28.6/./glib/gmain.c:3013
#21 0x00007fffed765c80 in g_main_context_iterate (context=0xc584e0, block=1, dispatch=1, self=<value optimized out>) at /tmp/buildd/glib2.0-2.28.6/./glib/gmain.c:3091
#22 0x00007fffed765f1d in g_main_context_iteration (context=0xc584e0, may_block=1) at /tmp/buildd/glib2.0-2.28.6/./glib/gmain.c:3154
#23 0x00007ffff3f71abf in QEventDispatcherGlib::processEvents (this=0xc28f50, flags=<value optimized out>) at kernel/qeventdispatcher_glib.cpp:422
#24 0x00007ffff31289ce in QGuiEventDispatcherGlib::processEvents (this=<value optimized out>, flags=<value optimized out>) at kernel/qguieventdispatcher_glib.cpp:204
#25 0x00007ffff3f461c2 in QEventLoop::processEvents (this=<value optimized out>, flags=...) at kernel/qeventloop.cpp:149
#26 0x00007ffff3f463bf in QEventLoop::exec (this=0x7fffffffd230, flags=...) at kernel/qeventloop.cpp:201
#27 0x00007ffff3f4a567 in QCoreApplication::exec () at kernel/qcoreapplication.cpp:1008
#28 0x0000000000462165 in runKMyMoney (a=0xc50e50, splash=0xd37250) at /home/kumar/Software/kmymoney/kmymoney/kmymoney/main.cpp:282
#29 0x0000000000460ba9 in main (argc=1, argv=0x7fffffffdeb8) at /home/kumar/Software/kmymoney/kmymoney/kmymoney/main.cpp:181

Now, this falls outside any of the purview of the kmymoney code
itself, as I see it. The exact location in
QAbstractItemView::updateEditorGeometries where this function is
called is here:

http://qt.gitorious.org/qt/qt/blobs/4.7-stable/src/gui/itemviews/qabstractitemview.cpp#line2602

I can keep going outwards in the backtrace, but that doesn't seem to
lead me anywhere. Could you please help me proceed in debugging this
problem?

If I am not being clear and you need more information, please let me
know and I shall get back to you with details.

Thanks!

Kumar
-- 
Kumar Appaiah


More information about the KMyMoney-devel mailing list