Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

python-casacore segfaults on faulty image data and calling tofits() #69

Open
gijzelaerr opened this issue Aug 18, 2016 · 1 comment
Open
Labels
Milestone

Comments

@gijzelaerr
Copy link
Member

Sure it should not process faulty data, but it should not crash or segfault. calling .getdata() doesnt't crash.

>>> from casacore.images import image
>>> x.getdata()
---------------------------------------------------------------------------
RuntimeError                              Traceback (most recent call last)
<ipython-input-8-8afe7a814c4c> in <module>()
----> 1 x.getdata()

/home/gijs/Work/tkp/.virtualenv/local/lib/python2.7/site-packages/casacore/images/image.pyc in getdata(self, blc, trc, inc)
    296         return self._getdata (self._adjustBlc(blc),
    297                               self._adjustTrc(trc),
--> 298                               self._adjustInc(inc));
    299 
    300     # Negate the mask; in numpy True means invalid.

RuntimeError: BucketCache::getBucket: bucket 29 exceeds nr of buckets

>>> x.tofits('bla')
terminate called after throwing an instance of 'casa::AipsError'
  what():  FiledesIO /home/gijs/S301_R0-62_T02-06-2016_21-27-41.image/table.f0_TSM0is not writable
    5671 abort (core dumped)  ~/Work/tkp/.virtualenv/bin/ipython
@gijzelaerr gijzelaerr added the bug label Aug 18, 2016
@gijzelaerr
Copy link
Member Author

link to example bad casacore image https://www.dropbox.com/s/841zwd32ajfvimv/error.tgz?dl=0

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant