Hello Michael,

On 08/25/2011 08:21 AM, Michael Raab wrote:
> I think I solved this issue. Indeed the problem was that the OSGTreeRenderer 
> calls win->frameInit() directly. In case of a ClusterWindow, frameInit means 
> sending the sync packet from client to server. As ClusterWindow itself sends 
> the packet before, the server is waiting for the swap command but receives 
> the sync message. That caused the crash.
> As I derive from ClusterWindow I simply separated the sync code from the 
> frameInit call and now it works. Nevertheless may be someone who knows the 
> ShadowViewport code may have a look if directly calling win->frameInit() 
> there is necessary.

glad to hear you found a solution/workaround. Sorry for being 
unresponsive at the moment, but I have some work that is on a tight 
deadline...
FWIW the frameInit call from the ShadowViewport looks suspicious, 
normally it is a Window's responsibility to call frameInit before 
passing control to the viewports - I'm not familiar enough with the 
details of ShadowViewport to say if it needs special handling here.

> The bad news is I have another problem. I'm able turn on shadow rendering 
> during run-time by creating new ShadowViewports. But when I try to turn 
> shadow rendering off (by destroying the shadow viewports) the application 
> crashes again. The crash arises when the sync arrives at the server side. The 
> server tries to delete the appropriate shadow viewports. The shadow viewport 
> destructor is called. The crash happens in function clearLights() line 1372 
> (OSGShadowViewport.cpp)
>
> getRoot()->subChild(_lightCamBeacons[i]);
>
> Seems that either getRoot() or _lightCamBeacons[i] points to something wrong. 
> Have someone ever tried to use ShadowViewports in cluster configurations (and 
> tried to sync the destruction of such a viewport)?

my guess would be that root has already been set to NullFC by the sync, 
it should be checked before being accessed in clearLights.
If _lightCamBeacons[i] does not point to something valid I'd say the 
ShadowViewport is missing addRefCP calls when adding light beacons to 
this vector.

        Cheers,
                Carsten

------------------------------------------------------------------------------
EMC VNX: the world's simplest storage, starting under $10K
The only unified storage solution that offers unified management 
Up to 160% more powerful than alternatives and 25% more efficient. 
Guaranteed. http://p.sf.net/sfu/emc-vnx-dev2dev
_______________________________________________
Opensg-users mailing list
Opensg-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/opensg-users

Reply via email to