[Kmymoney-devel] [kmymoney4] [Bug 328967] New: An exception in a slot called by a signal emitted in MyMoneyFile::commitTransaction() causes a crash with useless error message
christian-david at web.de
Wed Dec 18 15:33:10 UTC 2013
Bug ID: 328967
Summary: An exception in a slot called by a signal emitted in
MyMoneyFile::commitTransaction() causes a crash with
useless error message
Version: git master
Platform: Compiled Sources
Assignee: kmymoney-devel at kde.org
Reporter: christian-david at web.de
An exception in a slot called by a signal emitted in
MyMoneyFile::commitTransaction() causes a crash in a way that it is really hard
for a developer to find the root of all evil.
The reason is that the MyMoneyFileTransaction can have m_needRollback == true
even if the commit was finished and MyMoneyFile::d->m_inTransaction was set
An uncaught exception causes the MyMoneyFileTransaction to be destructed which
starts a rollback then. MyMoneyFile::rollbackTransaction() detects that no
transaction was started (because it is finished already). This leads to another
exception which makes it really hard to find the bug.
During normal usage this should not happen anyway and the data is as save as in
any other uncaught exception. It is unlikly that this leads to other bugs. Just
reported it here because a bug based on this is really hard to find and share
my experience. A fix is not urgent nor necessary.
Steps to Reproduce:
1. connect a slot to any signal of MyMoneyFile (which is emitted during
2. throw an exception in this slot
3. change data & commit a transaction in a way that your slot called
KMyMoney crashes with unusable error message.
Crash with usable error message.
You are receiving this mail because:
You are the assignee for the bug.
More information about the KMyMoney-devel