Just as a follow up, I'm going to write a simple program that spawns a thread using OpenThreads and allocates memory to make sure our app isn't doing something perverse when it comes to memory management. It's possible that something isn't being cleaned up correctly in the main process when we start up the thread and "new" an object.
To muddy the waters further, it is probably worth mentioning that we don't see the aforementioned problem on earlier versions of Fedora. In those environments, the thread runs fine when we create an object dynamically. It's only when our app runs on Fedora core 13 that we start seeing the problem. I'll dig more and report my findings... -Shayne -----Original Message----- From: [email protected] [mailto:[email protected]] On Behalf Of Tueller,Shayne R Civ USAF AFMC 519 SMXS/MXDEC Sent: Thursday, November 18, 2010 9:08 AM To: OpenSceneGraph Users Subject: Re: [osg-users] thread hangs when LineSegmentIntersector is used... Robert, Thanks for the reply. No, our app does not override new and delete. It's using the standard operators in C++. I'm not sure on how to answer your last question. Are you referring to OpenThreads? -Shayne -----Original Message----- From: [email protected] [mailto:[email protected]] On Behalf Of Robert Osfield Sent: Thursday, November 18, 2010 8:55 AM To: [email protected] Subject: Re: [osg-users] thread hangs when LineSegmentIntersector is used... HI Shayne, Doing a new really shouldn't cause any threading problems. Does you app override new and delete? Is there something else unusual about our set that might break new and delete's thread safety? Robert. On Thu, Nov 18, 2010 at 3:07 PM, Shayne Tueller <[email protected]> wrote: > All, > > After further invesigation on why my thread is hanging, I narrowed it > down to when OSG creates an IntersectorGroup() object via the 'new' operator in the intersection code. > > Just for a sanity check, I did the following in the run() method of my thread: > > char *start = (char *)malloc(4) > > and it never returns after I issue the malloc() call. It would appear > that 'new' or malloc() hangs the thread. > > Do I need to do use some sort of special memory management scheme in OpenThreads when it comes to dynamic memory allocation? > > As stated earlier, I'm new to threaded programming so I'm probably > failing to do something that is needed in the case of dynamic memory allocation in a thread... > > Thank you! > > Shayne > > ------------------ > Read this topic online here: > http://forum.openscenegraph.org/viewtopic.php?p=33831#33831 > > > > > > _______________________________________________ > osg-users mailing list > [email protected] > http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph. > org > _______________________________________________ osg-users mailing list [email protected] http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
smime.p7s
Description: S/MIME cryptographic signature
_______________________________________________ osg-users mailing list [email protected] http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org

