Re: [osg-users] Crash with DrawThreadPerContext

2007-02-23 Thread Tugkan Calapoglu
Hi Robert, Hi Tugkan, Are you able to get a stack trace? Yes, attached. This is the console output of the program, which I sent you yesterday, when it is started in gdb. It is taken on Suse10.2, Core 2 Duo, Quaddro FX 4500. The line Failed to read a valid object file image from memory.

Re: [osg-users] Crash with DrawThreadPerContext

2007-02-23 Thread Robert Osfield
Hi Tugkan, From the stack trace it looks to me like a StateSet or StateAttribute has been deleted while the rendering thread is still using it. This something that can happen in the DrewThreadPerContext/CullThreadPerCameraDrawThreadPerContext thread models if objects are deleted and the

Re: [osg-users] Crash with DrawThreadPerContext

2007-02-23 Thread Tugkan Calapoglu
Hi Robert, The message comes from osg::AlphaFunc. I've attached the stack trace. I've added af-setThreadSafeRefUnref( true ) but this didn't change anything. The message still comes and crash occurs with the same stack trace. I've done the same for the state set also and nothing changed.

Re: [osg-users] Crash with DrawThreadPerContext

2007-02-23 Thread Tugkan Calapoglu
Hi Robert, In include/osg/DeleteHandler there is following method: inline void doDelete(const Referenced* object) { delete object; } Shouldn't it be object-unref() instead? tugkan Hi Robert, The message comes from osg::AlphaFunc. I've attached the stack trace. I've added

Re: [osg-users] Crash with DrawThreadPerContext

2007-02-23 Thread Robert Osfield
Hi Tugkan, On 2/23/07, Tugkan Calapoglu [EMAIL PROTECTED] wrote: Hi Robert, In include/osg/DeleteHandler there is following method: inline void doDelete(const Referenced* object) { delete object; } Shouldn't it be object-unref() instead? No, the DeleteHandler does the actual delete itself.

Re: [osg-users] Crash with DrawThreadPerContext

2007-02-23 Thread Robert Osfield
HI Tugkan, On 2/23/07, Tugkan Calapoglu [EMAIL PROTECTED] wrote: Hi Robert, The message comes from osg::AlphaFunc. I've attached the stack trace. I've added af-setThreadSafeRefUnref( true ) but this didn't change anything. The message still comes and crash occurs with the same stack trace.

Re: [osg-users] Crash with DrawThreadPerContext

2007-02-23 Thread Tugkan Calapoglu
Hi Robert, This was a step in the correct direction I think. Adding osg::Referenced::setThreadSafeReferenceCounting(true); solved the problem. I removed all setThreadSafeRefUnref()'s and it was still ok. Maybe setThreadSafeReferenceCounting should be automatically enabled depending on the

Re: [osg-users] Crash with DrawThreadPerContext

2007-02-23 Thread Robert Osfield
Hi Tugkan, On 2/23/07, Tugkan Calapoglu [EMAIL PROTECTED] wrote: This was a step in the correct direction I think. Adding osg::Referenced::setThreadSafeReferenceCounting(true); solved the problem. I removed all setThreadSafeRefUnref()'s and it was still ok. Maybe setThreadSafeReferenceCounting

Re: [osg-users] Crash with DrawThreadPerContext

2007-02-22 Thread Robert Osfield
Hi Tugkan, Thanks for the example code. I've enable the compile of each of the three #if #elif sections in term and they are run and exit cleanly. Nothing appers to be amiss. Are you using the latest OSG in SVN? W.r.t when its safe to modify the scene graph, its safe to modify any DYNAMIC

Re: [osg-users] Crash with DrawThreadPerContext

2007-02-22 Thread Tugkan Calapoglu
Hi Robert, Hi Tugkan, Thanks for the example code. I've enable the compile of each of the three #if #elif sections in term and they are run and exit cleanly. Nothing appers to be amiss. Are you using the latest OSG in SVN? This seems strange. I have made the tests with SVN version from

Re: [osg-users] Crash with DrawThreadPerContext

2007-02-22 Thread Robert Osfield
Hi Tugkan, Are you able to get a stack trace? Robert. On 2/22/07, Tugkan Calapoglu [EMAIL PROTECTED] wrote: Hi Robert, Hi Tugkan, Thanks for the example code. I've enable the compile of each of the three #if #elif sections in term and they are run and exit cleanly. Nothing appers to be

[osg-users] Crash with DrawThreadPerContext

2007-02-21 Thread Tugkan Calapoglu
Hi, I've run into a problem regarding DrawThreadPerContext mode. At the moment our application is stable with other threading modes but in DrawThreadPerContext mode it crashes in a few seconds. I've updated OSG from SVN today in the morning. Platform is SusE9.3, Intel Core 2 Duo. Stack

Re: [osg-users] Crash with DrawThreadPerContext

2007-02-21 Thread Robert Osfield
HI Tugkan, The most likely cause is state or drawables being updated while the draw thread is still reading from them, the mechanism to prevent the them overlapping this is based on the use of DataVariance being set to DYNAMIC. See my previous posts on this topic. Robert. On 2/21/07, Tugkan