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 389740 - crash on QIF import with german umlaut (guile-1.8)
crash on QIF import with german umlaut (guile-1.8)
Status: VERIFIED FIXED
Product: GnuCash
Classification: Other
Component: Import - QIF
2.0.x
Other Linux
: Normal critical
: ---
Assigned To: Derek Atkins
Derek Atkins
: 389983 394783 397137 411365 412216 412696 416910 418992 419472 422283 423070 424882 425468 427783 428359 428403 428776 429696 434077 434197 434695 435676 439362 441123 441929 442434 445751 446742 448549 450685 453515 454821 457586 473118 477028 477699 495014 498552 507132 (view as bug list)
Depends on:
Blocks:
 
 
Reported: 2006-12-26 14:38 UTC by Andreas Hölscher
Modified: 2018-06-29 21:19 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
test QIF file (224 bytes, text/plain)
2006-12-27 15:06 UTC, Andreas Hölscher
Details
/temp/gnucash.trace (1.61 KB, text/plain)
2006-12-27 15:07 UTC, Andreas Hölscher
Details
trace for gnucash-2.0.3 (1.76 KB, text/plain)
2007-01-02 11:49 UTC, Andreas Hölscher
Details

Description Andreas Hölscher 2006-12-26 14:38:43 UTC
GnuCash:gnucash-2.0.2-34.i586.rpm (r14936 2006-12-22) crash with QIF file import with german umlaut (äöüÄÖÜß). QIF example:
!Type:Bank
D18.12.06
T-0,01
MDT ZAHNÄRZTL. RECHENZENTRUM: RG-NR xxxx/12 A. HÖLSCHER DATUM 16.12.2006, 18.40 UHR 1.TAN 123456
PDT ZAHNÄRZTL. RECHENZENTRUM: RG-NR xxxx/12 A. HÖLSCHER DATUM 16.12.2006, 18.40 UHR 1.TAN 123456
^
Comment 1 Derek Atkins 2006-12-26 15:09:02 UTC
Hi.

A couple of questions:

1) HOW does it crash?  What's the stack trace?
2) Is the QIF file in ISO-8859-1 or UTF-8?
Comment 2 Andreas Hölscher 2006-12-27 11:43:47 UTC
sorry for the missing information:
1) on console: "throw from within critical section." I installed bug-buddy and it send the bug report 389983 (I hope this is what you call a stack trace. I am not a programmer)
2) I'm not sure how to find out. Some enviroment variables:
RC_LANG: de_DE@euro (all RC_LC*: undefined)
CONSOLE_ENCODING: UTF-8
AUTO_DETECT_UTF8: no

Thank you for the very quick response!
Comment 3 Derek Atkins 2006-12-27 13:34:56 UTC
Hi,

No, that's not what I meant in this case...  In THIS case what I was hoping for what the "scheme" backtrace that should have been printed in the terminal where you started gnucash.

The stack trace in bug #389983 shows me that the scheme interpreter is throwing an exception, but I need to see the actual exception that it threw.  This would either get printed into the terminal where you started gnucash, or MAYBE printed into /tmp/gnucash.trace.  But more likely it would be printed on the terminal.

As for the QIF encoding, what do you get from:

  file /path/to/file.qif

(not that that would tell us completely), but it's at least a hint.
Comment 4 Andreas Hölscher 2006-12-27 15:06:26 UTC
Created attachment 78943 [details]
test QIF file
Comment 5 Andreas Hölscher 2006-12-27 15:07:24 UTC
Created attachment 78944 [details]
/temp/gnucash.trace
Comment 6 Andreas Hölscher 2006-12-27 15:08:46 UTC
I attached a test QIF file and the stack trace from /tmp/gnucash.trace

I think the file command is of no help:
/home/ah # file Giro-Konto.qif
Giro-Konto.qif: Assembler source
Comment 7 Derek Atkins 2006-12-27 15:12:36 UTC
Yeah, no help at all.

