[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 christian-david at web.de
Wed Dec 18 15:33:10 UTC 2013


https://bugs.kde.org/show_bug.cgi?id=328967

            Bug ID: 328967
           Summary: An exception in a slot called by a signal emitted in
                    MyMoneyFile::commitTransaction() causes a crash with
                    useless error message
    Classification: Unclassified
           Product: kmymoney4
           Version: git master
          Platform: Compiled Sources
                OS: All
            Status: UNCONFIRMED
          Severity: wishlist
          Priority: NOR
         Component: general
          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
false already.

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.

Reproducible: Always

Steps to Reproduce:
1. connect a slot to any signal of MyMoneyFile (which is emitted during
commitTransaction())
2. throw an exception in this slot
3. change data & commit a transaction in a way that your slot called
Actual Results:  
KMyMoney crashes with unusable error message.

Expected Results:  
Crash with usable error message.

-- 
You are receiving this mail because:
You are the assignee for the bug.


More information about the KMyMoney-devel mailing list