GNOME Bugzilla – Bug 794934
GNUCash 3.0 crashes at startup: "g_convert: assertion 'str != NULL' failed"
Last modified: 2018-06-30 00:06:51 UTC
Created attachment 370489 [details] gnucash.trace file After upgrading my installation of GNUCash on Windows 10 to version 3.0, GNUCash started crashing at start-up. In the generated log file, the following message is recorded: * 11:04:44 MESSG <gnc.bin> loading stylesheets * 11:04:44 CRIT <GLib> g_convert: assertion 'str != NULL' failed
I apologize if the log file does not provide enough information. I could not, however, find any instructions on how to make GNUCash provide more information about the error (like a stack-trace). If there is any way I can make GNUCash record more information on the error, please let me know, so that I can try generating a more helpful log file.
Open a command window, either CMD or Powershell will work fine. At the prompt, type "C:\Program Files (x86)\gnucash\bin\gnucash.exe" --debug --extra The resulting log file may be big, so compress it, preferably with gzip or plain zip, before uploading. Stack traces are hard on Windows unless you happen to have Mingw-w64 or Cygwin installed.
(In reply to John Ralls from comment #2) > Open a command window, either CMD or Powershell will work fine. > At the prompt, type > "C:\Program Files (x86)\gnucash\bin\gnucash.exe" --debug --extra > The resulting log file may be big, so compress it, preferably with gzip or > plain zip, before uploading. > > Stack traces are hard on Windows unless you happen to have Mingw-w64 or > Cygwin installed. The log file I've attached before was already generated using the --debug and --extra options.
Created attachment 370501 [details] Output from Dr. Mingw I tried to compile a debug version of GNUCash on Windows, but had no success in doing it. Searching for diagnostic options on the internet, I found a program called Dr. Mingw, which managed to produce an "Access Violation [...] Reading from location" diagnostic and some stack-trace. I'm attaching its output here.
Interesting utility. I'll have to experiment with that a bit, it looks like it might be an improvement over having users install mingw-w64 and running gdb. Anyway, there isn't enough debug info to get a good backtrace, but the function that it's reporting the crash in is used in only two places and one of them wouldn't get called until the GUI had started, so it's a really good clue. Where it seems to be crashing in in creating menu extensions for reports. Do you have either any custom Scheme reports or saved report configurations? If so, try moving them out of the way by renaming config.user and/or saved-reports-2.4 in <userdir>\AppData\Roaming\GnuCash. If you have both, extra credit for renaming one at a time so that we can tell which one is crashing.
(In reply to John Ralls from comment #5) > Interesting utility. I'll have to experiment with that a bit, it looks like > it might be an improvement over having users install mingw-w64 and running > gdb. > > Anyway, there isn't enough debug info to get a good backtrace, but the > function that it's reporting the crash in is used in only two places and one > of them wouldn't get called until the GUI had started, so it's a really good > clue. > > Where it seems to be crashing in in creating menu extensions for reports. Do > you have either any custom Scheme reports or saved report configurations? If > so, try moving them out of the way by renaming config.user and/or > saved-reports-2.4 in <userdir>\AppData\Roaming\GnuCash. If you have both, > extra credit for renaming one at a time so that we can tell which one is > crashing. I had some saved report configurations yes. I don't known, however, what a "custom Scheme" is, so I hope I haven't unintentionally messed up with any of this while using GNUCash. :-) I went to "%APPDATA%\GnuCash" and only found a "saved-reports-2.4" file there, but no "config.user". I renamed it and GNUCash now starts correctly.
Very good! Could you attach it?
Created attachment 370600 [details] Problematic saved-reports-2.4
Same issue, delete saved reports fixed it. I'll attach the files.
Created attachment 370732 [details] Causes crash on Windows 10 at startup. From profile. Deleting this file fixed the startup issue.
Changing in the Sytem settings the codepage from Microsofts CP1252 to UTF-8 should solve the issue.
Correction: Should (may?) work around the issue. We need to do whatever is necessary to always write and read our data as utf-8 on Windows.
For me, replacing the non-ASCII characters for ASCII in the saved-reports-2.4 file made GnuCash work with my custom reports!
Thanks for taking the time to report this. This particular bug has already been reported into our bug tracking system, but we are happy to tell you that the problem has already been fixed. It should be solved in the next software version - 3.1. You may want to check for a software upgrade provided by your Linux distribution. *** This bug has been marked as a duplicate of bug 795039 ***
GnuCash bug tracking has moved to a new Bugzilla host. This bug has been copied to https://bugs.gnucash.org/show_bug.cgi?id=794934. Please update any external references or bookmarks.