So nothing was printed on the terminal where you run "gnucash &"?
Comment 8 Andreas Hölscher 2006-12-27 15:13:59 UTC
Hi Derek,
yes, that's right, only: "throw from within critical section."
Comment 9 Derek Atkins 2006-12-27 15:27:56 UTC
Hmm.  I can't reproduce this problem.  When I try with either 2.0 or trunk the import succeeds just fine.  I do see the "invalid UTF8" but no crashes.

I'm using FC5, with guile-1.6.7-8.fc5
Comment 10 Andreas Hölscher 2006-12-27 15:33:19 UTC
How can I help to find the problem?
(SuSE 10.2, guile-1.8.1-24)

With older versions (the one that came with SuSE 10.1) I had no problem with umlauts.
Comment 11 Derek Atkins 2006-12-27 15:43:31 UTC
Um...  I'm afraid my scheme skills aren't that strong.  If you were able to extract a Scheme Backtrace then maybe I'd have a hint of where to look.  I'll see what I can test on an FC6 VM I've got.
Comment 12 Christian Stimming 2007-01-02 10:29:15 UTC
There was a crash in QIF import with guile-1.8 (as present on opensuse 10.2) that has been fixed in gnucash-2.0.3. Can you please upgrade and check again? Thanks.
Comment 13 Christian Stimming 2007-01-02 10:38:24 UTC
*** Bug 389983 has been marked as a duplicate of this bug. ***
Comment 14 Andreas Hölscher 2007-01-02 11:49:02 UTC
I installed ftp://ftp.gwdg.de/pub/linux/misc/suser-crauch/10.2/RPMS/i686/gnucash-2.0.3-0.rauch.1.i686.rpm
This version crashes as soon as I press the ok button to acknowledge the qif file to import. I will attach gnucash.trace.

The version 2.0.2 crashed later after doing all the account assignments.

Normally my qif files are in iso8859-15. If I convert them to UTF-8 (iconv) there is no problem with the import function.
Comment 15 Andreas Hölscher 2007-01-02 11:49:52 UTC
Created attachment 79173 [details]
trace for gnucash-2.0.3
Comment 16 Andreas Hölscher 2007-01-02 11:51:38 UTC
forgot to mention guile is:
guile-1.8.1-24
Comment 17 Andreas Hölscher 2007-01-03 20:32:01 UTC
I installed the new release 2.0.4:
ftp://ftp.gwdg.de/pub/linux/misc/suser-crauch/10.2/RPMS/i686/gnucash-2.0.4-0.rauch.1.i686.rpm
same behavior as with 2.0.3: crash as soon as I choose the qif file for import
Comment 18 Derek Atkins 2007-01-03 20:39:27 UTC
I still cannot reproduce this here with FC5 and guile 1.6.7
Comment 19 Andrew Rose 2007-01-17 13:36:12 UTC
Does not reproduce on r15387 on Windows XP.
Comment 20 Christian Stimming 2007-02-28 13:13:17 UTC
*** Bug 412696 has been marked as a duplicate of this bug. ***
Comment 21 Christian Stimming 2007-03-02 21:47:45 UTC
*** Bug 411365 has been marked as a duplicate of this bug. ***
Comment 22 Christian Stimming 2007-03-02 21:48:18 UTC
*** Bug 412216 has been marked as a duplicate of this bug. ***
Comment 23 Christian Stimming 2007-03-12 08:55:00 UTC
*** Bug 416910 has been marked as a duplicate of this bug. ***
Comment 24 Christian Stimming 2007-03-27 07:55:09 UTC
*** Bug 418992 has been marked as a duplicate of this bug. ***
Comment 25 Christian Stimming 2007-03-27 07:55:27 UTC
*** Bug 419472 has been marked as a duplicate of this bug. ***
Comment 26 Christian Stimming 2007-03-27 07:55:48 UTC
*** Bug 422283 has been marked as a duplicate of this bug. ***
Comment 27 Christian Stimming 2007-03-27 07:55:59 UTC
*** Bug 423070 has been marked as a duplicate of this bug. ***
Comment 28 Christian Stimming 2007-04-02 08:20:00 UTC
*** Bug 424882 has been marked as a duplicate of this bug. ***
Comment 29 Christian Stimming 2007-04-02 15:20:28 UTC
*** Bug 425468 has been marked as a duplicate of this bug. ***
Comment 30 Christian Stimming 2007-04-10 19:49:24 UTC
*** Bug 427783 has been marked as a duplicate of this bug. ***
Comment 31 Christian Stimming 2007-04-10 20:00:20 UTC
*** Bug 428359 has been marked as a duplicate of this bug. ***
Comment 32 Christian Stimming 2007-04-11 07:41:50 UTC
*** Bug 428403 has been marked as a duplicate of this bug. ***
Comment 33 Christian Stimming 2007-04-12 08:05:48 UTC
*** Bug 428776 has been marked as a duplicate of this bug. ***
Comment 34 peter.faric 2007-04-12 20:51:36 UTC
Hi!

