QIF Import fails out of CVS

2001-02-12 Thread Derek Atkins
I'm running current CVS (as of noon EST today). I tried to import a QIF file from a credit card (to test something without commodities). After it walks through the account matching and category matching, it tries to import the QIF transactions. Unfortunately I get the following error: A

Re: QIF Import fails out of CVS

2001-02-12 Thread Bill Gribble
On Mon, Feb 12, 2001 at 12:45:13PM -0500, Derek Atkins wrote: > I'm running current CVS (as of noon EST today). I tried to import a > QIF file from a credit card (to test something without commodities). > After it walks through the account matching and category matching, it > tries to import the

Re: QIF Import fails out of CVS

2001-02-12 Thread Derek Atkins
Ok, I can wait a couple hours ;) -derek [EMAIL PROTECTED] (Bill Gribble) writes: > On Mon, Feb 12, 2001 at 12:45:13PM -0500, Derek Atkins wrote: > > I'm running current CVS (as of noon EST today). I tried to import a > > QIF file from a credit card (to test something without commodities). > >

Re: QIF Import fails out of CVS

2001-02-12 Thread Bill Gribble
On Mon, Feb 12, 2001 at 01:15:47PM -0500, Derek Atkins wrote: > Ok, I can wait a couple hours ;) > > -derek OK, I sent the patch in that (I believe) fixes your problem. When you get a chance to try it out, please let me know if that's not true. Thanks b.g.

Re: QIF Import fails out of CVS

2001-02-12 Thread Derek Atkins
It's hard to tell if this fixes the problem. If I try to bring up the new account chooser, GnuCash dies: Backtrace: 0* [gnc:main] 1* (if (null? gnc:*batch-mode-things-to-do*) (begin (gnc:hook-add-dangler gnc:*ui-shutdown-hook* gnc:ui-finish) (gnc:ui-init) ...) ...) 2 (begin (gnc:hook-add-da

Re: QIF Import fails out of CVS

