Hi,

On Sun, Mar 4, 2012 at 11:53 PM, Mark Wiebe <mwwi...@gmail.com> wrote:
> On Sun, Mar 4, 2012 at 10:34 PM, Matthew Brett <matthew.br...@gmail.com>
> wrote:
>>
>> <snip>
>> > $ export NPY_SEPARATE_COMPILATION=1
>>
>> Thanks, that did it:
>>
>> 9194b3af704df71aa9b1ff2f53f169848d0f9dc7 is the first bad commit
>>
>> Let me know if I can debug further,
>
>
> That commit was a rewrite of np.concatenate, and I've traced the test
> function you got the crash in. The only call to concatenate is as follows:
>
>>>> a = np.array([True], dtype=object)
>>>> np.concatenate((a,)*3)
> array([True, True, True], dtype=object)
>>>>
>
> Can you try this and see if it crashes?

No, that doesn't crash.

Further investigation revealed the crash to be:

(bare-env)[matthew@vagus ~]$ nosetests
~/dev_trees/numpy/numpy/lib/tests/test_io.py:TestFromTxt.test_with_masked_column_various
nose.config: INFO: Ignoring files matching ['^\\.', '^_', '^setup\\.py$']
Test masked column ... Bus error

Accordingly:

In [1]: import numpy as np

In [2]: from StringIO import StringIO

In [3]: data = StringIO('True 2 3\nFalse 5 6\n')

In [4]: test = np.genfromtxt(data, dtype=None, missing_values='2,5',
usemask=True)

In [6]: from numpy import ma

In [7]: control = ma.array([(1, 2, 3), (0, 5, 6)], mask=[(0, 1, 0),
(0, 1, 0)], dtype=[('f0', bool), ('f1', bool), ('f2', int)])

In [8]: test == control
Bus error

> Another thing you can do is compile with debug information enabled, then run
> the crashing case in gdb. This will look something like this:
>
> $ export CFLAGS=-g
> $ rm -rf build # make sure it's a fresh build from scratch
> $ python setup.py install --prefix=<dir> # or however you do it
> [... build printout]
> $ gdb python <script/options>
> [... gdb info]
> (gdb) run
>  [... script runs]
> Program received signal SIGSEGV, Segmentation fault,
> [crash address]
> (gdb) backtrace
> [full backtrace printout]
>
> Such a backtrace would be immensely helpful in tracking down why it's
> crashing.

I'll get back to you with this.

See you,

Matthew
_______________________________________________
NumPy-Discussion mailing list
NumPy-Discussion@scipy.org
http://mail.scipy.org/mailman/listinfo/numpy-discussion

Reply via email to