I have the same problem with FC6, gnucash-2.0.5-1.fc6 and guile-1.8.0-8.20060831cvs on an x86 with all updates. Everything was installed with yum from the base and updates repository. 

My bank generates a .qif and I try to import it. It crashes after pressing the forward button at the dialog where i choose my currency (EURO). It is reproducable every time. I have installed bug buddy and the details of it are pasted at the bottom.

WORKAROUND: I have found that it crashes only if there is a special character in the .qif (in my case these are central european - ISO8859-2 or CP1250). So I removed the special characters and it worked (but i think only because when i saved the file it saved it as utf8). Then i tried converting the .qif file to UTF8 with: iconv --from-code=CP1250 --to-code=UTF-8 filename.qif -o filename_utf8.qif and it worked too. So Andreas Hölscher could also try converting it from his encoding to utf8 and see if it works.

I hope this helps. 

P.S.: Sorry for the long thread...


This is what i get in the terminal:
-----------------------------------
[peterf@dfg ~]$ gnucash
throw from within critical section.


BUG-BUDDY details:
---------------------------------------------
Distribution: Fedora Core release 6 (Zod)
Gnome Release: 2.16.3 2007-01-31 (Red Hat, Inc)
BugBuddy Version: 2.16.0

System: Linux 2.6.20-1.2933.fc6 #1 SMP Mon Mar 19 11:38:26 EDT 2007 i686
X Vendor: The X.Org Foundation
X Vendor Release: 70101000
Selinux: Enforcing
Accessibility: Disabled

Memory status: size: 121458688 vsize: 0 resident: 121458688 share: 0 rss: 45539328 rss_rlim: 0
CPU usage: start_time: 1176409926 rtime: 0 utime: 1065 stime: 0 cutime:1025 cstime: 0 timeout: 40 it_real_value: 0 frequency: 9

Backtrace was generated from '/usr/bin/gnucash'

(no debugging symbols found)
Using host libthread_db library "/lib/libthread_db.so.1".
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
[Thread debugging using libthread_db enabled]
[New Thread -1208174896 (LWP 26279)]
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
0x00a83402 in __kernel_vsyscall ()

