GNOME Bugzilla – Bug 343405
MetaBug: Account TreeView Crashers
Last modified: 2018-06-29 21:06:13 UTC
I've noticed some similarities among some of the open critical bugs. I'm hoping there might be one common cause, so I've opened this bug as a place to comment on them as a group. Summary: *** Bug #339656 - Crash when opening data file While recreating the account-tree page (frame 24), we refilter the filter model (frame 21). Somewhere along the way, we get an invalid filter iter, as seen in sort_by_string(). (gdb) p *f_iter1 $9 = {stamp = 0, user_data = 0x0, user_data2 = 0x0, user_data3 = 0x0} (gdb) p *f_iter2 $10 = {stamp = -1607956811, user_data = 0x974a118, user_data2 = 0x997edd0, user_data3 = 0x0} *** Bug #341757 - Crash during SLR While creating the transactions from the SX, the generated qof events trigger gnc_tree_model_account_event_handler() (frame 22) which emits "row_changed" which eventually results in invalid iters in sort_by_string().
+ Trace 68543
And crashing in sort_by_string() again.
So, what's similar and what's different? Some involve txn creation, some involve account creation. All but #339656 involve gnc_tree_model_account_event_handler(). But #339656 is so similar to the rest that it may point to more of a problem with the account treemodel. One thing that's pretty puzzling is that I can't reproduce _any_ of these. I've tried opening 6 or 7 account trees and setting them to various different sort and filter settings and then adding various accounts. Nothing.
Created attachment 66497 [details] [review] account tree model patch I gave gnc_tree_model_account.c a brief skim, focusing on the signal handling parts. I wonder if the problem is that we're not invalidating iters by incrementing the model stamp before emitting our row_inserted and row_deleted signals. If so, this patch might fix it, but I still can't reproduce it, so I'm going to keep thinking about it.
Quick feedback, it does _not_ solve the add account crash for me. Will try to think about it too, as I _can_ reproduce it :)
Ok, that's good to know. Can you post what you know about gtk+ version dependence?
Well, I tested bug 343362. It occured with gtk 2.9.1, but not with 2.4.14, 2.8.10 and 2.8.17. See also r14283. This fixed above bug for me.
*** Bug 341757 has been marked as a duplicate of this bug. ***
Bill and David have verified that r14285 no longer has bug #343362. I'm reasonably confident that all these crashes are from the same cause. Good debugging, Andreas!
GnuCash bug tracking has moved to a new Bugzilla host. This bug has been copied to https://bugs.gnucash.org/show_bug.cgi?id=343405. Please update any external references or bookmarks.