Vineet Jain | 1 Oct 23:00 2010
Picon

Re: [Cython] cython compiler crash

Problem was a typo:

cdef np.ndarray[np, ndim=1] outreal = numpy.zeros_like(inreal)

should have been:

cdef np.ndarray[np.float_t, ndim=1] outreal = numpy.zeros_like(inreal)

Which caused the compiler to crash.

On Fri, Oct 1, 2010 at 4:36 PM, Lisandro Dalcin <dalcinl@...> wrote:
> On 1 October 2010 15:17, Vineet Jain <vinjvinj@...> wrote:
>> Last night while trying out the following cython example:
>>
>>    http://dpinte.wordpress.com/2010/04/22/interfacing-ta-lib-with-cython/
>>
>> I got the following crash in the cython compiler (cython version 0.13):
>>
>> Compiler crash traceback from this point on:
>>  File "Visitor.py", line 179, in
>> Cython.Compiler.Visitor.TreeVisitor.visitchild
>> (/tmp/easy_install-fEGaFj/Cython-0.13/Cython/Compiler/Visitor.c:3407)
>>  File "Visitor.py", line 28, in
>> Cython.Compiler.Visitor.BasicVisitor.visit
>> (/tmp/easy_install-fEGaFj/Cython-0.13/Cython/Compiler/Visitor.c:1178)
>>  File "/usr/local/lib/python2.6/dist-packages/Cython-0.13-py2.6-linux-x86_64.egg/
>> Cython/Compiler/Buffer.py",
>> line 106, in visit_FuncDefNode
>>    self.handle_scope(node, node.local_scope)
>>  File "/usr/local/lib/python2.6/dist-packages/Cython-0.13-py2.6-linux-x86_64.egg/
(Continue reading)

Lisandro Dalcin | 1 Oct 23:05 2010
Picon

Re: [Cython] cython compiler crash

On 1 October 2010 18:00, Vineet Jain <vinjvinj@...> wrote:
> Problem was a typo:
>
> cdef np.ndarray[np, ndim=1] outreal = numpy.zeros_like(inreal)
>
> should have been:
>
> cdef np.ndarray[np.float_t, ndim=1] outreal = numpy.zeros_like(inreal)
>
> Which caused the compiler to crash.
>

OK, now all is clear. Anyway, Cython should not crash. We should fix this.

--

-- 
Lisandro Dalcin
---------------
CIMEC (INTEC/CONICET-UNL)
Predio CONICET-Santa Fe
Colectora RN 168 Km 472, Paraje El Pozo
Tel: +54-342-4511594 (ext 1011)
Tel/Fax: +54-342-4511169
Robert Bradshaw | 3 Oct 08:51 2010

Re: [Cython] cython compiler crash

On Fri, Oct 1, 2010 at 2:05 PM, Lisandro Dalcin <dalcinl@...> wrote:
> On 1 October 2010 18:00, Vineet Jain <vinjvinj@...> wrote:
>> Problem was a typo:
>>
>> cdef np.ndarray[np, ndim=1] outreal = numpy.zeros_like(inreal)
>>
>> should have been:
>>
>> cdef np.ndarray[np.float_t, ndim=1] outreal = numpy.zeros_like(inreal)
>>
>> Which caused the compiler to crash.
>>
>
> OK, now all is clear. Anyway, Cython should not crash. We should fix this.

Fixed. http://trac.cython.org/cython_trac/ticket/579

When trying to write a test case, I noticed that buffers are not very
good at continuing once they hit an error... This should be improved.

- Robert

Gmane