Thread 1 (Thread -1208174896 (LWP 26279))

  • #0 __kernel_vsyscall
  • #1 __waitpid_nocancel
    from /lib/libpthread.so.0
  • #2 gnome_gtk_module_info_get
    from /usr/lib/libgnomeui-2.so.0
  • #3 <signal handler called>
  • #4 __kernel_vsyscall
  • #5 raise
    from /lib/libc.so.6
  • #6 abort
    from /lib/libc.so.6
  • #7 scm_ithrow
    from /usr/lib/libguile.so.17
  • #8 scm_error_scm
    from /usr/lib/libguile.so.17
  • #9 scm_error
    from /usr/lib/libguile.so.17
  • #10 scm_misc_error
    from /usr/lib/libguile.so.17
  • #11 scm_to_locale_stringn
    from /usr/lib/libguile.so.17
  • #12 scm_to_locale_string
    from /usr/lib/libguile.so.17
  • #13 scm_regexp_exec
    from /usr/lib/libguile.so.17
  • #14 scm_gsubr_apply
    from /usr/lib/libguile.so.17
  • #15 scm_dapply
    from /usr/lib/libguile.so.17
  • #16 scm_m_generalized_set_x
    from /usr/lib/libguile.so.17
  • #17 scm_m_generalized_set_x
    from /usr/lib/libguile.so.17
  • #18 scm_m_generalized_set_x
    from /usr/lib/libguile.so.17
  • #19 scm_m_generalized_set_x
    from /usr/lib/libguile.so.17
  • #20 scm_dapply
    from /usr/lib/libguile.so.17
  • #21 scm_apply
    from /usr/lib/libguile.so.17
  • #22 scm_call_1
    from /usr/lib/libguile.so.17
  • #23 scm_srfi1_for_each
    from /usr/lib/libguile-srfi-srfi-1-v-3.so
  • #24 scm_m_generalized_set_x
    from /usr/lib/libguile.so.17
  • #25 scm_m_generalized_set_x
    from /usr/lib/libguile.so.17
  • #26 scm_dapply
    from /usr/lib/libguile.so.17
  • #27 scm_apply
    from /usr/lib/libguile.so.17
  • #28 scm_call_0
    from /usr/lib/libguile.so.17
  • #29 scm_body_thunk
    from /usr/lib/libguile.so.17
  • #30 scm_c_with_throw_handler
    from /usr/lib/libguile.so.17
  • #31 scm_internal_lazy_catch
    from /usr/lib/libguile.so.17
  • #32 scm_lazy_catch
    from /usr/lib/libguile.so.17
  • #33 scm_m_generalized_set_x
    from /usr/lib/libguile.so.17
  • #34 scm_dapply
    from /usr/lib/libguile.so.17
  • #35 scm_apply
    from /usr/lib/libguile.so.17
  • #36 scm_call_0
    from /usr/lib/libguile.so.17
  • #37 scm_body_thunk
    from /usr/lib/libguile.so.17
  • #38 scm_c_catch
    from /usr/lib/libguile.so.17
  • #39 scm_catch_with_pre_unwind_handler
    from /usr/lib/libguile.so.17
  • #40 scm_gsubr_apply
    from /usr/lib/libguile.so.17
  • #41 scm_dapply
    from /usr/lib/libguile.so.17
  • #42 scm_m_generalized_set_x
    from /usr/lib/libguile.so.17
  • #43 scm_dapply
    from /usr/lib/libguile.so.17
  • #44 scm_apply
    from /usr/lib/libguile.so.17
  • #45 gnc_ui_qif_import_druid_get_mappings
    from /usr/lib/gnucash/libgncmod-qif-import.so.0
  • #46 gnc_ui_qif_import_druid_get_mappings
    from /usr/lib/gnucash/libgncmod-qif-import.so.0
  • #47 gnome_ice_init
    from /usr/lib/libgnomeui-2.so.0
  • #48 g_closure_invoke
    from /lib/libgobject-2.0.so.0
  • #49 g_signal_chain_from_overridden
    from /lib/libgobject-2.0.so.0
  • #50 g_signal_emit_valist
    from /lib/libgobject-2.0.so.0
  • #51 g_signal_emit
    from /lib/libgobject-2.0.so.0
  • #52 gnome_druid_page_next
    from /usr/lib/libgnomeui-2.so.0
  • #53 gnome_druid_new
    from /usr/lib/libgnomeui-2.so.0
  • #54 g_cclosure_marshal_VOID__VOID
    from /lib/libgobject-2.0.so.0
  • #55 g_closure_invoke
    from /lib/libgobject-2.0.so.0
  • #56 g_signal_chain_from_overridden
    from /lib/libgobject-2.0.so.0
  • #57 g_signal_emit_valist
    from /lib/libgobject-2.0.so.0
  • #58 g_signal_emit
    from /lib/libgobject-2.0.so.0
  • #59 gtk_button_clicked
    from /usr/lib/libgtk-x11-2.0.so.0
  • #60 gtk_button_set_alignment
    from /usr/lib/libgtk-x11-2.0.so.0
  • #61 g_cclosure_marshal_VOID__VOID
    from /lib/libgobject-2.0.so.0
  • #62 g_value_set_static_boxed
    from /lib/libgobject-2.0.so.0
  • #63 g_closure_invoke
    from /lib/libgobject-2.0.so.0
  • #64 g_signal_chain_from_overridden
    from /lib/libgobject-2.0.so.0
  • #65 g_signal_emit_valist
    from /lib/libgobject-2.0.so.0
  • #66 g_signal_emit
    from /lib/libgobject-2.0.so.0
  • #67 gtk_button_released
    from /usr/lib/libgtk-x11-2.0.so.0
  • #68 gtk_button_released
    from /usr/lib/libgtk-x11-2.0.so.0
  • #69 gtk_marshal_BOOLEAN__VOID
    from /usr/lib/libgtk-x11-2.0.so.0
  • #70 g_value_set_static_boxed
    from /lib/libgobject-2.0.so.0
  • #71 g_closure_invoke
    from /lib/libgobject-2.0.so.0
  • #72 g_signal_chain_from_overridden
    from /lib/libgobject-2.0.so.0
  • #73 g_signal_emit_valist
    from /lib/libgobject-2.0.so.0
  • #74 g_signal_emit
    from /lib/libgobject-2.0.so.0
  • #75 gtk_widget_get_default_style
    from /usr/lib/libgtk-x11-2.0.so.0
  • #76 gtk_propagate_event
    from /usr/lib/libgtk-x11-2.0.so.0
  • #77 gtk_main_do_event
    from /usr/lib/libgtk-x11-2.0.so.0
  • #78 gdk_add_client_message_filter
    from /usr/lib/libgdk-x11-2.0.so.0
  • #79 g_main_context_dispatch
    from /lib/libglib-2.0.so.0
  • #80 g_main_context_check
    from /lib/libglib-2.0.so.0
  • #81 g_main_loop_run
    from /lib/libglib-2.0.so.0
  • #82 gtk_main
    from /usr/lib/libgtk-x11-2.0.so.0
  • #83 gnc_ui_start_event_loop
    from /usr/lib/gnucash/libgncmod-gnome-utils.so.0
  • #84 main
  • #0 __kernel_vsyscall


