Opticks-18810 Open Session errors

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
Report Content as Inappropriate

Opticks-18810 Open Session errors

Ed Leaver
Hi. I'm working with a Fedora port of Opticks-18810, and have run into what appear to be errors when I Open-Session a saved session. The session consisted of a geotiff AVIRIS image, some spectral signatures, and an esri shapefile of their locations.

1. Its a moderately sized image -- 500 MB compressed (created elsewhere with Gdal geotiff COMPRESS=DEFLATE) or 1 GB not compressed. Opticks reads the image okay in a new session, but takes an inordinate amount of time to restore it from a saved session, giving no Progress feedback, consuming 100% cpu (1 thread), and appearing to be frozen. It isn't though, and after maybe five minutes the image is read and Opticks proceeds to crash with segfaults.

2. The first few appeared to be simple cast errors, static_cast where dynamic_cast was probably intended. Once fixed they invited a philosophical question:

3. When is an Interface not an Interface?

    The question arises in context of Utilities/SessionManagerImp::restoreSessionItem:
bool SessionManagerImp::restoreSessionItem(IndexFileItem &item)
   SessionItem* pSessionItem = item.mpItem;
      string("SessionItem '" + item.mType + "' not successfully created").c_str());
   ItemFilename filename;
   SessionItemDeserializerImp deserializer(mRestoreSessionPath + "/" + filename(item), item.mBlockSizes);
   if (pSessionItem->deserialize(deserializer) == false)  /// crash here, deserialize() is pure virtual
      destroyFailedSessionItem(item.mType, pSessionItem);
      item.mpItem = NULL;
      return false;
   return true;

The problem being that SessionItem is an Interface and SessionItem::deserialize() is pure virtual. I'm thinking that someone assumed item.mpItem was created as a SessionItemImp or better, something that actually inherits from SessionItem. 

SessionItemImp is not a subclass of SessionItem, and making it one raises a raft of other issues. No doubt fixable, but I suspect I'm dealing either with an out-of-date code base, or an un-exercised execution path. I see we are gunning for an Opticks-5.0.0 and don't wish to fix something that is no longer broke.

How might I proceed?

Ed Leaver

“Civilization is a race between education and catastrophe.” -H.G. Wells


Site24x7 APM Insight: Get Deep Visibility into Application Performance
APM + Mobile APM + RUM: Monitor 3 App instances at just $35/Month
Monitor end-to-end web transactions and take corrective actions now
Troubleshoot faster and improve end-user experience. Signup Now!
Opticks-devs mailing list
[hidden email]