Open dmehring opened 11 months ago
I could reproduce the error, and got the following stack trace (boost and python stuff omitted). Just from this stacktrace, it looks like this may need changes in casacore.
gdb --args python3 -c 'from casacore.images import image; image("test_image.im")'
#0 0x00007f091af104a1 in __cxa_throw () from /lib/x86_64-linux-gnu/libstdc++.so.6
#1 0x00007f091a12c002 in void casacore::LogIO::postThenThrow<casacore::AipsError>(casacore::AipsError const&) ()
from /usr/local/lib/python3.10/dist-packages/casacore/images/../../python_casacore.libs/libcasa_casa-aa1f7f3c.so.7
#2 0x00007f091a12bb4a in casacore::operator<<(casacore::LogIO&, casacore::LogIO::Command) ()
from /usr/local/lib/python3.10/dist-packages/casacore/images/../../python_casacore.libs/libcasa_casa-aa1f7f3c.so.7
#3 0x00007f091c839471 in casacore::MeasTable::doInitObservatories() ()
from /usr/local/lib/python3.10/dist-packages/casacore/images/../../python_casacore.libs/libcasa_measures-3aaf8b1f.so.7
#4 0x00007f091f9afee8 in __pthread_once_slow (once_control=0x7f091c968760 <casacore::MeasTable::theirObsInitOnceFlag>, init_routine=0x7f091af3cd50 <__once_proxy>)
at ./nptl/pthread_once.c:116
#5 0x00007f091c83026d in casacore::MeasTable::Observatory(casacore::MPosition&, casacore::String const&) ()
from /usr/local/lib/python3.10/dist-packages/casacore/images/../../python_casacore.libs/libcasa_measures-3aaf8b1f.so.7
#6 0x00007f091e249aa6 in casacore::ObsInfo::setTelescope(casacore::String const&) ()
from /usr/local/lib/python3.10/dist-packages/casacore/images/../../python_casacore.libs/libcasa_coordinates-53a1c604.so.7
#7 0x00007f091e24c2fc in casacore::ObsInfo::fromRecord(casacore::String&, casacore::RecordInterface const&) ()
from /usr/local/lib/python3.10/dist-packages/casacore/images/../../python_casacore.libs/libcasa_coordinates-53a1c604.so.7
#8 0x00007f091e1ef33e in casacore::CoordinateSystem::restore(casacore::RecordInterface const&, casacore::String const&) ()
from /usr/local/lib/python3.10/dist-packages/casacore/images/../../python_casacore.libs/libcasa_coordinates-53a1c604.so.7
#9 0x00007f091e76e92c in casacore::PagedImage<float>::restoreAll(casacore::TableRecord const&) ()
from /usr/local/lib/python3.10/dist-packages/casacore/images/../../python_casacore.libs/libcasa_images-a6905fae.so.7
#10 0x00007f091e76eb60 in casacore::PagedImage<float>::PagedImage(casacore::Table&, casacore::MaskSpecifier, unsigned int) ()
from /usr/local/lib/python3.10/dist-packages/casacore/images/../../python_casacore.libs/libcasa_images-a6905fae.so.7
#11 0x00007f091e7e3884 in casacore::ImageOpener::openPagedImage(casacore::String const&, casacore::MaskSpecifier const&) ()
from /usr/local/lib/python3.10/dist-packages/casacore/images/../../python_casacore.libs/libcasa_images-a6905fae.so.7
#12 0x00007f091e7e3ef3 in casacore::ImageOpener::openImage(casacore::String const&, casacore::MaskSpecifier const&) ()
from /usr/local/lib/python3.10/dist-packages/casacore/images/../../python_casacore.libs/libcasa_images-a6905fae.so.7
#13 0x00007f091e83a3f3 in casacore::ImageProxy::openImageOrExpr(casacore::String const&, casacore::MaskSpecifier const&, casacore::Block<casacore::LatticeExprNode> const&) ()
from /usr/local/lib/python3.10/dist-packages/casacore/images/../../python_casacore.libs/libcasa_images-a6905fae.so.7
#14 0x00007f091e83f588 in casacore::ImageProxy::openImage(casacore::String const&, casacore::String const&, std::vector<casacore::ImageProxy, std::allocator<casacore::ImageProxy> > const&) () from /usr/local/lib/python3.10/dist-packages/casacore/images/../../python_casacore.libs/libcasa_images-a6905fae.so.7
#15 0x00007f091e83f821 in casacore::ImageProxy::ImageProxy(casacore::String const&, casacore::String const&, std::vector<casacore::ImageProxy, std::allocator<casacore::ImageProxy> > const&) () from /usr/local/lib/python3.10/dist-packages/casacore/images/../../python_casacore.libs/libcasa_images-a6905fae.so.7
#16 0x00007f091f3db125 in boost::python::objects::value_holder<casacore::ImageProxy>::value_holder<boost::python::objects::reference_to_value<casacore::String>, boost::python::objects::reference_to_value<casacore::String>, boost::python::objects::reference_to_value<std::vector<casacore::ImageProxy, std::allocator<casacore::ImageProxy> > > > (a2=..., a1=...,
a0=..., self=0x7f091f69c900, this=0x7f0917c61c58) at /opt/boost/include/boost/python/object/forward.hpp:74
Yes, the messages come from the casacore measures code. So, maybe this ticket is more appropriate for casacore, but I don't have a sample C++ program for it :), although I'm guessing one of the casacore test programs that opens an image could be used to reproduce the error.
Good point. Let's continue the issue in https://github.com/casacore/casacore/issues/1321
Is this issue fixed? Does python-casacore 3.6.1 does not depend on casadata?
We'd like not to have to install casadata, which is a fairly large package. However, opening an image will fail without the Observatories table which is part of casadata. Can code be modified to eliminate the casadata dependency? I believe any image will reproduce the error, but if not I can make mine available.