----------- .xsession-errors (178565 sec old) ---------------------
  Resource id:  0x1a5
kwin: X_SetInputFocus(0x2818084): BadMatch (invalid parameter attributes)
X Error: BadPixmap (invalid Pixmap parameter) 4
  Major opcode:  54
  Minor opcode:  0
  Resource id:  0x1431c53
X Error: BadMatch (invalid parameter attributes) 8
  Major opcode:  158
  Minor opcode:  6
  Resource id:  0x1a5
kdeinit: Got EXEC_NEW 'kio_http' from launcher.
DCOP: register 'anonymous-31220' -> number of clients is now 14
kdeinit: Got EXEC_NEW 'kio_http' from launcher.
...Too much output, ignoring rest...
--------------------------------------------------


Comment 35 Christian Stimming 2007-04-18 08:27:04 UTC
*** Bug 429696 has been marked as a duplicate of this bug. ***
Comment 36 Pascal Terjan 2007-04-30 10:54:19 UTC
*** Bug 434077 has been marked as a duplicate of this bug. ***
Comment 37 Pascal Terjan 2007-04-30 11:11:09 UTC
I can reproduce under Mandriva, using guile 1.8.1 and gnucash 2.0.5

The only message is "throw from within critical section."

Here is the stacktrace :

  • #0 __kernel_vsyscall
  • #1 waitpid
    from /lib/i686/libpthread.so.0
  • #2 gnc_file_quit
    at gnc-file.c line 1142
  • #3 <signal handler called>
  • #4 __kernel_vsyscall
  • #5 raise
    from /lib/i686/libc.so.6
  • #6 abort
    from /lib/i686/libc.so.6
  • #7 scm_ithrow
    at throw.c line 699
  • #8 scm_error_scm
    at error.c line 92
  • #9 scm_error
    at error.c line 58
  • #10 scm_misc_error
    at error.c line 268
  • #11 scm_to_locale_stringn
    at strings.c line 909
  • #12 scm_to_locale_string
    at strings.c line 924
  • #13 scm_regexp_exec
    at regex-posix.c line 250
  • #14 scm_gsubr_apply
    at gsubr.c line 220
  • #15 scm_dapply
    at eval.c line 4915
  • #16 deval
    at eval.c line 4364
  • #17 deval
    at eval.c line 3635
  • #18 deval
    at eval.c line 4199
  • #19 deval
    at eval.c line 3331
  • #20 deval
    at eval.c line 3650
  • #21 deval
    at eval.c line 3578
  • #22 deval
    at eval.c line 3384
  • #23 deval
    at eval.c line 3635
  • #24 deval
    at eval.c line 3384
  • #25 deval
    at eval.c line 3384
  • #26 scm_dapply
    at eval.c line 4997
  • #27 scm_apply
    at eval.c line 4796
  • #28 scm_call_0
    at eval.c line 4651
  • #29 scm_dynamic_wind
    at dynwind.c line 107
  • #30 deval
    at eval.c line 4468
  • #31 deval
    at eval.c line 3635
  • #32 deval
    at eval.c line 3384
  • #33 scm_dapply
    at eval.c line 4997
  • #34 scm_apply
    at eval.c line 4796
  • #35 scm_call_0
    at eval.c line 4651
  • #36 scm_body_thunk
    at throw.c line 356
  • #37 scm_c_catch
    at throw.c line 204
  • #38 scm_catch_with_pre_unwind_handler
    at throw.c line 588
  • #39 scm_gsubr_apply
    at gsubr.c line 220
  • #40 scm_dapply
    at eval.c line 4915
  • #41 deval
    at eval.c line 4364
  • #42 scm_dapply
    at eval.c line 4997
  • #43 scm_apply
    at eval.c line 4796
  • #44 scm_call_4
    at eval.c line 4675
  • #45 gnc_ui_qif_import_load_file_next_cb
    at druid-qif-import.c line 492
  • #46 _gnome_marshal_BOOLEAN__OBJECT
    from /usr/lib/libgnomeui-2.so.0
  • #47 IA__g_closure_invoke
    at gclosure.c line 490
  • #48 signal_emit_unlocked_R
    at gsignal.c line 2440
  • #49 IA__g_signal_emit_valist
    at gsignal.c line 2209
  • #50 IA__g_signal_emit
    at gsignal.c line 2243
  • #51 gnome_druid_page_next
    from /usr/lib/libgnomeui-2.so.0
  • #52 gnc_file_quit
    at gnc-file.c line 1142
  • #53 IA__g_cclosure_marshal_VOID__VOID
    at gmarshal.c line 77
  • #54 IA__g_closure_invoke
    at gclosure.c line 490
  • #55 signal_emit_unlocked_R
    at gsignal.c line 2440
  • #56 IA__g_signal_emit_valist
    at gsignal.c line 2199
  • #57 IA__g_signal_emit
    at gsignal.c line 2243
  • #58 IA__gtk_button_clicked
    at gtkbutton.c line 889
  • #59 gtk_real_button_released
    at gtkbutton.c line 1484
  • #60 IA__g_cclosure_marshal_VOID__VOID
    at gmarshal.c line 77
  • #61 g_type_class_meta_marshal
    at gclosure.c line 567
  • #62 IA__g_closure_invoke
    at gclosure.c line 490
  • #63 signal_emit_unlocked_R
    at gsignal.c line 2370
  • #64 IA__g_signal_emit_valist
    at gsignal.c line 2199
  • #65 IA__g_signal_emit
    at gsignal.c line 2243
  • #66 IA__gtk_button_released
    at gtkbutton.c line 881
  • #67 gtk_button_button_release
    at gtkbutton.c line 1377
  • #68 _gtk_marshal_BOOLEAN__BOXED
    at gtkmarshalers.c line 84
  • #69 g_type_class_meta_marshal
    at gclosure.c line 567
  • #70 IA__g_closure_invoke
    at gclosure.c line 490
  • #71 signal_emit_unlocked_R
    at gsignal.c line 2478
  • #72 IA__g_signal_emit_valist
    at gsignal.c line 2209
  • #73 IA__g_signal_emit
    at gsignal.c line 2243
  • #74 gtk_widget_event_internal
    at gtkwidget.c line 3915
  • #75 IA__gtk_propagate_event
    at gtkmain.c line 2341
  • #76 IA__gtk_main_do_event
    at gtkmain.c line 1575
  • #77 gdk_event_dispatch
    at gdkevents-x11.c line 2318
  • #78 IA__g_main_context_dispatch
    at gmain.c line 2045
  • #79 g_main_context_iterate
    at gmain.c line 2677
  • #80 IA__g_main_loop_run
    at gmain.c line 2881
  • #81 IA__gtk_main
    at gtkmain.c line 1154
  • #82 gnc_ui_start_event_loop
    at gnc-gnome-utils.c line 375
  • #83 inner_main
    at gnucash-bin.c line 479
  • #84 invoke_main_func
    at init.c line 367
  • #85 c_body
    at continuations.c line 366
  • #86 scm_c_catch
    at throw.c line 204
  • #87 scm_i_with_continuation_barrier
    at continuations.c line 342
  • #88 scm_c_with_continuation_barrier
    at continuations.c line 384
  • #89 scm_i_with_guile_and_parent
    at threads.c line 649
  • #90 scm_with_guile
    at threads.c line 637
  • #91 scm_boot_guile
    at init.c line 350
  • #92 main
    at gnucash-bin.c line 515

