Comments (16)
This error still exists in joetmp:
==17651== Invalid read of size 8
==17651== at 0x4CB312:
Alembic::AbcCoreAbstract::v1::TimeSampling::getSampleTime(long) const (in
/home/jeffs/src_joetmp/alembic_build/lib/Alembic/AbcNice/Tests/AbcNice_PropertyT
ests)
==17651== by 0x44ECD5: readSimpleProperties(std::string const&) (in
/home/jeffs/src_joetmp/alembic_build/lib/Alembic/AbcNice/Tests/AbcNice_PropertyT
ests)
==17651== by 0x451076: main (in
/home/jeffs/src_joetmp/alembic_build/lib/Alembic/AbcNice/Tests/AbcNice_PropertyT
ests)
==17651== Address 0x4D28940 is 0 bytes inside a block of size 8 free'd
==17651== at 0x4A04DAC: operator delete[](void*) (vg_replace_malloc.c:256)
==17651== by 0x4CCC16:
boost::detail::sp_counted_impl_pd<Alembic::AbcCoreAbstract::v1::ArraySample*,
Alembic::AbcCoreAbstract::v1::TArrayDeleter<double> >::dispose() (in
/home/jeffs/src_joetmp/alembic_build/lib/Alembic/AbcNice/Tests/AbcNice_PropertyT
ests)
==17651== by 0x4AB1BE:
Alembic::AbcCoreHDF5::SimplePrImpl<Alembic::AbcCoreAbstract::v1::ScalarPropertyR
eader, Alembic::AbcCoreHDF5::SprImpl, void*>::~SimplePrImpl() (in
/home/jeffs/src_joetmp/alembic_build/lib/Alembic/AbcNice/Tests/AbcNice_PropertyT
ests)
==17651== by 0x4BCAE1: Alembic::AbcCoreHDF5::SprImpl::~SprImpl() (in
/home/jeffs/src_joetmp/alembic_build/lib/Alembic/AbcNice/Tests/AbcNice_PropertyT
ests)
==17651== by 0x4500C3: readSimpleProperties(std::string const&) (in
/home/jeffs/src_joetmp/alembic_build/lib/Alembic/AbcNice/Tests/AbcNice_PropertyT
ests)
==17651== by 0x451076: main (in
/home/jeffs/src_joetmp/alembic_build/lib/Alembic/AbcNice/Tests/AbcNice_PropertyT
ests)
Original comment by [email protected]
on 16 Nov 2010 at 10:59
from alembic.
This occurs in AbcNice_PropertyTests, but not the other tests
Original comment by [email protected]
on 16 Nov 2010 at 10:59
from alembic.
I've confirmed that this bug is still present. Changing the
lib/Alembic/AbcNice/Tests/PropertyTests.cpp to have the TimeSamplingType object
passed into the ODoubleProperty constructor retain time information for
constant samples made no difference (not that it should have, but you never
know). Looking in lib/Alembic/AbcCoreHDF5/SimplePrImpl.h at the
"getTimeSampling()" method, there's nothing obvious in there.
Here's some more valgrind output, with line numbers and stuff:
==25541== Invalid read of size 8
==25541== at 0x52B304:
Alembic::AbcCoreAbstract::v1::TimeSampling::getSampleTime(long) const
(TimeSampling.cpp:77)
==25541== by 0x4B5CFF: readSimpleProperties(std::string const&)
(PropertyTests.cpp:235)
==25541== by 0x4B773C: main (PropertyTests.cpp:453)
==25541== Address 0x4D27AD8 is 0 bytes inside a block of size 8 free'd
==25541== at 0x4A04DAC: operator delete[](void*) (vg_replace_malloc.c:256)
==25541== by 0x52E02B:
Alembic::AbcCoreAbstract::v1::TArrayDeleter<double>::operator()(void*) const
(ArraySample.h:170)
==25541== by 0x52E070:
boost::detail::sp_counted_impl_pd<Alembic::AbcCoreAbstract::v1::ArraySample*,
Alembic::AbcCoreAbstract::v1::TArrayDeleter<double> >::dispose()
(sp_counted_impl.hpp:144)
==25541== by 0x4B7D73: boost::detail::sp_counted_base::release()
(sp_counted_base_gcc_x86.hpp:145)
==25541== by 0x4B7DCF: boost::detail::shared_count::~shared_count()
(shared_count.hpp:217)
==25541== by 0x4E4DF6:
boost::shared_ptr<Alembic::AbcCoreAbstract::v1::ArraySample>::~shared_ptr()
(shared_ptr.hpp:169)
==25541== by 0x5136B9:
Alembic::AbcCoreHDF5::SimplePrImpl<Alembic::AbcCoreAbstract::v1::ScalarPropertyR
eader, Alembic::AbcCoreHDF5::SprImpl, void*>::~SimplePrImpl()
(SimplePrImpl.h:428)
==25541== by 0x51C7F0: Alembic::AbcCoreHDF5::SprImpl::~SprImpl()
(SprImpl.h:54)
==25541== by 0x50CACA: void
boost::checked_delete<Alembic::AbcCoreHDF5::SprImpl>(Alembic::AbcCoreHDF5::SprIm
pl*) (checked_delete.hpp:28)
==25541== by 0x50D1A0:
boost::detail::sp_counted_impl_p<Alembic::AbcCoreHDF5::SprImpl>::dispose()
(sp_counted_impl.hpp:78)
==25541== by 0x4B7D73: boost::detail::sp_counted_base::release()
(sp_counted_base_gcc_x86.hpp:145)
==25541== by 0x4B7DCF: boost::detail::shared_count::~shared_count()
(shared_count.hpp:217)
Original comment by [email protected]
on 16 Nov 2010 at 10:59
from alembic.
I'm having trouble grokking this bug... and don't have valgrind (yet). What is
the "big picture" view of it? When I do.. it does...
sorry to be thick - I read these stack traces and it's just confusing.
Original comment by [email protected]
on 16 Nov 2010 at 10:59
from alembic.
Investigating.
Original comment by [email protected]
on 16 Nov 2010 at 10:59
from alembic.
OK, I've winnowed down the test to its barest essence. In the branch
joesperiment, there is now lib/Alembic/AbcNice/Tests/OctessenceBug17.cpp. You
can see the source here:
http://alembic.lucasfilm.com/file/af212c137bb3/lib/Alembic/AbcNice/Tests/Octesse
nceBug17.cpp
This manifests when you get a TimeSampling thingy by doing (and this is a
really convoluted way to go, and not recommended programming practice):
const TimeSampling& ts =
GetCompoundPropertyReaderPtr( c0Props )->
getScalarProperty( "doubleprop" )->getTimeSampling();
where "c0Props" is an ICompoundProperty. If you do instead the following,
which is the recommended way to use the library:
IDoubleProperty dp( c0Props, "doubleprop" );
const TimeSampling& ts = dp.getTimeSampling();
then there is no problem.
I'd like to write a test that does the same thing as this, but using only the
CoreAbstract API, to see if the problem is there, or if there's something going
on at the Nice level that causes this.
Original comment by [email protected]
on 16 Nov 2010 at 10:59
from alembic.
One more data point: if you first get a ScalarPropertyReaderPtr, then call
getTimeSampling(), it works. Like this:
ScalarPropertyReaderPtr sprop = c0Props.getPtr()->
getScalarProperty( "doubleprop" );
const TimeSampling& ts = sprop->getTimeSampling();
This makes me think it's a bug in AbcCoreAbstract related to initialization of
the shared pointer.
Original comment by [email protected]
on 16 Nov 2010 at 10:59
from alembic.
A fix is pending. The problem is incorrect use of shared_ptr.
Original comment by [email protected]
on 16 Nov 2010 at 10:59
from alembic.
Can you elaborate on, "A fix is pending. The problem is incorrect use of
shared_ptr". While I do believe I made a mistake in the ptr usage, since the
usage of them is so pivotal to the library, I'd like to understand the problem
in case it is an example of a flawed understanding on my part. That way I can
check other places to see if I've made similar incorrect understandings.
Original comment by [email protected]
on 16 Nov 2010 at 10:59
from alembic.
after speaking with Brian, adjusting the time remaining to accurately reflect
what's left
Original comment by [email protected]
on 16 Nov 2010 at 10:59
from alembic.
Code changes were fairly small
Ctor for TimeSampling now takes an ArraySamplePtr (this is a boost shared_ptr)
this way the TimeSampling object will keep it's memory for the timeSamples
valid as laong as it is still in scope.
lib/Alembic/AbcCoreHDF5/SimplePrImpl.h also changed, because it implement
getTimeSampling () for all the Property types.
Lastly, udpated our unit tests, specifically a few unit tests manually build a
free standign TimSampling object (separate from properties).
Note, Joe is gracious helping with integration into the point_9 brnach
Original comment by [email protected]
on 16 Nov 2010 at 10:59
from alembic.
Hey, Joe, I think you've got this all taken care of, but _if_ it is useful
I've pushed a branch called
octessence17_merged_point_0_9
with merges
Original comment by [email protected]
on 16 Nov 2010 at 10:59
from alembic.
This is fixed in branch "joemetry". It was done by making getTimeSampling()
return a TimeSampling object by value, and having that object contain an
ArraySamplePtr with the actual time sample information.
Original comment by [email protected]
on 16 Nov 2010 at 10:59
from alembic.
It's working, hooray!
Original comment by [email protected]
on 16 Nov 2010 at 10:59
from alembic.
All the tests are also now passing on my Mac, double hooray!
Original comment by [email protected]
on 16 Nov 2010 at 11:00
from alembic.
SUH-WEEET!
:)
Original comment by [email protected]
on 16 Nov 2010 at 11:00
from alembic.
Related Issues (20)
- AbcExport seems it cannot compute bounding box correctly for some geometry. HOT 4
- Could add a -version or -debug flag to renderman procedural HOT 4
- SimpleAbcViewer aborts with SEGV, hdf5 missing attribute exception, exception in free() HOT 9
- setReadArraySampleCachePtr isn't multithread safe HOT 13
- Murmur3.cpp - BOOST_BIG_ENDIAN with PPC32 HOT 5
- refactor AbcGeom schema classes with a base type GeomBaseSchema HOT 4
- Point positions are V3f instead of P3f (houdini updates?) HOT 4
- Add new copyright header HOT 1
- AbcExport typo. HOT 5
- Need to support building Alembic libs as DSOs vs. static archives HOT 3
- Maya AbcExport does not preserve hard edges HOT 5
- New utility abcinfo that would report useful information about an alembic file - fps, timing, aggregate num objects in file HOT 6
- Maya AbcImport has inconsistency behavior when checking if a poly mesh is animated or not HOT 6
- Cannot build shared libs with Alembic 1.0 HOT 7
- SimpleAbcViewer not respecting IXformSchema::getInheritsXforms() HOT 12
- Read/Write per face per vertex color out of Maya for I/O PolyMesh/SubD HOT 6
- ArchvieINfo, decompose and refactor CreateArchiveWithInfo HOT 3
- Create exampoe code to show best-practice means to stream in IArchive HOT 4
- Tool to take two alembic input files and report differences HOT 7
- Tool that could build deltas (patches) and generate new alembic files HOT 5
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from alembic.