Hi,

On Sat, 2009-06-13 at 00:37 -0500, Carsten Neumann wrote:
>       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:

no patch attached ?


> > 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() ).
> 

hmm, I don't see a direct sync problem but I do see the following
general problems:

- image::change does not check if the parent ptr is NULL. This
  happens because the weak ptr returns NULL as the createThreads
  object goes out of scope.

- there is a chance for a race condition when image calls
  parent->changed and the createThread has the parent run resolveLinks.
  But in this case this should not be a problem as parent::changed and
  parent::resolveLinks are disjunct. But it is something to think
  about.

- If the createThread manages to change the image::parent field
  again after the sync the parent link in the rendering thread is 
  lost. That is not really nice and has cropped up here and there
  (most famously in window) and something that needs a general
  solution.


kind regards,
  gerrit




------------------------------------------------------------------------------
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

Reply via email to