Comment 38 Pascal Terjan 2007-04-30 11:16:13 UTC
Start of the full bt :

  • #0 __kernel_vsyscall
  • #1 waitpid
    from /lib/i686/libpthread.so.0
  • #2 gnc_file_quit
    at gnc-file.c line 1142
  • #3 <signal handler called>
  • #4 __kernel_vsyscall
  • #5 raise
    from /lib/i686/libc.so.6
  • #6 abort
    from /lib/i686/libc.so.6
  • #7 scm_ithrow
    at throw.c line 699
  • #8 scm_error_scm
    at error.c line 92
  • #9 scm_error
    at error.c line 58
  • #10 scm_misc_error
    at error.c line 268
  • #11 scm_to_locale_stringn
    at strings.c line 909
  • #12 scm_to_locale_string
    at strings.c line 924
  • #13 scm_regexp_exec
    at regex-posix.c line 250
  • #14 scm_gsubr_apply
    at gsubr.c line 220
  • #15 scm_dapply
    at eval.c line 4915
  • #16 deval
    at eval.c line 4364
  • #17 deval
    at eval.c line 3635

Comment 39 Derek Atkins 2007-04-30 20:38:03 UTC
*** Bug 434695 has been marked as a duplicate of this bug. ***
Comment 40 Christian Stimming 2007-05-01 11:59:23 UTC
*** Bug 434197 has been marked as a duplicate of this bug. ***
Comment 41 Christian Stimming 2007-05-05 12:15:35 UTC
*** Bug 435676 has been marked as a duplicate of this bug. ***
Comment 42 Andreas Köhler 2007-05-18 11:59:45 UTC
*** Bug 439362 has been marked as a duplicate of this bug. ***
Comment 43 Andreas Köhler 2007-05-18 12:07:05 UTC
Thank you, Pascal.  Your backtrace showed the error already.

  • #10 scm_misc_error
    at error.c line 268
  • #11 scm_to_locale_stringn
    at strings.c line 909

