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 794934 - GNUCash 3.0 crashes at startup: "g_convert: assertion 'str != NULL' failed"
GNUCash 3.0 crashes at startup: "g_convert: assertion 'str != NULL' failed"
Status: RESOLVED DUPLICATE of bug 795039
Product: GnuCash
Classification: Other
Component: Windows
3.0
Other Windows
: Normal blocker
: future
Assigned To: gnucash-win-maint
gnucash-win-maint
Depends on:
Blocks:
 
 
Reported: 2018-04-03 15:18 UTC by tmanhente
Modified: 2018-06-30 00:06 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
gnucash.trace file (1.98 KB, text/plain)
2018-04-03 15:18 UTC, tmanhente
Details
Output from Dr. Mingw (1.65 KB, text/plain)
2018-04-03 21:30 UTC, tmanhente
Details
Problematic saved-reports-2.4 (27.11 KB, text/plain)
2018-04-06 15:24 UTC, tmanhente
Details
Causes crash on Windows 10 at startup. (6.57 KB, text/plain)
2018-04-10 14:17 UTC, HRamthun
Details

Description tmanhente 2018-04-03 15:18:56 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
Comment 1 tmanhente 2018-04-03 15:23:03 UTC
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.
Comment 2 John Ralls 2018-04-03 16:04:38 UTC
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.
Comment 3 tmanhente 2018-04-03 16:52:04 UTC
(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. 
Comment 4 tmanhente 2018-04-03 21:30:13 UTC
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.
Comment 5 John Ralls 2018-04-05 22:50:58 UTC
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.
Comment 6 tmanhente 2018-04-06 15:18:31 UTC
(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.
Comment 7 John Ralls 2018-04-06 15:21:45 UTC
Very good! Could you attach it?
Comment 8 tmanhente 2018-04-06 15:24:09 UTC
Created attachment 370600 [details]
Problematic saved-reports-2.4
Comment 9 HRamthun 2018-04-10 14:13:29 UTC
Same issue, delete saved reports fixed it. I'll attach the files.
Comment 10 HRamthun 2018-04-10 14:17:09 UTC
Created attachment 370732 [details]
Causes crash on Windows 10 at startup.

From profile. Deleting this file fixed the startup issue.
Comment 11 Frank H. Ellenberger 2018-04-10 16:27:47 UTC
Changing in the Sytem settings the codepage from Microsofts CP1252 to UTF-8 should solve the issue.
Comment 12 John Ralls 2018-04-10 16:49:48 UTC
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.
Comment 13 GTI 2018-04-10 23:31:32 UTC
For me, replacing the non-ASCII characters for ASCII in the saved-reports-2.4 file made GnuCash work with my custom reports!
Comment 14 Geert Janssens 2018-04-28 14:59:53 UTC
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 ***
Comment 15 John Ralls 2018-06-30 00:06:51 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=794934. Please update any external references or bookmarks.