Certain .iv files fail to load if application linked against pthread library

Certain .iv files fail to load if application linked against pthread library

Post by Mar » Sat, 23 Mar 2002 19:08:10



I am aware that Inventor is not thread safe (before anyone reminds
me!).  I am using 2 threads in my program, one which renders a scene
graph read in from a file, and one which uses the GL command
glReadPixels().  I have used mutexes to lock the
renderAction.apply(root) and glReadPixels().  However my code still
behave unreliably, sometimes running, and sometimes crashing.  This
could all be due to lack of threadsafeness. The really bizarre bit
however, is that if I link my program against the pthread library,
then certain inventor files always produce a segmentation fault when I
try to load them - even if the program itself contains no
multithreading whatsoever!  I would be very grateful if anyone could
shed some light on this problem!

Thanks very much,
Mari

 
 
 

Certain .iv files fail to load if application linked against pthread library

Post by Michael Hec » Sun, 24 Mar 2002 03:34:05



Quote:> I am aware that Inventor is not thread safe (before anyone reminds
> me!).  I am using 2 threads in my program, one which renders a scene
> graph read in from a file, and one which uses the GL command
> glReadPixels().  I have used mutexes to lock the
> renderAction.apply(root) and glReadPixels().  However my code still
> behave unreliably, sometimes running, and sometimes crashing.  This
> could all be due to lack of threadsafeness. The really bizarre bit
> however, is that if I link my program against the pthread library,
> then certain inventor files always produce a segmentation fault when I
> try to load them - even if the program itself contains no
> multithreading whatsoever!  I would be very grateful if anyone could
> shed some light on this problem!

What platform and what version of Open Inventor?

Linking against libpthread may cause the application to use a
different runtime library (the thread safe one).  In some cases
you must compile your code, possibly including Inventor, to use
the thread safe runtime (for example, using "-mt" on Solaris).

-Mike
 TGS Inc, http://www.tgs.com

--
Posted via Mailgate.ORG Server - http://www.Mailgate.ORG

 
 
 

Certain .iv files fail to load if application linked against pthread library

Post by Mar » Fri, 29 Mar 2002 21:32:09





> > I am aware that Inventor is not thread safe (before anyone reminds
> > me!).  I am using 2 threads in my program, one which renders a scene
> > graph read in from a file, and one which uses the GL command
> > glReadPixels().  I have used mutexes to lock the
> > renderAction.apply(root) and glReadPixels().  However my code still
> > behave unreliably, sometimes running, and sometimes crashing.  This
> > could all be due to lack of threadsafeness. The really bizarre bit
> > however, is that if I link my program against the pthread library,
> > then certain inventor files always produce a segmentation fault when I
> > try to load them - even if the program itself contains no
> > multithreading whatsoever!  I would be very grateful if anyone could
> > shed some light on this problem!

> What platform and what version of Open Inventor?

> Linking against libpthread may cause the application to use a
> different runtime library (the thread safe one).  In some cases
> you must compile your code, possibly including Inventor, to use
> the thread safe runtime (for example, using "-mt" on Solaris).

> -Mike
>  TGS Inc, http://www.tgs.com

I am working on a Dell 330 PC, running SuSE Linux 7.3, using the
2.4.14 kernel, and Inventor is version 2.1.

Thank you very much!

Mari