Program received signal EXC_BAD_ACCESS, Could not access memory. Reason: KERN_PROTECTION_FAILURE at address: 0x00000010 osgViewer::MenubarController::detachWindow (this=0x0, win=0x269296b0) at /usr/include/c++/4.0.0/bits/stl_list.h:580 580 { return this->_M_impl._M_node._M_next; } (gdb) bt #0 osgViewer::MenubarController::detachWindow (this=0x0, win=0x269296b0) at /usr/include/c++/4.0.0/bits/stl_list.h:580 #1 0x14232c05 in osgViewer::GraphicsWindowCarbon::closeImplementation (this=0x269296b0) at /Users/fugalh/src/OpenSceneGraph/src/osgViewer/GraphicsWindowCarbon.cpp:736 #2 0x2008343a in osg::GraphicsContext::close (this=0x269296b0, callCloseImplementation=true) at /Users/fugalh/src/OpenSceneGraph/src/osg/GraphicsContext.cpp:416 #3 0x142279af in osgViewer::Viewer::~Viewer (this=0x1) at /Users/fugalh/src/OpenSceneGraph/src/osgViewer/Viewer.cpp:732 #4 0x004c5d59 in osg::Referenced::unref (this=0x36b13a10) at /usr/local/include/osg/Referenced:152 #5 0x004ca634 in osg::ref_ptr::~ref_ptr (this=0x85d3f8) at /usr/local/include/osg/ref_ptr:30 #6 0x00035bae in __tcf_1 () at fg_os_osgviewer.cxx:83 #7 0x00002dd1 in cxa_atexit_wrapper () #8 0x900103e1 in __cxa_finalize () #9 0x900102e8 in exit () #10 0x0002b7c7 in fgExit (status=0) at util.cxx:115 #11 0x0000c812 in do_exit (arg=0x4dceac70) at fg_commands.cxx:226 #12 0x0046c961 in SGBinding::fire (this=0x4dc90900) at SGBinding.cxx:60 #13 0x0025c620 in action_callback (object=0x4a13fd20) at dialog.cxx:265 #14 0x00481b5e in puOneShot::doHit () at visual_enviro.cxx:163 #15 0x00480703 in puObject::checkHit () at visual_enviro.cxx:163 #16 0x00480699 in puObject::checkKey () at visual_enviro.cxx:163 #17 0x0047dd7a in puGroup::checkKey () at visual_enviro.cxx:163 #18 0x0047dd7a in puGroup::checkKey () at visual_enviro.cxx:163 #19 0x0047afa6 in puKeyboard () at visual_enviro.cxx:163 #20 0x00276160 in keyHandler (key=10, keymod=0, mousex=409, mousey=315) at input.cxx:1105 #21 0x00033b7b in FGManipulator::handle (this=0x26922410, ea=@0x4e3b9810, us=@0x36b13a48) at FGManipulator.cxx:143 #22 0x1422cc27 in osgViewer::Viewer::eventTraversal (this=0x36b13a10) at /Users/fugalh/src/OpenSceneGraph/src/osgViewer/Viewer.cpp:2131 #23 0x1422be81 in osgViewer::Viewer::frame (this=0x36b13a10, simulationTime=1.7976931348623157e+308) at /Users/fugalh/src/OpenSceneGraph/src/osgViewer/Viewer.cpp:1815 #24 0x1422bf68 in osgViewer::Viewer::run (this=0x36b13a10) at /Users/fugalh/src/OpenSceneGraph/src/osgViewer/Viewer.cpp:801 #25 0x000346fc in fgOSMainLoop () at fg_os_osgviewer.cxx:242 #26 0x0000579d in fgMainInit (argc=3, argv=0xbffff6a4) at main.cxx:1071 #27 0x00003158 in main (argc=3, argv=0xbffff6a4) at bootstrap.cxx:220