> Rick,
>
> The most likely explanation is that you have two copies of OSG on your
> system, compiling against the headers of one, linking against the other.
>

That's the first thing I thought too. Some mismatch between a header and a
library, but I've double checked and I can't find anything installed
except the Fedora headers.

> Is the problem specific to your exact platform?  glutSimple runs fine
> elsewhere, including the Windows and Ubuntu boxes here.
>

Somehow it must be.

It is the MatrixTransform constructor that is stepping on the mutex data.
In debugging I noticed that _refMutex is located at 0x1b45ca8 and points
to 0x1b45e20 and _prvData points to 0x1b45e40. Then, when the
MatrixTransform constructor is called after all the parent constructors,
_matrix is initialized at address 0x1b45d98 and then _inverse is
initialized at address 0x1b45e18.

Thus _inverse is overlying the memory location _refMutex was allocated at.

I thought it might have something to do with the mutable keyword, but I
just wrote a small test that dynamically allocated a class with two
two-dimensional arrays (like the matrices) and in a parent dynamically
allocates another member... and no issues.

Which leads me back to thinking that an improper header is the issue. But,
I've grepped all of /usr/include for any other header that includes a
class named MatrixTransform and osg/MatrixTransform is the only one.

I'm going to rebuild inside of a clean chroot and see if anything changes.


> -Ben
>
>> -----Original Message-----
>> From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of
>> [EMAIL PROTECTED]
>> Sent: Tuesday, June 03, 2008 6:40 AM
>> To: osg-users@lists.openscenegraph.org
>> Cc: [EMAIL PROTECTED]
>> Subject: [vtp] Segfault in VTP, but looks like OSG
>>
>> I'm having trouble with a segfault in VTP's glutsimple application, but
>> it
>> looks like the problem traces back into OSG. For reference, I'm using
>> OSG
>> 2.2.0 on Fedora 9, and VTP 080506.
>>
>> Here's a backtrace:
>>
>> ScopedLock
>> OpenThreads/ScopedLock:31
>> osg::Referenced::ref                            osg/Referenced:128
>> osg::ref_ptr<osg::MatrixTransform>::operator=   osg/ref_ptr:50
>> vtTransform                                     NodeOSG.cpp:1223
>> ...
>>
>> [...]
>>
>> Anyone else encountered this? BTW, I tried OSG 2.4 and experienced the
>> same behavior.
>>
>> Thanks,
>>
>> Rick
>
> _______________________________________________
> osg-users mailing list
> osg-users@lists.openscenegraph.org
> http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
>

_______________________________________________
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org

Reply via email to