nightstyles / alembic

Automatically exported from code.google.com/p/alembic
Other
1 stars 0 forks source link

Pre-declaring AbcCoreAbstract::ObjectWriterPtr before opening the archive for writing causes them to stay open on close of archive, throwing an exception #76

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
If you pre-declare an ObjectWriterPtr or CompoundPropertyWriterPtr, then later 
on initialize it, when the archive closes, it throws an exception:

terminate called after throwing an instance of 'Alembic::Util::Exception'
  what():  Aw dang, man - I was all trying to close this HDF5 file, but there are still open objects.
That sucks, man.
Dsets: 0, Grps: 2, Dtyps: 0, Attrs: 0
Abort

Similarly, if you pre-declare on ObjectReaderPtr or CompoundPropertyReaderPtr, 
it segfaults on read.  I'll update this bug in a moment with the name of the 
test that fails.

Original issue reported on code.google.com by ard...@gmail.com on 16 Nov 2010 at 11:02

GoogleCodeExporter commented 9 years ago
OK, I've honed in on the essence of the bug.  If you declare, but not 
initialize, an ObjectWriterPtr that's not the top object of the archive BEFORE 
initializing the ArchiveWriter, it throws that exception.

Test file is attached.

Original comment by ard...@gmail.com on 16 Nov 2010 at 11:02

GoogleCodeExporter commented 9 years ago
discussed internally and not a P0 for the .9 release, as defined.

will address as top priority most likely shortly after the release and most 
likely prior to the 1.0.

Original comment by ard...@gmail.com on 16 Nov 2010 at 11:02

GoogleCodeExporter commented 9 years ago
Invalid; see 
http://groups.google.com/group/alembic-dev/browse_frm/thread/e524969d555ad7c4/17
f6d730de0abb2f?tvc=1#17f6d730de0abb2f

Original comment by ard...@gmail.com on 16 Nov 2010 at 11:03

GoogleCodeExporter commented 9 years ago
This is not invalid, the library was specifically designed to handle precisely 
this case.

There was a bug related to the order that derived class destructors are called 
in. It has been fixed in branch point9_oct58_fix.

Please verify.

Original comment by ard...@gmail.com on 16 Nov 2010 at 11:03

GoogleCodeExporter commented 9 years ago
Verified, and recommended for inclusion for .9.

Original comment by ard...@gmail.com on 16 Nov 2010 at 11:03