Bug 283294 - Kmymoney4 crashes trying to delete a report.
Summary: Kmymoney4 crashes trying to delete a report.
Status: RESOLVED FIXED
Alias: None
Product: kmymoney
Classification: Applications
Component: general (show other bugs)
Version: git (master)
Platform: Debian testing Linux
: NOR crash
Target Milestone: ---
Assignee: KMyMoney Devel Mailing List
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-10-04 05:29 UTC by michael papet
Modified: 2012-05-08 22:54 UTC (History)
1 user (show)

See Also:
Latest Commit:
Version Fixed In:
Sentry Crash Report:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description michael papet 2011-10-04 05:29:40 UTC
Version:           4.5.3 (using KDE 4.6.5) 
OS:                Linux

Attempts to use reports>Net worth>Net worth by month> Customized to include 3 years of data locks the application up dead.  non-responsive.  Kill the PID and kmymoney4 will start again.  I'm using the mysql database backend. 

Here's the entire gdb output

Starting program: /usr/bin/kmymoney 
[Thread debugging using libthread_db enabled]
Application asked to unregister timer 0x52000027 which is not registered in this thread. Fix application.
kmymoney(29516)/kdecore (KPluginInfo) KPluginInfo::kcmServices: found 0 offers for "KBanking"
kmymoney(29516)/kdecore (KPluginInfo) KPluginInfo::kcmServices: found 0 offers for "Reconciliation report"
kmymoney(29516)/kdecore (KPluginInfo) KPluginInfo::kcmServices: found 1 offers for "Print check"
kmymoney(29516)/kdecore (KPluginInfo) KPluginInfo::kcmServices: found 0 offers for "KMyMoney OFX"
kmymoney(29516)/kdecore (KPluginInfo) KPluginInfo::kcmServices: found 1 offers for "iCalendar"
kmymoney(29516)/kdecore (KLibrary) kde4Factory: The library "/usr/lib/kde4/kmm_kbanking.so" does not offer a qt_plugin_instance function.
7:2011/10/03 22-19-27:aqbanking(29516):started
KMyMoney kbanking plugin loaded
Object::disconnect: No such slot KMyMoneyView::slotRememberPage(const QModelIndex, const QModelIndex)
Object::connect: No such slot KMyMoneyView::slotRememberPage(const QModelIndex, const QModelIndex)
kmymoney(29516)/kdecore (KLibrary) kde4Factory: The library "/usr/lib/kde4/kmm_reconciliationreport.so" does not offer a qt_plugin_instance function.
KMyMoney reconciliation report plugin loaded
kmymoney(29516)/kdecore (KLibrary) kde4Factory: The library "/usr/lib/kde4/kmm_printcheck.so" does not offer a qt_plugin_instance function.
KMyMoney printcheck plugin loaded
kmymoney(29516)/kdecore (KConfigSkeleton) KCoreConfigSkeleton::writeConfig:
QFSFileEngine::open: No file name specified
kmymoney(29516)/kdecore (KLibrary) kde4Factory: The library "/usr/lib/kde4/kmm_ofximport.so" does not offer a qt_plugin_instance function.
KMyMoney ofximport plugin loaded
kmymoney(29516)/kdecore (KLibrary) kde4Factory: The library "/usr/lib/kde4/kmm_icalendarexport.so" does not offer a qt_plugin_instance function.
KMyMoney iCalendar plugin loaded
[New Thread 0xaf9ccb70 (LWP 29525)]
[New Thread 0xaed75b70 (LWP 29543)]
[Thread 0xaed75b70 (LWP 29543) exited]
Database apparently in use
Opened by mythtv@192.168.15.33 on 2011-10-03 at 22.16.15.
Open anyway?
request balance for A000001 at 2011-10-03
request balance for A000004 at 2011-10-03
request balance for A000013 at 2011-10-03
request balance for A000008 at 2011-10-03
request balance for A000010 at 2011-10-03
request balance for A000027 at 2011-10-03
request balance for A000001 at 2011-10-02
request balance for A000004 at 2011-10-02
request balance for A000008 at 2011-10-02
request balance for A000010 at 2011-10-02
request balance for A000013 at 2011-10-02
request balance for A000027 at 2011-10-02
[Thread 0xaf9ccb70 (LWP 29525) exited]
QPainter::begin: Widget painting can only begin as a result of a paintEvent
QPainter::translate: Painter not active
QPainter::setClipRect: Painter not active
request balance for A000001 at 2010-12-31
request balance for A000004 at 2010-12-31
request balance for A000008 at 2010-12-31
request balance for A000010 at 2010-12-31
request balance for A000013 at 2010-12-31
request balance for A000014 at 2010-12-31
request balance for A000017 at 2010-12-31
request balance for A000018 at 2010-12-31
request balance for A000021 at 2010-12-31
request balance for A000022 at 2010-12-31
request balance for A000024 at 2010-12-31
request balance for A000026 at 2010-12-31
request balance for A000027 at 2010-12-31
request balance for A000030 at 2010-12-31
request balance for A000031 at 2010-12-31
request balance for A000032 at 2010-12-31
request balance for A000001 at 2009-02-28
request balance for A000003 at 2009-02-28
request balance for A000004 at 2009-02-28
request balance for A000005 at 2009-02-28
request balance for A000008 at 2009-02-28
request balance for A000009 at 2009-02-28
request balance for A000010 at 2009-02-28
request balance for A000011 at 2009-02-28
request balance for A000013 at 2009-02-28
request balance for A000014 at 2009-02-28
request balance for A000016 at 2009-02-28
request balance for A000017 at 2009-02-28
request balance for A000018 at 2009-02-28
request balance for A000020 at 2009-02-28
request balance for A000021 at 2009-02-28
request balance for A000022 at 2009-02-28
request balance for A000023 at 2009-02-28
request balance for A000024 at 2009-02-28
request balance for A000025 at 2009-02-28
request balance for A000026 at 2009-02-28
request balance for A000027 at 2009-02-28
request balance for A000028 at 2009-02-28
request balance for A000029 at 2009-02-28
request balance for A000030 at 2009-02-28
request balance for A000031 at 2009-02-28
request balance for A000032 at 2009-02-28
terminate called after throwing an instance of 'std::bad_alloc'
  what():  std::bad_alloc

