Ticket #389 (closed defect: fixed)

Opened 11 years ago

Last modified 7 years ago

Abort in DataProperty

Reported by: rowen Owned by: rhl
Priority: normal Milestone:
Component: daf_base Keywords:
Cc: Blocked By:
Blocking: Project: LSST
Version Number:
How to repeat:
Setup afw
cd $AFWDATA_DIR
run python and paste in the following text:
import lsst.afw.image as afwImage
im = afwImage.ImageF()
im.readFits("small_MI_img.fits")
md = im.getMetadata()
md.isNode()

Description

Calling isNode() on metadata returned from an afw Image causes an abort.

See "how to repeat" for a script that aborts reliably for me. The metadata object in question ("md" in the script) is reported to be a: <lsst.daf.base.baseLib.DataPropertyPtrType?; proxy of <Swig Object of type 'lsst::daf::base::DataProperty::PtrType? *' at 0x1113610> >

This is on MacOS X 10.4.11. My eups list is as follows:

activemqcpp            2.1-RC1                   Current
afw                    999                       Current Setup
afwdata                999                       Current Setup
base                   999                       Current Setup
boost                  1.34.1                    Current Setup
build                  1.3       
build                  1.4                       Current
cfitsio                3006                      Current Setup
coadd_kaiser           999                       Current
coral                  1_9_0+1                   Current
core                   1.2                       Current
ctrl_events            999                       Current
daf_base               999                       Current Setup
daf_data               999                       Current Setup
daf_persistence        999                       Current Setup
detection              999                       Current
doxygen                1.5.4                     Current Setup
flex                   2.5.33                    Current Setup
fw                     1.2       
gsl                    1.8                       Current
imageproc              trunk     
ip_diffim              354       
ip_diffim              999                       Current
jaula                  1.2.0+1                   Current Setup
lam                    7.1.2                     Current
minuit                 1.7.9                     Current Setup
mpich2                 1.0.5p4                   Current
mwi                    1.1       
mwi                    2.0       
mysqlclient            5.0.45+1                  Current Setup
mysqlclient            5.0.45-1  
numarray               1.5.1                     Current
numpy                  1.0.1                     Current Setup
numpy                  1.0.4     
pcre                   7.4                       Current
pex_exceptions         999                       Current Setup
pex_harness            999                       Current
pex_logging            999                       Current Setup
pex_policy             999                       Current Setup
pyfits                 1.0.1                     Current
python                 2.5                       Current Setup
readline               5.2                       Current Setup
scons                  1.18                      Current Setup
sconsDistrib           0.97                      Current Setup
sconsUtils             1.18      
sconsUtils             999                       Current Setup
seal                   1_9_2+1                   Current
security               999                       Current Setup
sextractor             2.5.0                     Current
swig                   1.3.31    
swig                   1.3.34                    Current Setup
tcltk                  8.5a4                     Current Setup
termcap                1.3.1                     Current Setup
utils                  999                       Current Setup
vw                     1.0.1+1   
vw                     1.0.1+3                   Current Setup
vw                     1.0.1     
vwlapack               1.0.0                     Current Setup
wcslib                 4.2-lsst.2                Current Setup
wcstools               3.6.2                     Current
xpa                    2.1.7b2                   Current Setup

Change History

comment:1 Changed 11 years ago by rowen

The abort error is:{{{ /Users/rowen/lsst_root/DarwinX86/external/boost/1.34.1/include/boost/shared_ptr.hpp:315: failed assertion `px != 0' Abort trap }}}

comment:2 Changed 11 years ago by ktl

  • Status changed from new to assigned

comment:3 Changed 11 years ago by ktl

  • Owner changed from ktl to rowen
  • Status changed from assigned to needinfo

Works for me on Linux RHEL4 with boost 1.36.0 and all tagged versions (in particular daf_base 3.0) except afw trunk. Please retry with the latest boost.

comment:4 Changed 11 years ago by rowen

Note: the image object "im" has both a getMetaData method and a getMetadata method. Only the latter causes the abort.

comment:5 Changed 11 years ago by ktl

  • Owner changed from rowen to ktl
  • Status changed from needinfo to assigned

The getMetadata() method comes from the LsstData base class. Since no LsstData metadata has been set, it returns a null pointer that cannot be dereferenced.

Presumably, given the new metadata strategy, getMetadata() should become getExtraMetadata(), with the generic extraMetadata instance variable owned by the LsstData base class. This will need to be discussed (at the DC3 telecon?) before implementation.

comment:6 Changed 10 years ago by rowen

This brings up two issues:

  • We should settle on a standard spelling of "metadata" (d or D?)
  • Need an empty metadata be a null pointer, or can it be an empty container? The latter would have been better in this case, at least from the Python perspective. I sincerely hope that the new DecoratedImage? class will have empty metadata if it has none, never a null pointer.

comment:7 Changed 10 years ago by ktl

  • Owner changed from ktl to rhl

Per the DC3 telecon today, ImageF will need to change to use the LsstBase-provided metadata. #396 asks for LsstBase to change to avoid the abort in this ticket.

comment:8 Changed 10 years ago by robyn

  • Milestone set to DC3 MW Interface

comment:9 Changed 10 years ago by rhl

  • Status changed from assigned to closed
  • Resolution set to fixed
  • reviewstatus changed from notReady to selfReviewed

The requested change (to use LsstBase not a class-specific set of metadata) is in [6385].

This applies to DecoratedImage, not Image itself, as the latter doesn't have any metadata; think what it would mean to add two Images --- how should we add the metadata? This argument convinces me that we should remove the metadata from LsstBase, but that's another ticket (Image does inherit indirectly from LsstBase, but doesn't use its metadata).

In answer to Russell's question, DecoratedImage gets its metadata from LsstBase so the question of whether it's NULL is answered elswhere (the pythn side is answered in #396). I ensure that the metadata's set up to store FITS data by calling

setMetadata(lsst::daf::base::DataProperty::createPropertyNode("FitsMetadata"));

so it should never be NULL in this context.

comment:10 Changed 10 years ago by ktl

This begs the question as to whether Image should be an LsstBase. Should it have all the attendant apparatus associated with it?

comment:11 Changed 7 years ago by robyn

  • Milestone DC3a MW Interface deleted

Milestone DC3a MW Interface deleted

Note: See TracTickets for help on using tickets.