GNOME Bugzilla – Bug 784632
Importing of at least OFX, QIF, QFX, CSV on Windows results in a crash (in glib?). (Regression?)
Last modified: 2018-06-29 23:57:55 UTC
Created attachment 355035 [details] offending ofx file I am unable to import either OFX, QFX, QIF, or CSV exported from Citi cards with 2.6.17. All attempts with formats mentioned but CSV result in a crash when "Select Account" window is about to be rendered. CSV goes a bit further, allowing me to set mapping and crashes when I see imported transactions. I do not have debug build at hand, but my gut feeling is that this might be related to different underlying libraries being shipped with Windows build. The problem persists with brand new xml storage as I thought that might was messed up somehow. P.S. I am somewhat not sure whether something changed within Citi. Usually I use AqBanking etc, but it shows "Direct debit;" prepended to every transaction. So I decided to try manual import. I did not have either of these problems with previous GnuCash versions. P.P.S. I'm running Windows 10 Pro Insider Preview build 16232 (64 bit). > ntdll.dll!77def0ec() Unknown [Frames below may be incorrect and/or missing, no symbols loaded for ntdll.dll] [External Code] libglib-2.0-0.dll!685f1b51() Unknown libglib-2.0-0.dll!685f2005() Unknown libgtk-win32-2.0-0.dll!617d1013() Unknown libgncmod-generic-import.dll!6df81d66() Unknown libgncmod-ofx.dll!0a4b3010() Unknown libofx-6.dll!0a4c3b1d() Unknown libofx-6.dll!0a4cbbbe() Unknown libofx-6.dll!0a4c9c95() Unknown libofx-6.dll!0a4ea072() Unknown libosp-5.dll!0a7413d6() Unknown libosp-5.dll!0a787f74() Unknown libosp-5.dll!0a78c871() Unknown libosp-5.dll!0a74fd37() Unknown libosp-5.dll!0a74209b() Unknown libofx-6.dll!0a4e4bba() Unknown libofx-6.dll!0a4c7d97() Unknown
The "Direct Debit;" noise is due to https://github.com/Gnucash/gnucash/pull/139 bleeding over into OFX. For a workaround you can edit C:\Program Files (x86)\gnucash\share\glib-2.0\schemas\gnucash\ src/import-export/aqb/gschemas/org.gnucash.dialogs.import.hbci.gschema.xml line 24, changing "true" to "false". I was able to import your OFX file into GnuCash 2.6.17 on Windows 10 without trouble. Is the stack trace for the csv or ofx crash?
Do earlier versions of GnuCash work? The last change of underlying libs on the Windows build was a year ago.
I was wrong about regression. I tried all the way till 2.6.10. They do not work on Windows 10 Pro Insider Preview. 2.6.17 works alright on Windows 7 Enterprise SP1 (64 bit). I guess I'll have to build it to get a detailed stack trace unless I can get a binary with symbols from somewhere...
> Is the stack trace for the csv or ofx crash? That was for OFX in particular.
A follow up on comment 1: There's a preference setting called "Use Non-SWIFT transaction text" in Preferences>Online Banking. Deselect it and the noise goes away on future imports.
Program received signal SIGSEGV, Segmentation fault. 0x7757f0ec in ?? () (gdb) bt
+ Trace 237625
And here is the trace for CSV import. Everything goes well until I close that import wizard window. Program received signal SIGSEGV, Segmentation fault. 0x7757f0ec in ?? () (gdb) bt
+ Trace 237626
Both stack-smashes like Gwenhywfar in bug 781476 . Can you build glib yourself? If so, try building it with -fno-omit-frame-pointer.
I confirm, it looks like it is working with -fno-omit-frame-pointer. Here is what I did. 1) I got https://gensho.ftp.acc.umu.se/pub/gnome/sources/glib/2.42/glib-2.42.2.tar.xz so that I would not have to rebuild the rest thank to shared objects (dll). And unpacked it into /c/gcdev/123/glib-2.42.2 2) From there, I did PKG_CONFIG=/c/gcdev/gnome/bin/pkg-config CC="gcc -ggdb3" CFLAGS="-fno-omit-frame-pointer -O0" ./configure --enable-debug=yes --prefix=c:/gcdev/gnome The reason for -Og is because of https://sourceforge.net/p/mingw/bugs/2322/ as I found at http://trac.wxwidgets.org/ticket/17762#comment:9 . Otherwise there is no _strnicmp and alike. 3) PATH=$PATH:/c/gcdev/gnome/bin make install
I messed up the configure line in the previous message. It should read as PKG_CONFIG=/c/gcdev/gnome/bin/pkg-config CC="gcc -ggdb3" CFLAGS="-Og -fno-omit-frame-pointer" ./configure --enable-debug=yes --prefix=c:/gcdev/gnome Note -Og instead of -O0. It does not build with the latter. P.S. /c/gcdev/gnome/bin is on the PATH for glib-compile-resources.exe dependencies during the make step. Here is the error produced due to gcc bug (?) I mentioned CC libglib_2_0_la-gconvert.lo In file included from gconvert.c:33:0: win_iconv.c: In function 'make_csconv': win_iconv.c:914:9: error: implicit declaration of function '_stricmp' [-Werror=implicit-function-declaration] if (_stricmp(p + 2, "nocompat") == 0) ^ win_iconv.c: In function 'name_to_codepage': win_iconv.c:1007:5: error: implicit declaration of function '_strnicmp' [-Werror=implicit-function-declaration] else if (_strnicmp(name, "cp", 2) == 0) ^ cc1.exe: some warnings being treated as errors make[4]: *** [libglib_2_0_la-gconvert.lo] Error 1 P.P.S. C:\gcdev\gnucash\build\bin\gnucash-launcher.cmd misses another set PATH=c:\gcdev\icu-mingw32\lib;%PATH% . I guess it is C:\gcdev\gnucash-on-windows.git\install-impl.sh to patch. Other than this and -DCMAKE_BUILD_TYPE=Debug , gnucash-on-windows does magic building things!
I apologize for making the noise. Apparently I got yet another update for Windows Insider to build 16237. Original GnuCash 2.6.17 imports things just as fine. There is no way for me to rollback changes AFAIK :( I'll keep updating if things happen again. P.S. Thanks for AqBanking settings tip. No noise in import anymore.
I guess I shouldn't be surprised that it's a Windows problem, but that kind of thing makes life pretty difficult for application developers, especially those not using Microsoft's tools... though I suppose Microsoft has an interest in discouraging them. The _stricmp/_strncmp errors being present only in unoptimized code is weird. -fno-anything and -O0 is redundant. -O0 turns off all optimizations, and with gcc later optimization flags override earlier ones, so -fno-omit-frame-pointer -Og either turns omit-frame-pointer back on or -fno-omit-frame-pointer doesn't do anything because -Og doesn't turn it on anyway. The gcc documentation doesn't list what -Og turns on and I don't feel like wading through their source code to figure it out. What I actually wanted you to try was -fno-omit-frame-pointer with otherwise default (-O2) optimization, which you'd do either by not specifying a -Ox flag or by saying -O2 -fno-omit-frame-pointer. All moot now, of course.
GnuCash bug tracking has moved to a new Bugzilla host. This bug has been copied to https://bugs.gnucash.org/show_bug.cgi?id=784632. Please update any external references or bookmarks.