2001-02-12 Thread Derek Atkins
So, I decided to try the importer without using the new account chooser. If I just keep hitting "next" then I still get the error window "An error occurred while importing QIF transactions into Gnucash. Your accounts are unchanged" and I get this error in my xterm: Backtrace: 0* [eval (gnc:mai

Re: QIF Import fails out of CVS

2001-02-13 Thread Bill Gribble
On Mon, Feb 12, 2001 at 07:13:56PM -0500, Derek Atkins wrote: > So, I decided to try the importer without using the new account > chooser. If I just keep hitting "next" then I still get the error > window "An error occurred while importing QIF transactions into > Gnucash. Your accounts are uncha

Re: QIF Import fails out of CVS

2001-02-13 Thread Bill Gribble
On Tue, Feb 13, 2001 at 11:27:27AM -0500, Derek Atkins wrote: > 30* [# -19.59] > 31 (if n (gnc:double-to-gnc-numeric n GNC-DENOM-AUTO ...) ...) > 32 [gnc:double-to-gnc-numeric -19.59 0 ...] > /usr/gnucash/share/gnucash/scm/qif-import/qif-to-gnc.scm:362:24: In procedure >gnc:double-to-gnc-numeri

Re: QIF Import fails out of CVS

2001-02-13 Thread Bill Gribble
On Tue, Feb 13, 2001 at 12:04:16PM -0500, Derek Atkins wrote: > If I don't use the account-picker, it dies after the "enter the > currency" page. If I do use the account-picker, it dies in the same > place. Ok, I must've been confused (or perhaps your patch changed > where it died and I just did

Re: QIF Import fails out of CVS

2001-02-13 Thread Derek Atkins
[EMAIL PROTECTED] (Bill Gribble) writes: > On Tue, Feb 13, 2001 at 02:54:08PM -0500, Derek Atkins wrote: > > Whee... > > Save your whee until it works :) True enough. That patch fixed the SEGV. But it's not done yet. ;) Although there is an interesting warning message: druid-qif-import.c:

Re: QIF Import fails out of CVS

2001-02-13 Thread Derek Atkins
Hey, try this patch to gnc-helpers.c instead of yours. I think this version of scm_to_gint64 should work in all cases (even large numbers ;) -derek Index: src/guile/gnc-helpers.c === RCS file: /home/cvs/cvsroot/gnucash/src/guile/gn

Re: QIF Import fails out of CVS

2001-02-13 Thread Derek Atkins
[EMAIL PROTECTED] (Bill Gribble) writes: > Wait a minute... I looked at your patch again, and if I'm not mistaken > it has the same problem as the original code: you can't ensure that > both arguments to scm_logand are fixnums. You can guarantee that they > would fit within the RANGE of a fixnum

Re: QIF Import fails out of CVS

2001-02-13 Thread Bill Gribble
On Tue, Feb 13, 2001 at 06:02:54PM -0500, Derek Atkins wrote: > Hey, try this patch to gnc-helpers.c instead of yours. I think this > version of scm_to_gint64 should work in all cases (even large numbers > ;) I just sent a patch that does it a different way, but I like your approach better. I a

Re: QIF Import fails out of CVS

2001-02-13 Thread Derek Atkins
[EMAIL PROTECTED] (Bill Gribble) writes: > On Tue, Feb 13, 2001 at 04:35:37PM -0500, Derek Atkins wrote: > > Converting this to scheme, step-by-step, assuming some value for num: > > > > guile> (define num 12345678901234567890) > > guile> (define mask 65535) > > guile> (define mag (abs num)) > >

Re: QIF Import fails out of CVS

2001-02-13 Thread Derek Atkins
Whee... -derek PS: Thanks for working on this. [EMAIL PROTECTED] (Bill Gribble) writes: > On Tue, Feb 13, 2001 at 12:50:26PM -0500, Derek Atkins wrote: > > I've got the gnome shipped with RH 6.2 (gnome-core-1.0.55-12), > > gtk+-1.2.6-7, etc. I'm perfectly willing to try patches here or help >

Re: QIF Import fails out of CVS

2001-02-13 Thread Bill Gribble
On Tue, Feb 13, 2001 at 06:18:14PM -0500, Derek Atkins wrote: > BTW, thanks for all the help. Imports are now "working".. > > There are still a number of other annoying bugs (or mis-features) of > the importer, but I think I can help track those down, now that I have > a working importer. Right

Re: QIF Import fails out of CVS

2001-02-13 Thread Derek Atkins
[EMAIL PROTECTED] (Bill Gribble) writes: > On Tue, Feb 13, 2001 at 06:18:14PM -0500, Derek Atkins wrote: > > BTW, thanks for all the help. Imports are now "working".. > > > > There are still a number of other annoying bugs (or mis-features) of > > the importer, but I think I can help track thos

Re: QIF Import fails out of CVS

2001-02-13 Thread Derek Atkins
It might be a garbage-collection problem. I ran it under gdb and it dies at a slightly different time (but under similar circumstances). Namely, it asks me whether this file is in USD, and _then_ it dies. It wasn't doing this before. Weird. Anyways, I set a breakpoint in gweap_double_to_gnc_num

Re: QIF Import fails out of CVS

2001-02-13 Thread Bill Gribble
On Tue, Feb 13, 2001 at 04:35:37PM -0500, Derek Atkins wrote: > Converting this to scheme, step-by-step, assuming some value for num: > > guile> (define num 12345678901234567890) > guile> (define mask 65535) > guile> (define mag (abs num)) > guile> (logand mag mask) > ERROR: In procedure logand i

Re: QIF Import fails out of CVS

2001-02-13 Thread Derek Atkins
Now I have a very different problem. I get a Gnome box that says that GnuCash "has crashed due to a fatal error. (Segmentation Fault)". The problem still appears to come from gnc_scm_to_gint64(). Here is the backtrace (both scheme and C): Backtrace: 13 [#] 14 (let* ((old-group #) (new-group

Re: QIF Import fails out of CVS

2001-02-13 Thread Derek Atkins
Hi, I applied that patch and it definitely fixes the hash-fold problem. However, it still crashes. When I hit 'next' from the "Match payee's/memos" window I still get the "An error occurred while importing" error along with this backtrace: Backtrace: 13 [#] 14 (let* ((old-group #) (new-group

Re: QIF Import fails out of CVS

2001-02-13 Thread Derek Atkins
[EMAIL PROTECTED] (Bill Gribble) writes: > On Tue, Feb 13, 2001 at 11:51:30AM -0500, Derek Atkins wrote: > > It might be a garbage-collection problem. I ran it under gdb and it > > dies at a slightly different time (but under similar circumstances). > > Namely, it asks me whether this file is in

Re: QIF Import fails out of CVS

2001-02-13 Thread Derek Atkins
[EMAIL PROTECTED] (Bill Gribble) writes: > On Mon, Feb 12, 2001 at 07:13:56PM -0500, Derek Atkins wrote: > > So, I decided to try the importer without using the new account > > chooser. If I just keep hitting "next" then I still get the error > > window "An error occurred while importing QIF tra

Re: QIF Import fails out of CVS

2001-02-13 Thread Derek Atkins
BTW, thanks for all the help. Imports are now "working".. There are still a number of other annoying bugs (or mis-features) of the importer, but I think I can help track those down, now that I have a working importer. -derek -- Derek Atkins, SB '93 MIT EE, SM '95 MIT Media Laboratory

Re: QIF Import fails out of CVS

2001-02-13 Thread Derek Atkins
[EMAIL PROTECTED] (Bill Gribble) writes: > On Tue, Feb 13, 2001 at 03:54:37PM -0500, Derek Atkins wrote: > > > Save your whee until it works :) > > > > True enough. That patch fixed the SEGV. But it's not done yet. ;) > > Did you ever have One Of Those Days? Ayup. For example, I complet

Re: QIF Import fails out of CVS

2001-02-13 Thread Bill Gribble
On Tue, Feb 13, 2001 at 12:36:53PM -0500, Derek Atkins wrote: > Now I have a very different problem. I get a Gnome box that says that > GnuCash "has crashed due to a fatal error. (Segmentation Fault)". The > problem still appears to come from gnc_scm_to_gint64(). Here is the > backtrace (both s

Re: QIF Import fails out of CVS

2001-02-13 Thread Bill Gribble
On Tue, Feb 13, 2001 at 06:02:54PM -0500, Derek Atkins wrote: > Hey, try this patch to gnc-helpers.c instead of yours. I think this > version of scm_to_gint64 should work in all cases (even large numbers > ;) Wait a minute... I looked at your patch again, and if I'm not mistaken it has the same

Re: QIF Import fails out of CVS

2001-02-13 Thread Bill Gribble
On Tue, Feb 13, 2001 at 02:54:08PM -0500, Derek Atkins wrote: > Whee... Save your whee until it works :) I have tested this as best I'm able under guile-1.4, which is to say that if I put the code into the compile path it generates correct results for me. Our conclusion was that in guile-1.3

Re: QIF Import fails out of CVS

2001-02-13 Thread Derek Atkins
[EMAIL PROTECTED] (Bill Gribble) writes: > On Tue, Feb 13, 2001 at 12:36:53PM -0500, Derek Atkins wrote: > > Now I have a very different problem. I get a Gnome box that says that > > GnuCash "has crashed due to a fatal error. (Segmentation Fault)". The > > problem still appears to come from gnc

Re: QIF Import fails out of CVS

2001-02-13 Thread Derek Atkins
This is definitely a problem with logand, but moreso it a problem with how we're using it. Converting parts gnc_scm_to_gint64(SCM num) to scheme code directly show the problem quite clearly: gnc_scm_to_gint64(SCM num) /* In part, from gnc-helpers.c */ { SCM bits00to15_mask = gh_ulong2scm(

Re: QIF Import fails out of CVS

2001-02-13 Thread Bill Gribble
On Tue, Feb 13, 2001 at 03:54:37PM -0500, Derek Atkins wrote: > > Save your whee until it works :) > > True enough. That patch fixed the SEGV. But it's not done yet. ;) Did you ever have One Of Those Days? After all my "it's absolutely a GC problem... probably related to g-wrap" yang-talk

Re: QIF Import fails out of CVS

2001-02-13 Thread Derek Atkins
[EMAIL PROTECTED] (Bill Gribble) writes: > On Tue, Feb 13, 2001 at 06:02:54PM -0500, Derek Atkins wrote: > > Hey, try this patch to gnc-helpers.c instead of yours. I think this > > version of scm_to_gint64 should work in all cases (even large numbers > > ;) > > I just sent a patch that does it

Re: QIF Import fails out of CVS

2001-02-13 Thread Bill Gribble
On Tue, Feb 13, 2001 at 11:51:30AM -0500, Derek Atkins wrote: > It might be a garbage-collection problem. I ran it under gdb and it > dies at a slightly different time (but under similar circumstances). > Namely, it asks me whether this file is in USD, and _then_ it dies. > It wasn't doing this b

Re: QIF Import fails out of CVS

2001-02-13 Thread Bill Gribble
On Tue, Feb 13, 2001 at 12:50:26PM -0500, Derek Atkins wrote: > I've got the gnome shipped with RH 6.2 (gnome-core-1.0.55-12), > gtk+-1.2.6-7, etc. I'm perfectly willing to try patches here or help > debug it anyway I can. OK, with help from rlb, dres, and your stack dumps I think I have found t

Re: QIF Import fails out of CVS

2001-02-13 Thread Bill Gribble
On Tue, Feb 13, 2001 at 10:44:52AM -0500, Derek Atkins wrote: > Or, you can send it out and I can test it... (although if you're going > to continue working on the code then I guess I can wait ;) OK, here's a preliminary patch that should fix the hash-fold and other silly crash problems. Install