[Matrix-SIG] Re: [PSA MEMBERS] Re: [Matrix-SIG]NumPy core dump

Charles G Waldman cgw@pgt.com
Tue, 22 Dec 1998 12:00:22 -0500 (EST)


Me:
 > Now I get a most peculiar
 > behavior:  no longer is there an immediate core-dump;  I get
 > a TypeError, as expected, but not until after I enter another line.
 > It doesn't seem to matter if the line is blank or contains
 > code, as the following examples show:

Marc-Andre Lemburg:
 > I don't know anything about NumPy, but the error you describe
 > is typical of a situation where C code sets an exception using
 > PyExc_SetString() without returning NULL to the caller.

Thanks for the tip.  I have (finally) solved this problem. 

I had been using a slightly out-of-date version of Python-1.5.2 that I
got via CVS;  in this version of ceval.c, eval_code2 failed to
initialize "retval" to NULL, so the "goto fail" lines resulted in
returning a nonsense value.  I was just about to report this and
submit a patch when I realized that the current version (2.159)
of ceval.c has this problem fixed already.

I suppose the moral is to do "cvs update" before getting deeply
involved in debugging!

Thanks to Jeremy, Marc-Andre, and all others who offered hints.