Ok, I've found a minimal example that crashes sage and doesn't involve
my code so it should be easier to debug.  The following crashes sage:

sage: X = (GF(3)^1)/(GF(3)^0)
sage: Y = (GF(3)^1)/(GF(3)^1)
sage: X.hom([(1,)], Y)

But since it crashes all the way out to the prompt I can't use sage's
debugger to look into it any further.  When I type import pdb;
pdb.set_trace() it goes straight into a debugger before I get a chance
to actually crash anything.  How can I get a debugger to run so that I
can maybe find an error?

-Jim

On Tue, Jan 31, 2012 at 7:01 PM, Jason Grout
<[email protected]> wrote:
> On 1/31/12 8:03 PM, Starx wrote:
>>
>> Oops, well for those who don't want to download the attachment here's
>> the pastebin link: http://pastebin.com/z1x00AEa
>>
>
>
> If you put:
>
> import pdb; pdb.set_trace()
>
> before the error in the function, that will start up the debugger and you
> can step through the code.  Apparently the crash happens on line 377 of
> sage/modules/vector_space_homspace.py:
>
> v = [C(a) for a in A]
>
> Just before executing that step, we can print out what C and A are:
>
> (Pdb) p C
> Vector space quotient V/W of dimension 0 over Finite Field of size 3 where
> V: Vector space of dimension 1 over Finite Field of size 3
> W: Vector space of degree 1 and dimension 1 over Finite Field of size 3
> Basis matrix:
> [1]
> (Pdb) p A
> [(1)]
>
>
> Does that give any clues?  C looks a little suspicious to me.  When in the
> debugger, typing "s" will jump into a function invocation (i.e., drill
> down), and typing "n" will just run the function.  Anyways, "s"tepping down
> into the code more gave this line as the one causing the crash:
>
>>
>> /Users/grout/sage-trees/sage-5.0.beta1/local/lib/python2.7/site-packages/sage/modules/matrix_morphism.py(153)__call__()
> -> v = x*self.matrix()
> (Pdb) p self.matrix()
> []
> (Pdb) p x
> (1)
> (Pdb) n
>
> lda must be >= MAX(N,1): lda=0 N=0Parameter 7 to routine cblas_sgemv was
> incorrect
> Mac OS BLAS parameter error in cblas_sgemv, parameter #0, (unavailable), is
> 0
>
> Notice again, that matrix and vector look funny being multiplied together,
> considering their dimensions.
>
> Anyways, that at least provides some tools to investigate the problem more
> deeply.
>
> Thanks,
>
> Jason
>
>
>
> --
> To post to this group, send email to [email protected]
> To unsubscribe from this group, send email to
> [email protected]
> For more options, visit this group at
> http://groups.google.com/group/sage-support
> URL: http://www.sagemath.org



-- 
Die Dunkelheit... leitet die Musik.
Die Musik... leitet die Seele.

-- 
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to 
[email protected]
For more options, visit this group at 
http://groups.google.com/group/sage-support
URL: http://www.sagemath.org

Reply via email to