[osg-users] Mac OS X 10.5 crash in osgText

Hartmut Seichter lists at technotecture.com
Thu Sep 11 14:40:09 PDT 2008


Well, sorry I forgot to mention it certainly works with singlethreaded 
mode. I could try to reproduce it with a simpler example but I think 
osgviewer is as lean as it gets. If I don't switch on the HUD in 
osgviewer the problem does not occur - or lets say I can't reproduce it.
We have some other applications which could benefit from multi threading 
but show exactly the same behaviour when using a HUD i.e osgText.

H


Robert Osfield wrote:
> Hi Hartmut,
>
> The FreeType plugin usage is guarded to prevent thread problems so
> while FreeType isn't thread safe, this shouldn't affect OSG-2.6, and
> almost certainly has no barring on the crash you describe.
>
> The crash you looks to be CGL issue, whether this is a threading issue
> or otherwise I cannot say at this stage.  Try chnaging the threading
> models in osgviewer by pressing 'm', or run the app with the command
> line option --SingleThreaded etc.
>
> Robert.
>
> On Thu, Sep 11, 2008 at 12:23 PM, Hartmut Seichter
> <lists at technotecture.com> wrote:
>   
>> I seen some other threads mentioning FreeType not being thread save. This is
>> OSG 2.6 branch
>>
>> This is replicable with plain osgviewer on OSX  on a MBP 2.4
>>
>> To replicate:
>>
>> export OSG_WINDOW='20 20 800 600'
>>
>> open osgviewer cow.osg
>>
>> press 's' to show the stats
>>
>> with '<' and '>' go up and down the window resolutions ...
>>
>> it crashes always at the same point ... see below
>>
>> Is there any solution? If so will it be backported to 2.6?
>>
>> Cheers,
>> Hartmut
>>
>>
>>
>>
>> Process:         osgviewer [1487]
>> Path:            /usr/local/bin/osgviewer
>> Identifier:      osgviewer
>> Version:         ??? (???)
>> Code Type:       X86 (Native)
>> Parent Process:  bash [183]
>>
>> Date/Time:       2008-09-11 20:53:13.980 +1200
>> OS Version:      Mac OS X 10.5.4 (9E17)
>> Report Version:  6
>>
>> Exception Type:  EXC_BAD_ACCESS (SIGSEGV)
>> Exception Codes: KERN_INVALID_ADDRESS at 0x0000000019274010
>> Crashed Thread:  2
>>
>> Thread 0:
>> 0   libSystem.B.dylib                 0x961f84a6 mach_msg_trap + 10
>> 1   libSystem.B.dylib                 0x961ffc9c mach_msg + 72
>> 2   com.apple.CoreGraphics            0x94deab4d _CGSRemoveSurface + 133
>> 3   com.apple.agl                     0x94d1dc56 aglSetDrawable + 448
>> 4   libosgViewer.44.dylib             0x0017a460
>> osgViewer::GraphicsWindowCarbon::setWindowDecorationImplementation(bool) +
>> 426
>> 5   libosgViewer.44.dylib             0x00176ed0
>> osgViewer::GraphicsWindow::setWindowDecoration(bool) + 38
>> 6   libosgViewer.44.dylib             0x00174959
>> osgViewer::WindowSizeHandler::changeWindowedResolution(osgViewer::GraphicsWindow*,
>> bool) + 1039
>> 7   libosgViewer.44.dylib             0x0017500c
>> osgViewer::WindowSizeHandler::handle(osgGA::GUIEventAdapter const&,
>> osgGA::GUIActionAdapter&) + 670
>> 8   libosgViewer.44.dylib             0x00126752
>> osgGA::GUIEventHandler::handle(osgGA::GUIEventAdapter const&,
>> osgGA::GUIActionAdapter&, osg::Object*, osg::NodeVisitor*) + 38
>> 9   libosgViewer.44.dylib             0x001192d4
>> osgGA::GUIEventHandler::handleWithCheckAgainstIgnoreHandledEventsMask(osgGA::GUIEventAdapter
>> const&, osgGA::GUIActionAdapter&, osg::Object*, osg::NodeVisitor*) + 120
>> 10  libosgViewer.44.dylib             0x0016a27c
>> osgViewer::Viewer::eventTraversal() + 4620
>> 11  libosgViewer.44.dylib             0x0016eb21
>> osgViewer::ViewerBase::frame(double) + 159
>> 12  libosgViewer.44.dylib             0x0016ea65
>> osgViewer::ViewerBase::run() + 239
>> 13  libosgViewer.44.dylib             0x00161080 osgViewer::Viewer::run() +
>> 182
>> 14  osgviewer                         0x0000865b main + 6241
>> 15  osgviewer                         0x00006dce start + 54
>>
>> Thread 1:
>> 0   libSystem.B.dylib                 0x961ff68e __semwait_signal + 10
>> 1   libSystem.B.dylib                 0x9622a36d pthread_cond_wait$UNIX2003
>> + 73
>> 2   libGLProgrammability.dylib        0x93b92432 glvmDoWork + 162
>> 3   libSystem.B.dylib                 0x962296f5 _pthread_start + 321
>> 4   libSystem.B.dylib                 0x962295b2 thread_start + 34
>>
>> Thread 2 Crashed:
>> 0   ???                               0x121ef200 0 + 304017920
>> 1   GLEngine                          0x00ed531a
>> gleDrawArraysOrElements_ExecCore + 266
>> 2   GLEngine                          0x00ed6278
>> gleDrawArraysOrElements_IMM_Exec + 1080
>> 3   libGL.dylib                       0x96ddd7f1 glDrawArrays + 113
>> 4   libosgText.44.dylib               0x002b4d55
>> osgText::Text::drawForegroundText(osg::State&, osgText::Text::GlyphQuads
>> const&, osg::Vec4f const&) const + 527
>> 5   libosgText.44.dylib               0x002b5ac0
>> osgText::Text::renderOnlyForegroundText(osg::State&, osg::Vec4f const&)
>> const + 118
>> 6   libosgText.44.dylib               0x002b61bb
>> osgText::Text::drawImplementation(osg::State&, osg::Vec4f const&) const +
>> 1117
>> 7   libosgText.44.dylib               0x002b68f1
>> osgText::Text::drawImplementation(osg::RenderInfo&) const + 107
>> 8   libosgViewer.44.dylib             0x00140e72
>> osgViewer::TextDrawCallback::drawImplementation(osg::RenderInfo&,
>> osg::Drawable const*) const + 548
>> 9   libosgUtil.44.dylib               0x0052082e
>> osg::Drawable::draw(osg::RenderInfo&) const + 412
>> 10  libosgUtil.44.dylib               0x00520368
>> osgUtil::RenderLeaf::render(osg::RenderInfo&, osgUtil::RenderLeaf*) + 266
>> 11  libosgUtil.44.dylib               0x00516a62
>> osgUtil::RenderBin::drawImplementation(osg::RenderInfo&,
>> osgUtil::RenderLeaf*&) + 386
>> 12  libosgUtil.44.dylib               0x005168dd
>> osgUtil::RenderBin::draw(osg::RenderInfo&, osgUtil::RenderLeaf*&) + 107
>> 13  libosgUtil.44.dylib               0x00516cbb
>> osgUtil::RenderBin::drawImplementation(osg::RenderInfo&,
>> osgUtil::RenderLeaf*&) + 987
>> 14  libosgUtil.44.dylib               0x00524179
>> osgUtil::RenderStage::drawImplementation(osg::RenderInfo&,
>> osgUtil::RenderLeaf*&) + 1005
>> 15  libosgUtil.44.dylib               0x005168dd
>> osgUtil::RenderBin::draw(osg::RenderInfo&, osgUtil::RenderLeaf*&) + 107
>> 16  libosgUtil.44.dylib               0x00526b95
>> osgUtil::RenderStage::drawInner(osg::RenderInfo&, osgUtil::RenderLeaf*&,
>> bool&) + 363
>> 17  libosgUtil.44.dylib               0x00526799
>> osgUtil::RenderStage::draw(osg::RenderInfo&, osgUtil::RenderLeaf*&) + 1009
>> 18  libosgUtil.44.dylib               0x00538da1 osgUtil::SceneView::draw()
>> + 11623
>> 19  libosgViewer.44.dylib             0x00129f6a
>> osgViewer::Renderer::cull_draw() + 1262
>> 20  libosgViewer.44.dylib             0x00128519
>> osgViewer::Renderer::operator()(osg::GraphicsContext*) + 35
>> 21  libosg.44.dylib                   0x008692f3
>> osg::GraphicsContext::runOperations() + 235
>> 22  libosg.44.dylib                   0x00871e69
>> osg::RunOperations::operator()(osg::GraphicsContext*) + 17
>> 23  libosg.44.dylib                   0x008717d3
>> osg::GraphicsOperation::operator()(osg::Object*) + 117
>> 24  libosg.44.dylib                   0x008b88c0 osg::OperationThread::run()
>> + 510
>> 25  libosg.44.dylib                   0x00871746 osg::GraphicsThread::run()
>> + 144
>> 26  libOpenThreads.11.dylib           0x0001619c
>> OpenThreads::ThreadPrivateActions::StartThread(void*) + 182
>> 27  libSystem.B.dylib                 0x962296f5 _pthread_start + 321
>> 28  libSystem.B.dylib                 0x962295b2 thread_start + 34
>>
>>
>> --
>> Hartmut Seichter, PhD (HKU), Dipl-Ing.(BUW), Postdoctoral Fellow, HITLabNZ
>>
>> _______________________________________________
>> osg-users mailing list
>> osg-users at lists.openscenegraph.org
>> http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
>>
>>     
> _______________________________________________
> osg-users mailing list
> osg-users at lists.openscenegraph.org
> http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
>   


-- 
Hartmut Seichter, PhD (HKU), Dipl-Ing.(BUW), Postdoctoral Fellow, HITLabNZ




More information about the osg-users mailing list