(gdb) n 77 if (_children.size()>values.size()) (gdb) n 72 for(SwitchSetList::iterator itr=_values.begin(); (gdb) n 89 } (gdb) p _values $63 = std::vector of length 2, capacity 2 = { std::vector of length 1, capacity 32 = {1}, std::vector of length 1, capacity 32 = {0}} (gdb) n flt::Switch::addChild (this=0x806ccc8, child=...) at /home/avasile/src/OpenSceneGraph-3.4.0/src/osgPlugins/OpenFlight/PrimaryRecords.cpp:619 619 } (gdb) n flt::Group::readRecord (this=0x806d388, in=..., document=...) at /home/avasile/src/OpenSceneGraph-3.4.0/src/osgPlugins/OpenFlight/PrimaryRecords.cpp:239 239 _parent->addChild(*_group); (gdb) c Continuing. Breakpoint 4, osgSim::MultiSwitch::addChild (this=0x8071ea0, child=0x80815b0) at /home/avasile/src/OpenSceneGraph-3.4.0/src/osgSim/MultiSwitch.cpp:69 69 dump("addChild " + getName(), _values); (gdb) p _values $64 = std::vector of length 2, capacity 2 = { std::vector of length 0, capacity 32, std::vector of length 0, capacity 32} (gdb) p -r _values No symbol "r" in current context. (gdb) p /r _values $65 = { >, std::allocator > > >> = { _M_impl = { > >> = {<__gnu_cxx::new_allocator > >> = {}, }, _M_start = 0x8071f58, _M_finish = 0x8071f80, _M_end_of_storage = 0x8071f80}}, } (gdb) p _values._M_impl._M_start $66 = (std::vector > *) 0x8071f58 (gdb) p *_values._M_impl._M_start $67 = std::vector of length 0, capacity 32 (gdb) p /r *_values._M_impl._M_start $68 = { >> = { _M_impl = {> = {<__gnu_cxx::new_allocator> = {}, }, _M_start = { = {> = {}, _M_p = 0x8072028, _M_offset = 0}, }, _M_finish = { = {> = {}, _M_p = 0x8072028, _M_offset = 0}, }, _M_end_of_storage = 0x807202c}}, } (gdb) p /r *_values._M_impl._M_start._M_impl No symbol "operator*" in current context. (gdb) p /r _values._M_impl._M_start._M_impl $69 = {> = {<__gnu_cxx::new_allocator> = {}, }, _M_start = { = {> = {}, _M_p = 0x8072028, _M_offset = 0}, }, _M_finish = { = {> = {}, _M_p = 0x8072028, _M_offset = 0}, }, _M_end_of_storage = 0x807202c} (gdb) p /r _values._M_impl._M_start._M_impl._M_p There is no member or method named _M_p. (gdb) p /r _values._M_impl._M_start._M_impl._M_start $70 = { = {> = {}, _M_p = 0x8072028, _M_offset = 0}, } (gdb) p /r _values._M_impl._M_start._M_impl._M_start+1 $71 = { = {> = {}, _M_p = 0x8072028, _M_offset = 1}, } (gdb) p /r _values._M_impl._M_start._M_impl._M_start+0 $72 = { = {> = {}, _M_p = 0x8072028, _M_offset = 0}, } (gdb) r The program being debugged has been started already. Start it from the beginning? (y or n) y Starting program: /home/avasile/src/junk/f1 [Thread debugging using libthread_db enabled] Using host libthread_db library "/lib/libthread_db.so.1". Breakpoint 1, main (argc=1, argv=0xbffff254) at f.C:36 36 osg::ref_ptr loadedModel = osgDB::readNodeFile("radar.flt"); (gdb) c Continuing. Id = damSw18 Current Mask = 0 Number of Mask = 2 Words in Mask = 1 Mask Word[0] = 4294967293 Mask Word[1] = 2 Number of Children = 0 nMaskBit = 0 nMaskWord = 0 Which = damSw18 Switch set = 0 Pos = 0 Value = 1 Breakpoint 3, osgSim::MultiSwitch::setValue (this=0x806cda8, switchSet=0, pos=0, value=true) at /home/avasile/src/OpenSceneGraph-3.4.0/src/osgSim/MultiSwitch.cpp:140 140 dump("setValue before expand ", _values); (gdb) c Continuing. setValue before expand =============== After expand values[0] =============== After Assign damSw18 values[0] list[0] = 1 =============== nMaskBit = 0 nMaskWord = 1 Which = damSw18 Switch set = 1 Pos = 0 Value = 0 Breakpoint 3, osgSim::MultiSwitch::setValue (this=0x806cda8, switchSet=1, pos=0, value=false) at /home/avasile/src/OpenSceneGraph-3.4.0/src/osgSim/MultiSwitch.cpp:140 140 dump("setValue before expand ", _values); (gdb) c Continuing. setValue before expand values[0] list[0] = 1 =============== After expand values[0] list[0] = 1 values[1] =============== After Assign damSw18 values[0] list[0] = 1 values[1] list[0] = 0 =============== Breakpoint 4, osgSim::MultiSwitch::addChild (this=0x806cda8, child=0x806d168) at /home/avasile/src/OpenSceneGraph-3.4.0/src/osgSim/MultiSwitch.cpp:69 69 dump("addChild " + getName(), _values); (gdb) c Continuing. addChild damSw18 values[0] list[0] = 1 values[1] list[0] = 0 =============== Breakpoint 2, osgSim::MultiSwitch::addChild (this=0x806cda8, child=0x806d168) at /home/avasile/src/OpenSceneGraph-3.4.0/src/osgSim/MultiSwitch.cpp:72 72 for(SwitchSetList::iterator itr=_values.begin(); (gdb) c Continuing. Id = articSw Current Mask = 0 Number of Mask = 2 Words in Mask = 1 Mask Word[0] = 4294967239 Mask Word[1] = 4294967288 Number of Children = 0 nMaskBit = 0 nMaskWord = 0 Which = articSw2 Switch set = 0 Pos = 0 Value = 1 Breakpoint 3, osgSim::MultiSwitch::setValue (this=0x8071ea0, switchSet=0, pos=0, value=true) at /home/avasile/src/OpenSceneGraph-3.4.0/src/osgSim/MultiSwitch.cpp:140 140 dump("setValue before expand ", _values); (gdb) c Continuing. setValue before expand =============== After expand values[0] =============== After Assign articSw2 values[0] list[0] = 1 =============== nMaskBit = 0 nMaskWord = 1 Which = articSw2 Switch set = 1 Pos = 0 Value = 0 Breakpoint 3, osgSim::MultiSwitch::setValue (this=0x8071ea0, switchSet=1, pos=0, value=false) at /home/avasile/src/OpenSceneGraph-3.4.0/src/osgSim/MultiSwitch.cpp:140 140 dump("setValue before expand ", _values); (gdb) c Continuing. setValue before expand values[0] list[0] = 1 =============== After expand values[0] list[0] = 1 values[1] =============== After Assign articSw2 values[0] list[0] = 1 values[1] list[0] = 0 =============== Breakpoint 4, osgSim::MultiSwitch::addChild (this=0x8071ea0, child=0x806d300) at /home/avasile/src/OpenSceneGraph-3.4.0/src/osgSim/MultiSwitch.cpp:69 69 dump("addChild " + getName(), _values); (gdb) p _values $73 = std::vector of length 2, capacity 2 = { std::vector of length 1, capacity 32 = {1}, std::vector of length 1, capacity 32 = {0}} (gdb) p _values._M_impl $74 = { > >> = {<__gnu_cxx::new_allocator > >> = {}, }, _M_start = 0x8071f58, _M_finish = 0x8071f80, _M_end_of_storage = 0x8071f80} (gdb) p _values._M_impl._M_start $75 = (std::vector > *) 0x8071f58 (gdb) p _values._M_impl._M_start._M_impl $76 = {> = {<__gnu_cxx::new_allocator> = {}, }, _M_start = { = {> = {}, _M_p = 0x8072028, _M_offset = 0}, }, _M_finish = { = {> = {}, _M_p = 0x8072028, _M_offset = 1}, }, _M_end_of_storage = 0x807202c} (gdb) p &_values._M_impl._M_start._M_impl $77 = (std::_Bvector_base >::_Bvector_impl *) 0x8071f58 (gdb) watch *$77 Watchpoint 5: *$77 (gdb) c Continuing. addChild articSw2 values[0] list[0] = 1 values[1] list[0] = 0 =============== Breakpoint 2, osgSim::MultiSwitch::addChild (this=0x8071ea0, child=0x806d300) at /home/avasile/src/OpenSceneGraph-3.4.0/src/osgSim/MultiSwitch.cpp:72 72 for(SwitchSetList::iterator itr=_values.begin(); (gdb) p _values $78 = std::vector of length 2, capacity 2 = { std::vector of length 1, capacity 32 = {1}, std::vector of length 1, capacity 32 = {0}} (gdb) c Continuing. Watchpoint 5: *$77 Old value = {> = {<__gnu_cxx::new_allocator> = {}, }, _M_start = { = {> = {}, _M_p = 0x8072028, _M_offset = 0}, }, _M_finish = { = {> = {}, _M_p = 0x8072028, _M_offset = 1}, }, _M_end_of_storage = 0x807202c} New value = {> = {<__gnu_cxx::new_allocator> = {}, }, _M_start = { = {> = {}, _M_p = 0x8072028, _M_offset = 0}, }, _M_finish = { = {> = {}, _M_p = 0x8072028, _M_offset = 0}, }, _M_end_of_storage = 0x807202c} 0x00280ac2 in std::_Bit_iterator_base::_M_bump_down (this=) at /usr/lib/gcc/i686-redhat-linux/4.4.7/../../../../include/c++/4.4.7/bits/stl_bvector.h:129 129 if (_M_offset-- == 0) (gdb) bt #0 0x00280ac2 in std::_Bit_iterator_base::_M_bump_down (this=) at /usr/lib/gcc/i686-redhat-linux/4.4.7/../../../../include/c++/4.4.7/bits/stl_bvector.h:129 #1 std::_Bit_iterator::operator-- (this=) at /usr/lib/gcc/i686-redhat-linux/4.4.7/../../../../include/c++/4.4.7/bits/stl_bvector.h:218 #2 std::vector >::erase (__position=..., this=) at /usr/lib/gcc/i686-redhat-linux/4.4.7/../../../../include/c++/4.4.7/bits/stl_bvector.h:811 #3 osgSim::MultiSwitch::removeChild (this=0x8071ea0, child=0x806d300) at /home/avasile/src/OpenSceneGraph-3.4.0/src/osgSim/MultiSwitch.cpp:127 #4 0x00e92c0c in flt::insertMatrixTransform (node=..., matrix=..., numberOfReplications=0) at /home/avasile/src/OpenSceneGraph-3.4.0/src/osgPlugins/OpenFlight/Record.cpp:92 #5 0x00e84d83 in flt::Group::dispose (this=0x806d388, document=...) at /home/avasile/src/OpenSceneGraph-3.4.0/src/osgPlugins/OpenFlight/PrimaryRecords.cpp:249 #6 0x00e562f4 in flt::PopLevel::read (this=0x8080fa0, document=...) at /home/avasile/src/OpenSceneGraph-3.4.0/src/osgPlugins/OpenFlight/ControlRecords.cpp:79 #7 0x00e93620 in flt::RecordInputStream::readRecordBody (this=0xbfffea6c, ---Type to continue, or q to quit--- opcode=, size=4, document=...) at /home/avasile/src/OpenSceneGraph-3.4.0/src/osgPlugins/OpenFlight/RecordInputStream.cpp:75 #8 0x00e90613 in FLTReaderWriter::readNode (this=0x805f0b8, fin=..., options=0x8062000) at /home/avasile/src/OpenSceneGraph-3.4.0/src/osgPlugins/OpenFlight/ReaderWriterFLT.cpp:509 #9 0x00e8eb86 in FLTReaderWriter::readNode (this=0x805f0b8, file="radar.flt", options=0x0) at /home/avasile/src/OpenSceneGraph-3.4.0/src/osgPlugins/OpenFlight/ReaderWriterFLT.cpp:298 #10 0x001f1fc2 in osgDB::Registry::ReadNodeFunctor::doRead (this=0xbffff064, rw=...) at /home/avasile/src/OpenSceneGraph-3.4.0/src/osgDB/Registry.cpp:946 #11 0x001f084a in osgDB::Registry::read (this=0x8052fa8, readFunctor=...) at /home/avasile/src/OpenSceneGraph-3.4.0/src/osgDB/Registry.cpp:1196 #12 0x001f12cd in osgDB::Registry::readImplementation (this=0x8052fa8, readFunctor=..., cacheHint=osgDB::Options::CACHE_NODES) at /home/avasile/src/OpenSceneGraph-3.4.0/src/osgDB/Registry.cpp:1299 #13 0x001f1a2b in osgDB::Registry::readNodeImplementation (this=0x8052fa8, fileName="radar.flt", options=0x0) at /home/avasile/src/OpenSceneGraph-3.4.0/src/osgDB/Registry.cpp:1501 #14 0x001e0b13 in osgDB::Registry::readNode (buildKdTreeIfRequired=true, ---Type to continue, or q to quit---q optionsQuit (gdb) up #1 std::_Bit_iterator::operator-- (this=) at /usr/lib/gcc/i686-redhat-linux/4.4.7/../../../../include/c++/4.4.7/bits/stl_bvector.h:218 218 _M_bump_down(); (gdb) up #2 std::vector >::erase (__position=..., this=) at /usr/lib/gcc/i686-redhat-linux/4.4.7/../../../../include/c++/4.4.7/bits/stl_bvector.h:811 811 --this->_M_impl._M_finish; (gdb) up #3 osgSim::MultiSwitch::removeChild (this=0x8071ea0, child=0x806d300) at /home/avasile/src/OpenSceneGraph-3.4.0/src/osgSim/MultiSwitch.cpp:127 127 values.erase(values.begin()+pos); (gdb) up #4 0x00e92c0c in flt::insertMatrixTransform (node=..., matrix=..., numberOfReplications=0) at /home/avasile/src/OpenSceneGraph-3.4.0/src/osgPlugins/OpenFlight/Record.cpp:92 92 (*itr)->removeChild(&node); (gdb) up #5 0x00e84d83 in flt::Group::dispose (this=0x806d388, document=...) at /home/avasile/src/OpenSceneGraph-3.4.0/src/osgPlugins/OpenFlight/PrimaryRecords.cpp:249 249 insertMatrixTransform(*_group,*_matrix,_numberOfReplications); (gdb) up #6 0x00e562f4 in flt::PopLevel::read (this=0x8080fa0, document=...) at /home/avasile/src/OpenSceneGraph-3.4.0/src/osgPlugins/OpenFlight/ControlRecords.cpp:79 79 parentPrimary->dispose(document); (gdb) p * document No symbol "operator*" in current context. (gdb) p document $79 = (flt::Document &) @0xbfffe9c0: { _vptr.Document = 0xeb2fe0 , _options = { _ptr = 0x8062000}, _replaceClampWithClampToEdge = false, _preserveFace = false, _preserveObject = false, _replaceDoubleSidedPolys = false, _defaultDOFAnimationState = false, _useTextureAlphaForTransparancyBinning = true, _useBillboardCenter = false, _doUnitsConversion = true, _readObjectRecordData = true, _preserveNonOsgAttrsAsUserData = false, _desiredUnits = flt::METERS, _keepExternalReferences = false, _done = false, _level = 9, _subfaceLevel = 0, _unitScale = 1, _version = 1630, _osgHeader = { _ptr = 0x80649b0}, _vertexPool = {_ptr = 0x8068870}, _colorPool = { _ptr = 0x8064970}, _texturePool = {_ptr = 0x806d5b0}, _materialPool = { _ptr = 0x8064840}, _lightSourcePool = {_ptr = 0x8064718}, _lightPointAppearancePool = {_ptr = 0x0}, _lightPointAnimationPool = { _ptr = 0x0}, _shaderPool = {_ptr = 0x0}, Python Exception Cannot find type flt::Document::SubSurfacePolygonOffsets::_Rep_type: _subsurfacePolygonOffsets = std::map with 0 elements, _subsurfaceDepth = { _ptr = 0x8064630}, _colorPoolParent = false, _texturePoolParent = false, _materialPoolParent = false, _lightSourcePoolParent = false, _lightPointAppearancePoolParent = false, _lightPointAnimationPoolParent = false, _shaderPoolParent = false, _currentPrimaryRecord = {_ptr = 0x806d388}, _levelStack = std::vector of length 9, capacity 16 = {{_ptr = 0x8064930}, { _ptr = 0x8068978}, {_ptr = 0x806ca88}, {_ptr = 0x806cb88}, { ---Type to continue, or q to quit--- _ptr = 0x80648c0}, {_ptr = 0x806cc90}, {_ptr = 0x806d1f0}, { _ptr = 0x806ccc8}, {_ptr = 0x806d388}}, _extensionStack = std::vector of length 0, capacity 0, Python Exception Cannot find type flt::Document::InstanceDefinitionMap::_Rep_type: _instanceDefinitionMap = std::map with 0 elements} (gdb) do #5 0x00e84d83 in flt::Group::dispose (this=0x806d388, document=...) at /home/avasile/src/OpenSceneGraph-3.4.0/src/osgPlugins/OpenFlight/PrimaryRecords.cpp:249 249 insertMatrixTransform(*_group,*_matrix,_numberOfReplications); (gdb) lup Undefined command: "lup". Try "help". (gdb) up #6 0x00e562f4 in flt::PopLevel::read (this=0x8080fa0, document=...) at /home/avasile/src/OpenSceneGraph-3.4.0/src/osgPlugins/OpenFlight/ControlRecords.cpp:79 79 parentPrimary->dispose(document); (gdb) l 74 } 75 76 // Call dispose() for primary with push, pop level pair. 77 if (parentPrimary) 78 { 79 parentPrimary->dispose(document); 80 } 81 82 document.popLevel(); 83 } (gdb) do #5 0x00e84d83 in flt::Group::dispose (this=0x806d388, document=...) at /home/avasile/src/OpenSceneGraph-3.4.0/src/osgPlugins/OpenFlight/PrimaryRecords.cpp:249 249 insertMatrixTransform(*_group,*_matrix,_numberOfReplications); (gdb) do #4 0x00e92c0c in flt::insertMatrixTransform (node=..., matrix=..., numberOfReplications=0) at /home/avasile/src/OpenSceneGraph-3.4.0/src/osgPlugins/OpenFlight/Record.cpp:92 92 (*itr)->removeChild(&node); (gdb) p * itr Attempt to take address of value not located in memory. (gdb) p itr $80 = (gdb) p node $81 = (osg::Node &) @0x806d300: { = { = { _vptr.Referenced = 0x570dc8 , _observerSet = { _ptr = 0x0}, _refCount = {_value = 3}}, _name = "antennaT_301", _dataVariance = osg::Object::UNSPECIFIED, _userDataContainer = 0x0}, _initialBound = {_center = {_v = {0, 0, 0}}, _radius = -1}, _computeBoundCallback = {_ptr = 0x0}, _boundingSphere = {_center = {_v = {0, 0, 0}}, _radius = -1}, _boundingSphereComputed = false, _parents = std::vector of length 1, capacity 1 = {0x8071ea0}, _updateCallback = {_ptr = 0x0}, _numChildrenRequiringUpdateTraversal = 0, _eventCallback = {_ptr = 0x0}, _numChildrenRequiringEventTraversal = 0, _cullCallback = {_ptr = 0x0}, _cullingActive = true, _numChildrenWithCullingDisabled = 0, _numChildrenWithOccluderNodes = 0, _nodeMask = 4294967295, _stateset = {_ptr = 0x0}} (gdb) p node._parents $82 = std::vector of length 1, capacity 1 = {0x8071ea0} (gdb) p node._parents[0] Could not find operator[]. (gdb) c Continuing. Breakpoint 4, osgSim::MultiSwitch::addChild (this=0x8071ea0, child=0x80815b0) at /home/avasile/src/OpenSceneGraph-3.4.0/src/osgSim/MultiSwitch.cpp:69 69 dump("addChild " + getName(), _values); (gdb) p _values $83 = std::vector of length 2, capacity 2 = { std::vector of length 0, capacity 32, std::vector of length 0, capacity 32} (gdb) l flt::PopLevel::read 60 61 PopLevel() {} 62 63 META_Record(PopLevel) 64 65 virtual void read(RecordInputStream& /*in*/, Document& document) 66 { 67 PrimaryRecord* parentPrimary = document.getTopOfLevelStack(); 68 PrimaryRecord* currentPrimary = document.getCurrentPrimaryRecord(); 69 (gdb) l 70 // Call dispose() for primary without push, pop level pair. 71 if (currentPrimary && currentPrimary!=parentPrimary) 72 { 73 currentPrimary->dispose(document); 74 } 75 76 // Call dispose() for primary with push, pop level pair. 77 if (parentPrimary) 78 { 79 parentPrimary->dispose(document); (gdb) l 80 } 81 82 document.popLevel(); 83 } 84 85 protected: 86 87 virtual ~PopLevel() {} 88 }; 89 (gdb)