Program received signal SIGABRT, Aborted.
0xb7fe2424 in __kernel_vsyscall ()


Reproducible: Always

Steps to Reproduce:
Launch Kmymoney4
Enter mysql password
Wait for data to load.
Go to reports>Net Worth>Net Worth By Month 
Open report.  It works fine with the default 12 months of data.
Change Date window to be three years. 

Actual Results:  
Application locks up, non-responsive.

Expected Results:  
See net worth by month over a three-year period.

OS: Linux (i686) release 2.6.39-2-686-pae
Compiler: gcc
Comment 1 michael papet 2011-10-04 05:32:32 UTC
Same crash occurs if I try to use the default "Net Worth By Year" report.
Comment 2 Jack 2011-10-04 15:02:07 UTC
A crash is different from a freeze/lockup.  When KMM stops responding, is the machine otherwise still ok?  If so, does top show whether either KMM or mysql is active, and perhaps using a lot of the CPU?

Is the KMM data in a database by itself or shared?  Note the "Database apparently in use.  Opened by mythtv@192.168.15.33 on 2011-10-03 at 22.16.15.  Open anyway?"  I wonder if it is mysql freezing, rather than KMM.

Final point - the above output looks mostly like normal KMM console output.  If it is really KMM freezing, then a backtrace would really help.
Comment 3 michael papet 2011-10-04 20:42:34 UTC
To be clear, KMM stops responding.  The machine is fine.  I'll report back with the top information.

KMM is on a host with almost no load and plenty of resources.  As far as I know, mysql is not freezing.  I don't have any problems with mythtv.  

What kind of errors should I look for in MySQL?

I'm an amateur.  How do I generate a backtrace when KMM stops responding?
Comment 4 Jack 2011-10-04 21:28:05 UTC
While the program is frozen, does mythtv work ok then?  Can you run mysql and query the database, or perhaps just type "\s" to get some status information from mysql?  My concern about mysql is that if mythtv and mysql are using the same database, there is perhaps a chance of some conflict - probably not likely, but I don't see any other hints.

What happens if you try the report for two years instead of three?  Can you find how large a range causes the problem?  Then see if it's really the width of the date range or just if the starting point is too early - maybe before the opening date of the accounts?  While that should not cause a problem, I'm looking for any useful information to suggest the cause.

See http://techbase.kde.org/Development/Tutorials/Debugging/How_to_create_useful_crash_reports for general information on getting good backtrace information.  The really quick version is to hit Ctl-C when the program hangs, then type "thread apply all backtrace."  However, it depends on your distribution as to how easy it will be to get a version of the program with the full debug information not stripped out.
Comment 5 michael papet 2011-10-12 05:35:00 UTC
To be clear, kmymoney is using its own database.  I just use the mythtv credentials.  The mysql database does a couple of other things and there's no problems with its performance.

I'm running Debian Testing and I need to learn how to run in debug mode before I can get you a backtrace.  There's a debug package, but it doesn't work like magic.  The Ctl-C just complained that some source files were missing.

