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@kde.org
          Reporter: christian-da...@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.
_______________________________________________
KMyMoney-devel mailing list
KMyMoney-devel@kde.org
https://mail.kde.org/mailman/listinfo/kmymoney-devel

Reply via email to