Hello all,
Carsten Neumann wrote:
> Carsten Neumann wrote:
>> With only one ref count shared across all aspect copies I'm not sure
>> if this can be fixed in 1.x, I'm currently double checking that it
>> works as expected in 2.0.
>
> attached is the 2.0 version of Marc's program; it crashes in
> Image::changed in the render thread.
> The problem comes from SimpleTexturedMaterial. It creates the
> TextureObjChunk for the Image with createLocal, but since the image
> comes from the app it is known across aspects, but it's parent (the
> TexObjChunk) exists only in one aspect.
> I think the right fix is to put the objects SimpleTexturedMaterial
> creates into (internal) fields and have them synced normally.
attached is a patch that implements that. With it applied I get:
renderThread: post sync: FieldContainerFactory::size(): 380
renderThread: post sync: Detected live FC 270 (1/1) rc 2
renderThread: post sync: Detected live FC Image id: 270 0xd94ac0 rc: 2
renderThread: post sync: Detected live FC 271 (1/1) rc 2
renderThread: post sync: Detected live FC TextureObjChunk id: 271
0xd96cb0 rc: 2
renderThread: post sync: Detected live FC 283 (1/2) rc 1 (2/2) rc 1
renderThread: post sync: Detected live FC SimpleMaterial id: 283
0xdb6300 rc: 1
renderThread: post sync: Detected live FC 284 (1/2) rc 1 (2/2) rc 1
renderThread: post sync: Detected live FC State id: 284 0xdb6460 rc: 1
renderThread: post sync: Detected live FC 285 (1/2) rc 2 (2/2) rc 2
renderThread: post sync: Detected live FC MaterialChunk id: 285 0xdb6520
rc: 2
renderThread: post sync: Detected live FC 286 (1/2) rc 1 (2/2) rc 1
renderThread: post sync: Detected live FC BlendChunk id: 286 0xdb66b0 rc: 1
renderThread: post sync: liveFC 6 liveFCInAspect 6 store size 380
createThread: FieldContainerFactory::size(): 380
createThread: Detected live FC 270 (1/1) rc 2
createThread: Detected live FC 271 (1/1) rc 2
createThread: Detected live FC 283 (1/2) rc 1 (2/2) rc 1
createThread: Detected live FC SimpleMaterial id: 283 0xd97d80 rc: 1
createThread: Detected live FC 284 (1/2) rc 1 (2/2) rc 1
createThread: Detected live FC State id: 284 0xd97f10 rc: 1
createThread: Detected live FC 285 (1/2) rc 2 (2/2) rc 2
createThread: Detected live FC MaterialChunk id: 285 0xd98090 rc: 2
createThread: Detected live FC 286 (1/2) rc 1 (2/2) rc 1
createThread: Detected live FC BlendChunk id: 286 0xd98250 rc: 1
createThread: liveFC 6 liveFCInAspect 4 store size 380
when running the program (with all #if 0 changed to #if 1). So there
still is an Image and a TextureObjChunk in the renderThread that I don't
think should be there (the remaining 4 objects are part of the default
material so that is ok).
> In general this means if an object is created with createLocal(), it
> must not point to something created with create().
well, actually it is the other way around, the parent pointer from Image
to TextureObjChunk is causing the problem, because it gets synced over,
but in the destination aspect the TexObjChunk does not exist (since it
was createLocal() ).
> Any ideas if it is possible to relax that or check/enforce it?
Cheers,
Carsten
------------------------------------------------------------------------------
Crystal Reports - New Free Runtime and 30 Day Trial
Check out the new simplified licensing option that enables unlimited
royalty-free distribution of the report engine for externally facing
server and web deployment.
http://p.sf.net/sfu/businessobjects
_______________________________________________
Opensg-core mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/opensg-core