Hi,

We have a large app that uses Qt for its 2D UI and OSG for 3D rendering and UI. 
So it seemed like a good idea to turn on the Qt<->OpenThreads integration by 
enabling BUILD_OPENTHREADS_WITH_QT.

However, I discovered that OpenThreads::Thread::CurrentThread() (in 
src/OpenThreads/qt/QtThread.cpp) does:


Code:
QtThreadPrivateData* pd = 
static_cast<QtThreadPrivateData*>(QThread::currentThread());


 
If this is called when the current thread is a QThread that's not an 
OpenThreads Thread, the cast isn't valid and Bad Things(TM) will happen.

This happens in our application (and when we're lucky we get a seg fault).

We can disable BUILD_OPENTHREADS_WITH_QT without significant problem, but I 
wanted to report the bug and suggest that the documentation be changed to tell 
people not to enable this until it's fixed.

BTW, we are using Qt 4.8.1 on RHEL5, but it looks like this problem could occur 
on any platform.

Thank you!

Cheers,
Chris

------------------
Read this topic online here:
http://forum.openscenegraph.org/viewtopic.php?p=50335#50335





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

Reply via email to