The problem is the following:
In src/import-export/qif-import/qif-file.scm, line 74 (qif-file:read-file), we call

(gnc-utf8-strip-invalid value) ;; changes value in-place

This leaves the guile string in an unstable state, because it thinks it still has the length of 72 bytes, whereas the last bytes are zero ones.  strings.c:scm_to_locale_stringn does the following:

  len = scm_i_string_length (str);
  res = scm_malloc (len + ((lenp==NULL)? 1 : 0));
  memcpy (res, scm_i_string_chars (str), len);
  if (lenp == NULL)
    {
      res[len] = '\0';
      if (strlen (res) != len)
	{
	  free (res);
	  scm_misc_error (NULL,
			  "string contains #\\nul character: ~S",
			  scm_list_1 (str));
	}
    }

so len==72, strlen(res)==70.

How do we fix that best?
Comment 44 Derek Atkins 2007-05-18 14:10:07 UTC
Hmm... I think that we need to change gnc-utf8-strip-invalid to not change the value in place.  So the scheme would change to:

  (set! value (gnc:utf8-string-invalid value))

And we'd have to wrap a new function that doesn't modify the argument but instead creates a new string and returns it.
Comment 45 Andreas Köhler 2007-05-25 14:59:51 UTC
*** Bug 441123 has been marked as a duplicate of this bug. ***
Comment 46 Andreas Köhler 2007-05-29 07:24:46 UTC
*** Bug 441929 has been marked as a duplicate of this bug. ***
Comment 47 Andreas Köhler 2007-05-29 16:26:55 UTC
Oops, there is also gnc_utf8_strip_invalid_strdup :-)

