[SciPy-Dev] lfilter segfault with initial condition on windows

josef.pktd@gmai... josef.pktd@gmai...
Thu Mar 4 07:28:29 CST 2010


On Thu, Mar 4, 2010 at 8:06 AM, Oscar Benjamin
<oscar.bristol@googlemail.com> wrote:
> Hi,
>
> I've just discovered that a program of mine (which works on my ubuntu
> karmic machine at home) segfaults on win32 at work.
>
> I've made a short test case:
>
>  > #!/usr/bin/env python
>  >
>  > from numpy import ones
>  > from scipy.signal import lfilter
>  >
>  > x = ones(100)
>  > a = ones(5)
>  > b = ones(5)
>  > zi = ones(4)
>  > #xf = lfilter(b, a, x)
>  > xf, zf = lfilter(b, a, x, zi=zi)
>
> Swap the comment on the last two lines to prevent segfault. On my
> machine I get the "Unhandled Exception in python.exe" message box (I
> assume this is a segfault).
> versions:
> python 2.6.4
> numpy 1.3.0
> scipy 0.7.1
>
> I can see a few tickets about problems with memory leaks and segfaults
> with lfilter but they seem to be old and marked as closed. Should I
> expect the above to work? Is this a known issue that's already fixed?

I don't have a segfault or any other problem with your script on
WindowsXP with python 2.5.2. numpy 1.4.0 and a scipy from a while ago.
>>> numpy.version.version
'1.4.0'
>>> scipy.version.version
'0.8.0.dev6156'

I also think I never had a segfault before with lfilter, and I have
been using it for quite some time.
(The only segfault I have seen is when scipy is not binary compatible
with numpy 1.4.0)

Are your numpy and scipy from the official installers?

I don't know if there were any problems with python 2.6 before.

Josef

>
> Thanks,
> Oscar.
>
> _______________________________________________
> SciPy-Dev mailing list
> SciPy-Dev@scipy.org
> http://mail.scipy.org/mailman/listinfo/scipy-dev
>


More information about the SciPy-Dev mailing list