Bear with me while I figure this out.
Comment 6 michael papet 2011-10-12 06:18:21 UTC
I generated this backtrace trying to delete a report using Debian's debug package.

Application: KMyMoney (kmymoney), signal: Aborted
[KCrash Handler]
#7  0xb7849424 in __kernel_vsyscall ()
#8  0xb52d7911 in raise () from /lib/i386-linux-gnu/i686/cmov/libc.so.6
#9  0xb52dad42 in abort () from /lib/i386-linux-gnu/i686/cmov/libc.so.6
#10 0xb54ff7ad in __gnu_cxx::__verbose_terminate_handler() () from /usr/lib/i386-linux-gnu/libstdc++.so.6
#11 0xb54fd543 in ?? () from /usr/lib/i386-linux-gnu/libstdc++.so.6
#12 0xb54fd57f in std::terminate() () from /usr/lib/i386-linux-gnu/libstdc++.so.6
#13 0xb54fd724 in __cxa_rethrow () from /usr/lib/i386-linux-gnu/libstdc++.so.6
#14 0xb61eaab5 in QCoreApplication::notifyInternal(QObject*, QEvent*) () from /usr/lib/libQtCore.so.4
#15 0xb569e060 in QApplicationPrivate::sendMouseEvent(QWidget*, QMouseEvent*, QWidget*, QWidget*, QWidget**, QPointer<QWidget>&, bool) () from /usr/lib/libQtGui.so.4
#16 0xb572825d in ?? () from /usr/lib/libQtGui.so.4
#17 0xb5726ae7 in QApplication::x11ProcessEvent(_XEvent*) () from /usr/lib/libQtGui.so.4
#18 0xb57523fc in ?? () from /usr/lib/libQtGui.so.4
#19 0xb48b6252 in g_main_context_dispatch () from /lib/libglib-2.0.so.0
#20 0xb48b6a30 in ?? () from /lib/libglib-2.0.so.0
#21 0xb48b6ce4 in g_main_context_iteration () from /lib/libglib-2.0.so.0
#22 0xb6218cc7 in QEventDispatcherGlib::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) () from /usr/lib/libQtCore.so.4
#23 0xb575201a in ?? () from /usr/lib/libQtGui.so.4
#24 0xb61e9abd in QEventLoop::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) () from /usr/lib/libQtCore.so.4
#25 0xb61e9d01 in QEventLoop::exec(QFlags<QEventLoop::ProcessEventsFlag>) () from /usr/lib/libQtCore.so.4
#26 0xb61ee45a in QCoreApplication::exec() () from /usr/lib/libQtCore.so.4
#27 0xb569af24 in QApplication::exec() () from /usr/lib/libQtGui.so.4
#28 0x0808b587 in main (argc=1, argv=0xbfa44f84) at /build/buildd-kmymoney_4.5.3-2-i386-37gWtq/kmymoney-4.5.3/kmymoney/main.cpp:260
Comment 7 Alvaro Soliverez 2012-04-27 14:34:12 UTC
One of the problems might be that deleting a report still opens the report before deleting it. dumb, I know. I'll try to fix that.
Comment 8 Alvaro Soliverez 2012-04-28 21:30:19 UTC
Updating affected version. I can't confirm the crash, but there is a patch in reviewboard to delete a report without having to open it.
Comment 9 Alvaro Soliverez 2012-05-06 01:12:55 UTC
Git commit f51b44fe99258205395d3ecb2f56a3dd71819125 by Alvaro Soliverez.
Committed on 27/04/2012 at 19:51.
Pushed by asoliverez into branch 'master'.

To delete a report from the list, do not open the report.
This helps when trying to remove a faulty report, which cannot be opened
correctly.
REVIEW:104763

M  +25   -7    kmymoney/views/kreportsview.cpp
M  +6    -0    kmymoney/views/kreportsview.h

http://commits.kde.org/kmymoney/f51b44fe99258205395d3ecb2f56a3dd71819125
Comment 10 Alvaro Soliverez 2012-05-08 22:54:43 UTC
Git commit 9a11db80534d98ca2b146658d277a446818e1cae by Alvaro Soliverez.
Committed on 27/04/2012 at 19:51.
Pushed by asoliverez into branch '4.6'.

To delete a report from the list, do not open the report.
This helps when trying to remove a faulty report, which cannot be opened
correctly.
REVIEW:104763

M  +25   -7    kmymoney/views/kreportsview.cpp
M  +6    -0    kmymoney/views/kreportsview.h

http://commits.kde.org/kmymoney/9a11db80534d98ca2b146658d277a446818e1cae