Fixed by r16135 for GnuCash 2.1.3.  Thanks for the reports, help and patience.
Comment 48 Andreas Köhler 2007-05-29 16:31:20 UTC
*** Bug 394783 has been marked as a duplicate of this bug. ***
Comment 49 Andreas Köhler 2007-05-29 16:32:35 UTC
*** Bug 397137 has been marked as a duplicate of this bug. ***
Comment 50 Derek Atkins 2007-05-30 22:07:54 UTC
*** Bug 442434 has been marked as a duplicate of this bug. ***
Comment 51 Andreas Köhler 2007-06-09 23:22:23 UTC
*** Bug 445751 has been marked as a duplicate of this bug. ***
Comment 52 Andreas Köhler 2007-06-12 16:37:11 UTC
*** Bug 446742 has been marked as a duplicate of this bug. ***
Comment 53 Andreas Köhler 2007-06-18 08:26:00 UTC
*** Bug 448549 has been marked as a duplicate of this bug. ***
Comment 54 Andreas Köhler 2007-06-25 08:38:23 UTC
*** Bug 450685 has been marked as a duplicate of this bug. ***
Comment 55 Christian Stimming 2007-07-04 08:15:37 UTC
*** Bug 453515 has been marked as a duplicate of this bug. ***
Comment 56 Andreas Köhler 2007-07-08 16:46:48 UTC
*** Bug 454821 has been marked as a duplicate of this bug. ***
Comment 57 Andreas Köhler 2007-07-17 07:01:27 UTC
*** Bug 457586 has been marked as a duplicate of this bug. ***
Comment 58 Andreas Köhler 2007-09-03 22:50:20 UTC
*** Bug 473118 has been marked as a duplicate of this bug. ***
Comment 59 Andreas Köhler 2007-09-15 23:14:57 UTC
*** Bug 477028 has been marked as a duplicate of this bug. ***
Comment 60 Andreas Köhler 2007-09-17 20:15:06 UTC
*** Bug 477699 has been marked as a duplicate of this bug. ***
Comment 61 Christian Stimming 2007-11-08 20:29:23 UTC
*** Bug 495014 has been marked as a duplicate of this bug. ***
Comment 62 Christian Stimming 2007-11-21 08:46:37 UTC
*** Bug 498552 has been marked as a duplicate of this bug. ***
Comment 63 Andreas Köhler 2008-05-12 02:07:24 UTC
*** Bug 507132 has been marked as a duplicate of this bug. ***
Comment 64 John Ralls 2018-06-29 21:19:37 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=389740. Please update any external references or bookmarks.