Hello Gerrit,
Gerrit Voß wrote:
> after making two minor changes, remove the artificial node level
> the osg loader introduces and to handle the name attachment correctly
> while writing, I get the attached diff when reading and writing the
> file (w1.osg) with testWindowGLUT (r2449). I will push the changes to
> the latest version. Assuming still have the problems could you run your
> test program with OSG_LOG_LEVEL=10 and sent me the output. And maybe
> try it with testWindowGLUT (the writing is disabled by default with
> #if 0).
>
> That the beacons have a node but no core is a bug inside the writer
> which can access and object even if there is only a weak reference
> left. While running the system itself sees no beacon.
urgh, this is a nasty side effect of the pointer fields' magic to make
them 'usable' as SF/MFFieldContainerPtr independent of what concrete
container type they point to or what ref counting is used. Wish I had
noticed that gap earlier... :(
The question is how to plug that hole without making it
impossible/inconvenient to write generic code that just follows pointers
to other containers? One (rather big) solution would be to remove the
Pointer{S|M}FieldBase types and operator-> from FieldHandle and instead
expand FieldHandle's interface a bit so that it allows accessing pointer
fields through virtual functions that take/return FieldContainer*.
Hm, would be nice if there was a way to avoid all that, but especially
for MFields it seems difficult, because PointerMFieldBase hands out
iterators which know nothing about ref counting (they are plain
std::vector<FieldContainer*>::iterator, not the ref counting aware
wrappers used by the actual PointerMField<> template). Any ideas?
Cheers,
Carsten
------------------------------------------------------------------------------
This SF.net email is sponsored by Sprint
What will you do first with EVO, the first 4G phone?
Visit sprint.com/first -- http://p.sf.net/sfu/sprint-com-first
_______________________________________________
Opensg-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/opensg-users