GNOME Bugzilla – Bug 672760
Postponed transaction applied invalid date, causing segfault upon opening data file
Last modified: 2018-06-29 23:07:37 UTC
Created attachment 210522 [details] Details of failure screenshot I postponed a transaction in the "Since Last Run" window. GC continued to work normally until I closed the file. Upon reopening that data file, the program would crash immediately. I ran GC (2.4.7) in Linux to test via a terminal, and it segfaulted. I ran a trace and found the following error: 13:35:18 CRIT <GLib> g_date_new_dmy: assertion `g_date_valid_dmy (day, m, y)' failed As my data file is SQLite, I opened the file and looked for any invalid date fields. Slots was normal, but the scheduled transactions contained an erroneous line. The attached screenshot shows the offending entry. After changing this manually, the file opens as normal in Linux. I have the file on a shared drive, so I closed in Linux and tried to open it in OSX (2.4.9). I then get the libdbi error message and the file still will not open. I looked at the listed bug in the error message but it was not helpful for my purposes.
Thank you for your report. GnuCash 2.4.x however is no longer supported. Can you still reproduce this crash with gnucash 2.6.3 ?
This is confirmed in the maint branch thanks to a report to the mailing list from Peter Kiessling, though perhaps with a different root cause: In this case setting a transaction to run "until" some date also causes it to retrieve invalid dates. I can fix the crash, but the fix bypasses painting the transaction dates on the calendar.
Nope, I'm wrong: The cause was the same, it's just that changing the end to forever or 1 instance or something masked the problem. When I looked at the actual SX record in the file I found: <sx:deferredInstance> <sx:last> <gdate>3924-07-17</gdate> </sx:last> <sx:rem-occur>1953068037</sx:rem-occur> <sx:instanceCount>25964</sx:instanceCount> </sx:deferredInstance> Removing it by hand allows the SX editor to load without error.
This problem has been fixed in our software repository. The fix will go into the next software release. Thank you for your bug report. It was a memory issue, no surprise. See afaec37 for details.
*** Bug 677651 has been marked as a duplicate of this bug. ***
*** Bug 543212 has been marked as a duplicate of this bug. ***
*** Bug 680036 has been marked as a duplicate of this bug. ***
*** Bug 729065 has been marked as a duplicate of this bug. ***
Reassign version to 2.4.x so that individual 2.4 versions can be retired.
GnuCash bug tracking has moved to a new Bugzilla host. This bug has been copied to https://bugs.gnucash.org/show_bug.cgi?id=672760. Please update any external references or bookmarks.