Created attachment 373099 [details] Debug Trace File 1) Recently upgraded to 3.4+ from 2.16+ 2) Tested and was able to reproduce with a newly created database file Steps to Reproduce: 1) Select an entry you wish to print a check for from either a new gnucash file or an existing file 2) File -> Print Checks -> Check Format: Custom -> Custom format tab -> Save Format button 3) Name the custom format to be saved 4) GnuCash Crashes while saving the format 5) Try re-launching GnuCash 6) Select an entry you wish to print a check for from either a new gnucash file or an existing file 7) File -> Print Checks 8) GnuCash Crashes Alternatively, instead of trying to save a custom format from inside GnuCash create a custom format file by hand. Try opening the Print Checks dialog in GnuCash and it crashes. See attached trace file.
Agree in v3.4, Win10 as soon as I click 'Print Checks' it crashes. The first time a warning appeared: "The GUIDs in the XXX check format file 'XXX' and the XXX check format file 'XXX' match. The subsequent times no warning is shown. I don't usually use check printing. Tracefiles: 1. * 08:49:48 WARN <gnc.app-utils> Could not spawn perl: Failed to execute child process (No such file or directory) * 08:50:15 WARN <gnc.backend> [GncXmlBackend::session_begin()] Might clobber, no force * 08:50:38 WARN <gnc.printing.checks> Check file CPA 006 Middle ASAP.chk, group Check Items, key Blocking_Chars_1, error: Key file contains key “Blocking_Chars_1” which has a value that cannot be interpreted. * 08:50:38 WARN <gnc.printing.checks> Check file CPA 006 Middle ASAP.chk, group Check Items, key Blocking_Chars_2, error: Key file contains key “Blocking_Chars_2” which has a value that cannot be interpreted. * 08:50:38 WARN <gnc.printing.checks> Check file CPA 006 Middle ASAP.chk, group Check Items, key DateFormat_2, error: Key file contains key “DateFormat_2” which has a value that cannot be interpreted. 2. * 08:50:59 WARN <gnc.app-utils> Could not spawn perl: Failed to execute child process (No such file or directory) * 08:51:29 WARN <gnc.printing.checks> Check file CPA 006 Middle ASAP.chk, group Check Items, key Blocking_Chars_1, error: Key file contains key “Blocking_Chars_1” which has a value that cannot be interpreted. * 08:51:29 WARN <gnc.printing.checks> Check file CPA 006 Middle ASAP.chk, group Check Items, key Blocking_Chars_2, error: Key file contains key “Blocking_Chars_2” which has a value that cannot be interpreted. * 08:51:29 WARN <gnc.printing.checks> Check file CPA 006 Middle ASAP.chk, group Check Items, key DateFormat_2, error: Key file contains key “DateFormat_2” which has a value that cannot be interpreted.
(In reply to Ben Franske from comment #0) > 1) Recently upgraded to 3.4+ from 2.16+ Correction, upgrade was from 2.6.16+
This happens to me also. I have a custom format I have been using for a few years now with no problems. Upon upgrading from version 3.3, Guncash crashes when I try to use this format.
I have the same problem. Just upgraded to 3.4+ (2018-12-30) running widows 7 64 bit. I removed all custom checks in C:\Users\admin\.gnucash\checks directory and it still crashes. I need to print checks. Any suggestions. I can print report just fine.
As this bug was introduced between gnucash 3.3 and 3.4, your best workaround so far is probably to reinstall gnucash 3.3.
Can someone attach a sample custom check format here to experiment with ? Apart from that I have found and fixed a use-memory-after-free issue in that same code. If you can please test with tomorrow's nightly build and report whether that improves the situation. The Windows nightly builds can be found here: https://code.gnucash.org/builds/win32/maint/
Yes, I've rolled back to 3.3 for now. Sure, I will attach a custom format but also there is a GUI method for saving a custom format which will also cause the crash to start (see my "Steps to Reproduce" in my original report).
Created attachment 373152 [details] Sample custom check which crashes Requested sample custom check file which will cause the crash
(In reply to Ben Franske from comment #7) > Yes, I've rolled back to 3.3 for now. Sure, I will attach a custom format > but also there is a GUI method for saving a custom format which will also > cause the crash to start (see my "Steps to Reproduce" in my original report). Right. I forgot to mention that I did test this before and after my fix. I can reproduce this crash before the fix even on Fedora linux, but I don't see any crash via these steps after the fix. So I'll wait for feedback on tomorrow's nightly build (I don't have access to a windows system to test for myself).
I rolled back to 2.6.21. I will try nightly build this weekend
Check printing crashed for me last night, but works now. I think your fix may have solved the problem, Geert. I don't think a custom check format was required to cause this crash. It crashed for me even after I removed all my custom formats. I suspect that removing the custom checks simply changed things enough to avoid the crash. That's not uncommon with use-after-free bugs. They may or may not cause a crash, apparently randomly. Also GnuCash seems to find custom checks in GNC_DATA_HOME/checks. I just printed a custom check from that directory. I've been doing that for years and I don't think anything changed to make it stop looking at that directory.
I installed gnucash-3.4-2019-02-02-git-3.4-70-g0da0f7ada+.setup.exe and it does not crash when I go to File > Print checks. The problem is that it only shows me the built in check formats. It is not picking up any of my custom checks in C:\Users\admin\.gnucash\checks directory.
I don't run GnuCash on Windows, but are you sure that is the right place? According to my reading of https://wiki.gnucash.org/wiki/Configuration_Locations the local checks directory on Windows should be %APPDATA%\GnuCash\checks where %APPDATA% is probably C:\Users\admin\AppData\Roaming for you. If that doesn't work try C:\Users\admin\AppData\Local\checks. At any rate, I think this is a separate problem and not related to the crash that is the subject of this report.
No crashes and custom checks now show. Thanks
C:\Users\admin\.gnucash\checks is the location for custom checks in gnucash 2.6 and before. The new location is what Mike suggests in comment 13. Normally gnucash should have migrated them for you, but the first few releases in the GnuCash 3.x series failed to do so (and at the same time prevent newer releases from reattempting). That may have been why your checks are still in the old directory on your system. Thanks for confirming the crash is gone. So with that I'll close the report.
*** Bug 797128 has been marked as a duplicate of this bug. ***