Ticket #617 (closed defect: fixed)

Opened 11 years ago

Last modified 7 years ago

Abort in python constructing a MaskedImage from a single Image

Reported by: rowen Owned by: rhl
Priority: normal Milestone:
Component: afw Keywords:
Cc: Blocked By: #619
Blocking: Project: LSST
Version Number: 3.3
How to repeat:

See description.


Trying to construct a MaskedImageD from an ImageD in Python causes an abort. This example uses an image from afwdata:

>>> import lsst.afw.image as afwImage
>>> im = afwImage.ImageD("small_img.fits")
>>> mi = afwImage.MaskedImageD(im)
python: /astro/apps/lsst_64/Linux64/external/boost/1.36.0+1/include/boost/shared_ptr.hpp:419: T* boost::shared_ptr<T>::operator->() const [with T = lsst::afw::image::Mask<short unsigned int>]: Assertion `px != 0' failed.

This is seen on linux 64 (using afw 3.3) and also MacOS X (using afw trunk rev svn7234). The following is from linux 64:

-bash-3.2$ eups list
activemqcpp           2.1-RC1   	Current
afw                   3.3       	Current Setup
afw                   svn7091   
afw                   svn7136   
afwdata               svn7218   	Current Setup
autoconf              2.60      	Current
base                  3.1       	Current Setup
boost                 1.36.0+1  	Current Setup
boost                 1.37.0    
cfitsio               3006.2    	Current Setup
daf_base              3.2       	Current Setup
daf_data              3.2       
daf_data              3.2.1     	Current Setup
daf_persistence       3.3       	Current Setup
doxygen               1.5.4     
doxygen               1.5.8     	Current Setup
eups                  LOCAL:/astro/apps/lsst_64/eups/1.1.0	Setup
lsst                  1.0       	Current Setup
lssteups              1.0       	Current Setup
minuit                1.7.9     	Current Setup
mpich2                1.0.5p4   	Current Setup
mysqlclient           5.0.45+1  	Current Setup
numpy                 1.0.1     	Current Setup
pex_exceptions        3.2       	Current Setup
pex_logging           3.2       	Current Setup
pex_policy            3.2       	Current Setup
python                2.5.2     	Current Setup
scons                 3.2       
scons                 3.3       	Current Setup
sconsDistrib          0.98.5    	Current Setup
sconsUtils            3.2       
sconsUtils            3.3       	Current Setup
security              3.2       	Current Setup
swig                  1.3.36+2  	Current Setup
tcltk                 8.5a4     	Current Setup
utils                 3.4       	Current Setup
wcslib                4.2+3     	Current Setup
xpa                   2.1.7b2   	Current Setup

Change History

comment:1 Changed 11 years ago by rhl

  • Status changed from new to assigned
  • Blocked By 619 added

I can reproduce this and have added it to afw/tests. It's probably the same as #619

comment:2 Changed 11 years ago by rhl

  • Blocked By 619 removed

No, nothing to do with #619. The problem was that I check that the Mask and Variance are the same size as the Image --- and in this case there was no Mask or Variance hence the deref of a NULL pointer.

Fixed in r7273

comment:3 Changed 11 years ago by rhl

  • Status changed from assigned to closed
  • Resolution set to fixed

Now that I've removed the fictitious block from #619, I can close the ticket.

comment:4 Changed 11 years ago by rhl

  • Blocked By 619 added

(In #619) The "mysterious failure" was due to afw not using the new LSST_EXCEPT macro. I fixed this, and the problem is that reading double (bitpix == -64) images was explicitly commented out of the code. I put it back, and all is well.

Fixed on source:DMS/afw/tickets/619 at r7275

comment:5 Changed 7 years ago by robyn

  • Milestone DC3a Apps Framework deleted

Milestone DC3a Apps Framework deleted

Note: See TracTickets for help on using tickets.