GNOME Bugzilla – Bug 496178
gnucash segfaults with troublesome automatic transactions
Last modified: 2018-06-29 21:54:16 UTC
Steps to reproduce: Attaching a diff of what I had to remove from the xml to get GnuCash to stop segfaulting when it opened this set of accounts. Stack trace: Other information:
Created attachment 98976 [details] diff of xml files Diff between the two files of what I had to remove to stop gnucash segfaults.
Linux or Windows? Which Linux?
ubuntu Copy of the bug: https://bugs.edge.launchpad.net/ubuntu/+source/gnucash/+bug/162236
May you please provide us with a real test file to reproduce the crash? This way I have no idea what it is about. Thank you!
I'm not sure how to provide you with a real test file without disclosing a lot of private business information about me and my customers. What I can tell you is that the first <act:name/> element is empty and the rest contain bogus account names. I'm not sure at all how they ended up in this state, though. I certainly did not put wacky md5 hashes in there.
You removed the scheduled-transaction and template-transaction data structures wholesale from your books. The account names are "wacky" because they're internally generated. I'm not sure if this is enough to reproduce the problem, but it might be. Hard to say. It'd be better to know what was printed to the console when you reproduce with: gnucash --logto stderr --debug ... and at what point it crashes.
Created attachment 99736 [details] output of gnucash --logto stderr --debug The last error ("Unknown account for guid [134a5d9aa422eca750c59f267423eac0]") is what led me to delete the transaction initially.
Yeah ... I have another datafile from a different user that exhibits a similar problem, eventually resulting in memory corruption (likely double-freeing).
Created attachment 101056 [details] datafile that exhibits the problem This datafile exhibits the problem. I created a new "Simple Checkbook" template account, and created an automatic weekly SX from Assets:Checking -> Expenses, then edited the datafile to munge the real-account guid in the Credit side of the template transaction. This mimics the cases where the underlying account disappears, or however this situation is getting created.
trunk @r16670; tagged for backport to branches/2.2/. Strings returned by guid_to_string(…) can't be freed, which we were doing. I changed the calls to guid_to_string_buff(…), which is a bit clearer in the caller how memory allocation is handled.
branches/2.2@r16672. Thanks a lot!
GnuCash bug tracking has moved to a new Bugzilla host. This bug has been copied to https://bugs.gnucash.org/show_bug.cgi?id=496178. Please update any external references or bookmarks.