Hi Hartmut,

Hartmut Seichter schrieb:
> it crashes always at the same point ... see below
> 
> Is there any solution? If so will it be backported to 2.6?

looking into the source and inspecting the stack-trace I would say this
crash has nothing to do with osgText.

It seems that the implementation of GraphicsWindowCarbon::
setWindowDecorationImplementation is the culprit, it removes the opengl
context from the window surface and reattach it again. This is certainly
a no-go when another thread is trying to render stuff into that context.

I marked this behavior as a hack in the source, when I coded the
implementation but I did not find another reliable way to regain access
to the whole space oocupied by the window after removing the titlebar.

I'll try to look into this next week, hopefully there's a slot of spare
time to do it.


cheers,
Stephan


> 
> 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
> 
> 

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

Reply via email to