After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 496178 - gnucash segfaults with troublesome automatic transactions
gnucash segfaults with troublesome automatic transactions
Status: VERIFIED FIXED
Product: GnuCash
Classification: Other
Component: Scheduled Transactions
2.2.x
Other All
: Normal critical
: ---
Assigned To: Josh Sled
Josh Sled
Depends on:
Blocks:
 
 
Reported: 2007-11-12 17:15 UTC by Mark A. Hershberger
Modified: 2018-06-29 21:54 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
diff of xml files (22.21 KB, text/x-patch)
2007-11-12 17:16 UTC, Mark A. Hershberger
Details
output of gnucash --logto stderr --debug (197.22 KB, text/plain)
2007-11-27 20:17 UTC, Mark A. Hershberger
Details
datafile that exhibits the problem (1.82 KB, application/x-gzip)
2007-12-16 16:05 UTC, Josh Sled
Details

Description Mark A. Hershberger 2007-11-12 17:15:14 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:
Comment 1 Mark A. Hershberger 2007-11-12 17:16:26 UTC
Created attachment 98976 [details]
diff of xml files

Diff between the two files of what I had to remove to stop gnucash segfaults.
Comment 2 Christian Stimming 2007-11-13 09:09:16 UTC
Linux or Windows? Which Linux?
Comment 3 Mark A. Hershberger 2007-11-13 18:45:59 UTC
ubuntu
Copy of the bug: https://bugs.edge.launchpad.net/ubuntu/+source/gnucash/+bug/162236
Comment 4 Andreas Köhler 2007-11-18 23:16:31 UTC
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!
Comment 5 Mark A. Hershberger 2007-11-23 04:43:56 UTC
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.
Comment 6 Josh Sled 2007-11-27 15:00:00 UTC
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.
Comment 7 Mark A. Hershberger 2007-11-27 20:17:16 UTC
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.
Comment 8 Josh Sled 2007-12-15 22:20:55 UTC
Yeah ... I have another datafile from a different user that exhibits a similar problem, eventually resulting in memory corruption (likely double-freeing).
Comment 9 Josh Sled 2007-12-16 16:05:23 UTC
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.
Comment 10 Josh Sled 2007-12-16 17:19:41 UTC
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.
Comment 11 Andreas Köhler 2007-12-16 18:42:36 UTC
branches/2.2@r16672.

Thanks a lot!
Comment 12 John Ralls 2018-06-29 21:54:16 UTC
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.