Hi,
Today is my first day with gnucash. All was going well until all of a
sudden it refused to read my file, segfaulting. As it turned out, it
ended up oopsing the kernel as well.
Anyway, here's the situation:
gnucash stores all the data in a binary format (ugh!). Anyway, it
stores the length of the string prior to the string. Somewhere, it is
getting confused. It is reading the text "ing " from "Opening
balance" as a string size. After treating this as an int, and
appropriately flipping it, gnucash tries to malloc 1.6 *gigs* of RAM.
This fails, but it ignores the retval of malloc. Next, it tries to
read 1.6 gigs of data from the account file into memory at 0x0. This
obviously will not work and crashes the program.
Thus is as far as my analysis can get. I do not know enough about the
format to know what is making gnucash get confused. I don't know whether
the bug is in the writing or the reading. My analysis shows that this bug
is being triggered at position 94 in the file, so I have included the first
few hundred bytes of the file in question below. This part of the file
contains no private data, so I feel OK posting it here.
If I might be permitted a moment to indulge, I would highly advocate
abolishing a binary format for this. The data is just too important for it
and the benefits of doing so seem negligible in this case.
Anyway, my platform is 64-bit DEC Alpha running Linux 2.2.15 or 2.2.16pre7
(tried with both) and Debian woody. Gnucash 1.3.8. Libraries as follows:
libgnomeprint.so.6 => /usr/lib/libgnomeprint.so.6 (0x000002000011e000)
libxml.so.1 => /usr/lib/libxml.so.1 (0x0000020000282000)
libpng.so.2 => /usr/lib/libpng.so.2 (0x0000020000412000)
libjpeg.so.62 => /usr/lib/libjpeg.so.62 (0x000002000054c000)
libz.so.1 => /usr/lib/libz.so.1 (0x0000020000676000)
libm.so.6.1 => /lib/libm.so.6.1 (0x000002000078a000)
libgnomeui.so.32 => /usr/lib/libgnomeui.so.32 (0x00000200008c4000)
libart_lgpl.so.2 => /usr/lib/libart_lgpl.so.2 (0x0000020000b0a000)
libgdk_imlib.so.1 => /usr/lib/libgdk_imlib.so.1 (0x0000020000c1e000)
libgnome.so.32 => /usr/lib/libgnome.so.32 (0x0000020000d64000)
libgnomesupport.so.0 => /usr/lib/libgnomesupport.so.0 (0x0000020000e88000)
libesd.so.0 => /usr/lib/libesd.so.0 (0x0000020000f90000)
libaudiofile.so.0 => /usr/lib/libaudiofile.so.0 (0x000002000109a000)
libdb.so.3 => /lib/libdb.so.3 (0x00000200011b6000)
libgtkxmhtml.so.1 => /usr/lib/libgtkxmhtml.so.1 (0x0000020001316000)
libXpm.so.4 => /usr/X11R6/lib/libXpm.so.4 (0x000002000149a000)
libSM.so.6 => /usr/X11R6/lib/libSM.so.6 (0x00000200015b0000)
libICE.so.6 => /usr/X11R6/lib/libICE.so.6 (0x00000200016be000)
libgtk-1.2.so.0 => /usr/lib/libgtk-1.2.so.0 (0x00000200017e0000)
libgdk-1.2.so.0 => /usr/lib/libgdk-1.2.so.0 (0x0000020001ac6000)
libgmodule-1.2.so.0 => /usr/lib/libgmodule-1.2.so.0 (0x0000020001c12000)
libglib-1.2.so.0 => /usr/lib/libglib-1.2.so.0 (0x0000020001d16000)
libdl.so.2.1 => /lib/libdl.so.2.1 (0x0000020001e4c000)
libXi.so.6 => /usr/X11R6/lib/libXi.so.6 (0x0000020001f50000)
libXext.so.6 => /usr/X11R6/lib/libXext.so.6 (0x000002000205c000)
libX11.so.6 => /usr/X11R6/lib/libX11.so.6 (0x0000020002170000)
libguile.so.6 => /usr/lib/libguile.so.6 (0x000002000236e000)
libc.so.6.1 => /lib/libc.so.6.1 (0x000002000252a000)
/lib/ld-linux.so.2 => /lib/ld-linux.so.2 (0x0000020000000000)
Thanks,
John Goerzen
samplefile
--
Gnucash Developer's List
To unsubscribe send empty email to: [EMAIL PROTECTED]