Hi all,
I have been trying to establish a current FG development environment on
a Gentoo Linux system (GCC 4.1.2, glibc 2.6.1, ATI/flgrx). I have
current CVS working copies of plib, OSG, SimGear, and FG. While
everything builds and installs, I get the attached crash when trying to
run fgfs, even after a clean re-build of those libraries.
The first trace (trace.txt) was produced by directly running the fgfs
app, apparently after loading the aircraft data. The second trace
(grind.txt) was produced by valgrind. It successfully works around the
bug and allows fgfs to continue, until valgrind itself segfaults.
Any ideas?
Cheers,
Zach
*** glibc detected *** fgfs: free(): invalid pointer: 0x0885b3e8 ***
======= Backtrace: =========
/lib/libc.so.6[0xb6e989e0]
/lib/libc.so.6(cfree+0x89)[0xb6e9a6d9]
/usr/lib/gcc/i686-pc-linux-gnu/4.1.2/libstdc++.so.6(operator
delete(void*)+0x21)[0xb70159a9]
fgfs(__gnu_cxx::new_allocator<int>::deallocate(int*, unsigned
int)+0x11)[0x823789b]
fgfs(std::_Vector_base<int, std::allocator<int> >::_M_deallocate(int*, unsigned
int)+0x27)[0x82378c5]
fgfs(std::_Vector_base<int, std::allocator<int>
>::~_Vector_base()+0x36)[0x82378fe]
/data/fgfs/local/lib/libosgd.so.26(std::vector<int, std::allocator<int>
>::~vector()+0x60)[0xb7655f06]
/data/fgfs/local/lib/libosgd.so.26(osg::VectorGLsizei::~VectorGLsizei()+0x1d)[0xb76c21b5]
/data/fgfs/local/lib/libosgd.so.26(osg::DrawArrayLengths::~DrawArrayLengths()+0x30)[0xb76c23b6]
fgfs(osg::Referenced::unref() const+0xa9)[0x80a17ff]
/data/fgfs/local/lib/libosgTextd.so.26(osg::ref_ptr<osg::PrimitiveSet>::~ref_ptr()+0x28)[0xb7e168f2]
/data/fgfs/local/lib/libosgTextd.so.26(void
std::_Destroy<osg::ref_ptr<osg::PrimitiveSet>
>(osg::ref_ptr<osg::PrimitiveSet>*)+0x1d)[0xb7e1691f]
/data/fgfs/local/lib/libosgTextd.so.26(void
std::__destroy_aux<osg::ref_ptr<osg::PrimitiveSet>*>(osg::ref_ptr<osg::PrimitiveSet>*,
osg::ref_ptr<osg::PrimitiveSet>*, __false_type)+0x1f)[0xb7e16945]
/data/fgfs/local/lib/libosgTextd.so.26(void
std::_Destroy<osg::ref_ptr<osg::PrimitiveSet>*>(osg::ref_ptr<osg::PrimitiveSet>*,
osg::ref_ptr<osg::PrimitiveSet>*)+0x2c)[0xb7e16984]
/data/fgfs/local/lib/libosgTextd.so.26(void
std::_Destroy<osg::ref_ptr<osg::PrimitiveSet>*, osg::ref_ptr<osg::PrimitiveSet>
>(osg::ref_ptr<osg::PrimitiveSet>*, osg::ref_ptr<osg::PrimitiveSet>*,
std::allocator<osg::ref_ptr<osg::PrimitiveSet> >)+0x24)[0xb7e169ae]
/data/fgfs/local/lib/libosgTextd.so.26(std::vector<osg::ref_ptr<osg::PrimitiveSet>,
std::allocator<osg::ref_ptr<osg::PrimitiveSet> > >::~vector()+0x4b)[0xb7e169ff]
/data/fgfs/local/lib/libosgUtild.so.26(osgUtil::Tessellator::~Tessellator()+0x40)[0xb7cd44be]
/data/fgfs/local/lib/osgPlugins-2.3.0/osgdb_ac.so(ac3d::SurfaceBin::finalize(ac3d::MaterialData
const&, ac3d::TextureData const&)+0xaa7)[0x9728fce7]
/data/fgfs/local/lib/osgPlugins-2.3.0/osgdb_ac.so(ac3d::readObject(std::basic_istream<char,
std::char_traits<char> >&, ac3d::FileData&, osg::Matrixd const&,
ac3d::TextureData)+0x19ae)[0x9728891e]
/data/fgfs/local/lib/osgPlugins-2.3.0/osgdb_ac.so(ac3d::readObject(std::basic_istream<char,
std::char_traits<char> >&, ac3d::FileData&, osg::Matrixd const&,
ac3d::TextureData)+0x29e5)[0x97289955]
/data/fgfs/local/lib/osgPlugins-2.3.0/osgdb_ac.so(ac3d::readFile(std::basic_istream<char,
std::char_traits<char> >&, osgDB::ReaderWriter::Options
const*)+0xb6)[0x97289d86]
/data/fgfs/local/lib/osgPlugins-2.3.0/osgdb_ac.so(ReaderWriterAC::readNode(std::basic_istream<char,
std::char_traits<char> >&, osgDB::ReaderWriter::Options const*)
const+0xd2)[0x97299562]
/data/fgfs/local/lib/osgPlugins-2.3.0/osgdb_ac.so(ReaderWriterAC::readNode(std::basic_string<char,
std::char_traits<char>, std::allocator<char> > const&,
osgDB::ReaderWriter::Options const*) const+0x36a)[0x97296cda]
fgfs[0x85962a2]
fgfs[0x85994af]
fgfs[0x8590020]
/data/fgfs/local/lib/libosgDBd.so.26(osgDB::Registry::readNode(std::basic_string<char,
std::char_traits<char>, std::allocator<char> > const&,
osgDB::ReaderWriter::Options const*)+0x56)[0xb79cad8a]
/data/fgfs/local/lib/libosgDBd.so.26(osgDB::readNodeFile(std::basic_string<char,
std::char_traits<char>, std::allocator<char> > const&,
osgDB::ReaderWriter::Options const*)+0x3e)[0xb79c8cc2]
fgfs[0x858db41]
fgfs[0x84387c3]
fgfs[0x8437e12]
fgfs[0x8094c6a]
fgfs[0x80dc82b]
/data/fgfs/local/lib/libosgViewerd.so.26(osgGA::GUIEventHandler::handleWithCheckAgainstIgnoreHandledEventsMask(osgGA::GUIEventAdapter
const&, osgGA::GUIActionAdapter&)+0x75)[0xb7f2e36f]
/data/fgfs/local/lib/libosgViewerd.so.26(osgViewer::Viewer::eventTraversal()+0x1269)[0xb7f738e5]
/data/fgfs/local/lib/libosgViewerd.so.26(osgViewer::ViewerBase::frame(double)+0x9a)[0xb7f7b660]
/data/fgfs/local/lib/libosgViewerd.so.26(osgViewer::ViewerBase::run()+0xe5)[0xb7f7ca71]
/data/fgfs/local/lib/libosgViewerd.so.26(osgViewer::Viewer::run()+0xae)[0xb7f74b76]
fgfs[0x80e153c]
fgfs[0x80945db]
fgfs[0x8093766]
/lib/libc.so.6(__libc_start_main+0xdc)[0xb6e48fbc]
fgfs[0x8093581]
======= Memory map: ========
08048000-08782000 r-xp 00000000 08:04 9503686 /data/fgfs/local/bin/fgfs
08782000-08793000 rw-p 0073a000 08:04 9503686 /data/fgfs/local/bin/fgfs
08793000-0d8c0000 rw-p 08793000 00:00 0 [heap]
96400000-96421000 rw-p 96400000 00:00 0
96421000-96500000 ---p 96421000 00:00 0
96584000-96b05000 rw-p 96584000 00:00 0
96c24000-96f27000 rw-p 96c24000 00:00 0
96f27000-96f39000 rw-p a5971000 00:00 0
96f39000-9708f000 rw-s 16957000 00:0e 15430 /dev/dri/card0
9708f000-97190000 rw-p 9708f000 00:00 0
97277000-9729e000 r-xp 00000000 08:04 9505759
/data/fgfs/local/lib/osgPlugins-2.3.0/osgdb_ac.so
9729e000-9729f000 rw-p 00026000 08:04 9505759
/data/fgfs/local/lib/osgPlugins-2.3.0/osgdb_ac.so
9729f000-973f5000 rw-s 16956000 00:0e 15430 /dev/dri/card0
973f5000-974f5000 rw-s 00000000 00:0f 8463559 /dev/shm/ATISHM00
974f5000-975f6000 rw-p 974f5000 00:00 0
975f6000-97642000 r-xp 00000000 08:04 9505529
/data/fgfs/local/lib/libosgText.so.2.3.0
97642000-97644000 rw-p 0004b000 08:04 9505529
/data/fgfs/local/lib/libosgText.so.2.3.0
97644000-9764d000 r-xp 00000000 08:04 9505767
/data/fgfs/local/lib/osgPlugins-2.3.0/osgdb_txf.so
9764d000-9764e000 rw-p 00008000 08:04 9505767
/data/fgfs/local/lib/osgPlugins-2.3.0/osgdb_txf.so
9764e000-9774f000 rw-p 9764e000 00:00 0
9774f000-97898000 r-xp 00000000 08:04 9505309
/data/fgfs/local/lib/libosgUtil.so.2.3.0
97898000-9789f000 rw-p 00149000 08:04 9505309
/data/fgfs/local/lib/libosgUtil.so.2.3.0
9789f000-9790f000 r-xp 00000000 08:04 9504604
/data/fgfs/local/lib/libosgDB.so.2.3.0
9790f000-97911000 rw-p 0006f000 08:04 9504604
/data/fgfs/local/lib/libosgDB.so.2.3.0
97911000-97b2d000 r-xp 00000000 08:04 9505295
/data/fgfs/local/lib/libosg.so.2.3.0
97b2d000-97b36000 rw-p 0021b000 08:04 9505295
/data/fgfs/local/lib/libosg.so.2.3.0
97b36000-97b37000 rw-p 97b36000 00:00 0
97b37000-97b3d000 r-xp 00000000 08:04 9503967
/data/fgfs/local/lib/libOpenThreads.so.2.2.0
97b3d000-97b3e000 rw-p 00005000 08:04 9503967
/data/fgfs/local/lib/libOpenThreads.so.2.2.0
97b3e000-97b44000 r-xp 00000000 08:04 9505737
/data/fgfs/local/lib/osgPlugins-2.3.0/osgdb_rgb.so
97b44000-97b45000 rw-p 00006000 08:04 9505737
/data/fgfs/local/lib/osgPlugins-2.3.0/osgdb_rgb.so
97b45000-97c43000 rw-p 97b45000 00:00 0
97c4b000-97c4c000 rw-p 97c4b000 00:00 0
97c4c000-98af2000 rw-s 3af97000 00:0e 15430 /dev/dri/card0
98af2000-9e402000 rw-s 3af96000 00:0e 15430 /dev/dri/card0
9e402000-a3be6000 rw-s 3af95000 00:0e 15430 /dev/dri/card0
a3be6000-a4abe000 rw-s 3af94000 00:0e 15430 /dev/dri/card0
a4abe000-a5964000 rw-s 3af93000 00:0e 15430 /dev/dri/card0
a5964000-a596e000 rw-p a5964000 00:00 0
a596e000-a5971000 rw-s 16955000 00:0e 15430 /dev/dri/card0
a5976000-a59b7000 rw-p a5976000 00:00 0
a59b7000-a5cd7000 rw-s 16952000 00:0e 15430 /dev/dri/card0
a5cd7000-a5cd8000 rw-p a5cd7000 00:00 0
a5cd8000-a6318000 rw-s 3af90000 00:0e 15430 /dev/dri/card0
a6318000-a6418000 rw-s 3af8f000 00:0e 15430 /dev/dri/card0
a6418000-b63f8000 rw-s 3af8c000 00:0e 15430 /dev/dri/card0
b63f8000-b63ff000 r-xp 00000000 08:03 542669 /lib/librt-2.6.1.so
b63ff000-b6401000 rw-p 00006000 08:03 542669 /lib/librt-2.6.1.so
b6401000-b64ab000 r-xp 00000000 08:03 789726
/usr/lib/gcc-lib/i686-pc-linux-gnu/3.3.6/libstdc++.so.5.0.7
b64ab000-b64b0000 rw-p 000aa000 08:03 789726
/usr/lib/gcc-lib/i686-pc-linux-gnu/3.3.6/libstdc++.so.5.0.7
b64b0000-b64b5000 rw-p b64b0000 00:00 0
b64b5000-b6d4d000 r-xp 00000000 08:03 1210587 /usr/lib/dri/fglrx_dri.so
b6d4d000-b6d98000 rw-p 00898000 08:03 1210587 /usr/lib/dri/fglrx_dri.so
b6d98000-b6e25000 rw-p b6d98000 00:00 0
b6e25000-b6e29000 r-xp 00000000 08:03 623962 /usr/lib/libXdmcp.so.6.0.0
b6e29000-b6e2a000 rw-p 00003000 08:03 623962 /usr/lib/libXdmcp.so.6.0.0
b6e2a000-b6e2c000 r-xp 00000000 08:03 623755 /usr/lib/libXau.so.6.0.0
b6e2c000-b6e2d000 rw-p 00001000 08:03 623755 /usr/lib/libXau.so.6.0.0
b6e2d000-b6e31000 r-xp 00000000 08:03 688778 /usr/lib/libXxf86vm.so.1.0.0
b6e31000-b6e32000 rw-p 00003000 08:03 688778 /usr/lib/libXxf86vm.so.1.0.0
b6e32000-b6e33000 rw-p b6e32000 00:00 0
b6e33000-b6f5d000 r-xp 00000000 08:03 542623 /lib/libc-2.6.1.so
b6f5d000-b6f5e000 r--p 0012a000 08:03 542623 /lib/libc-2.6.1.so
b6f5e000-b6f60000 rw-p 0012b000 08:03 542623 /lib/libc-2.6.1.so
b6f60000-b6f63000 rw-p b6f60000 00:00 0
b6f63000-b6f6c000 r-xp 00000000 08:03 693191
/usr/lib/gcc/i686-pc-linux-gnu/4.1.2/libgcc_s.so.1
b6f6c000-b6f6d000 rw-p 00008000 08:03 693191
/usr/lib/gcc/i686-pc-linux-gnu/4.1.2/libgcc_s.so.1
b6f6d000-b703e000 r-xp 00000000 08:03 693208
/usr/lib/gcc/i686-pc-linux-gnu/4.1.2/libstdc++.so.6.0.8
b703e000-b7041000 r--p 000d1000 08:03 693208
/usr/lib/gcc/i686-pc-linux-gnu/4.1.2/libstdc++.so.6.0.8
b7041000-b7043000 rw-p 000d4000 08:03 693208
/usr/lib/gcc/i686-pc-linux-gnu/4.1.2/libstdc++.so.6.0.8
b7043000-b7049000 rw-p b7043000 00:00 0
b7049000-b7067000 r-xp 00000000 08:03 704914 /usr
==25068== Invalid free() / delete / delete[]
==25068== at 0x4020D8C: operator delete(void*) (in
/usr/lib/valgrind/x86-linux/vgpreload_memcheck.so)
==25068== by 0x823731A: __gnu_cxx::new_allocator<int>::deallocate(int*,
unsigned) (new_allocator.h:96)
==25068== by 0x8237344: std::_Vector_base<int, std::allocator<int>
>::_M_deallocate(int*, unsigned) (stl_vector.h:133)
==25068== by 0x823737D: std::_Vector_base<int, std::allocator<int>
>::~_Vector_base() (stl_vector.h:119)
==25068== by 0x4A66F05: std::vector<int, std::allocator<int> >::~vector()
(stl_vector.h:272)
==25068== by 0x4AD31B4: osg::VectorGLsizei::~VectorGLsizei()
(PrimitiveSet:46)
==25068== by 0x4AD33B5: osg::DrawArrayLengths::~DrawArrayLengths()
(PrimitiveSet:427)
==25068== by 0x80A13F4: osg::Referenced::unref() const (Referenced:155)
==25068== by 0x41EE8F1: osg::ref_ptr<osg::PrimitiveSet>::~ref_ptr()
(ref_ptr:30)
==25068== by 0x41EE91E: void std::_Destroy<osg::ref_ptr<osg::PrimitiveSet>
>(osg::ref_ptr<osg::PrimitiveSet>*) (stl_construct.h:107)
==25068== by 0x41EE944: void
std::__destroy_aux<osg::ref_ptr<osg::PrimitiveSet>*>(osg::ref_ptr<osg::PrimitiveSet>*,
osg::ref_ptr<osg::PrimitiveSet>*, __false_type) (stl_construct.h:122)
==25068== by 0x41EE983: void
std::_Destroy<osg::ref_ptr<osg::PrimitiveSet>*>(osg::ref_ptr<osg::PrimitiveSet>*,
osg::ref_ptr<osg::PrimitiveSet>*) (stl_construct.h:155)
==25068== by 0x41EE9AD: void std::_Destroy<osg::ref_ptr<osg::PrimitiveSet>*,
osg::ref_ptr<osg::PrimitiveSet> >(osg::ref_ptr<osg::PrimitiveSet>*,
osg::ref_ptr<osg::PrimitiveSet>*,
std::allocator<osg::ref_ptr<osg::PrimitiveSet> >) (stl_construct.h:182)
==25068== by 0x41EE9FE: std::vector<osg::ref_ptr<osg::PrimitiveSet>,
std::allocator<osg::ref_ptr<osg::PrimitiveSet> > >::~vector() (stl_vector.h:272)
==25068== by 0x455A33D: osgUtil::Tessellator::~Tessellator()
(Tessellator.cpp:36)
==25068== by 0x31CB5130: ac3d::SurfaceBin::finalize(ac3d::MaterialData
const&, ac3d::TextureData const&) (ac3d.cpp:934)
==25068== by 0x31C9647E: ac3d::Bins::finalize(osg::Group*,
ac3d::MaterialData const&, ac3d::TextureData const&) (ac3d.cpp:1051)
==25068== by 0x31C943B7: ac3d::readObject(std::istream&, ac3d::FileData&,
osg::Matrixd const&, ac3d::TextureData) (ac3d.cpp:1277)
==25068== by 0x31C944DA: ac3d::readObject(std::istream&, ac3d::FileData&,
osg::Matrixd const&, ac3d::TextureData) (ac3d.cpp:1285)
==25068== by 0x31C94B7B: ac3d::readFile(std::istream&,
osgDB::ReaderWriter::Options const*) (ac3d.cpp:1331)
==25068== by 0x31CB6110: ReaderWriterAC::readNode(std::istream&,
osgDB::ReaderWriter::Options const*) const (ac3d.cpp:115)
==25068== by 0x31CAF62B: ReaderWriterAC::readNode(std::string const&,
osgDB::ReaderWriter::Options const*) const (ac3d.cpp:103)
==25068== by 0x8594BB1: simgear::ModelRegistryCallback<ACProcessPolicy,
simgear::DefaultCachePolicy, ACOptimizePolicy, simgear::DefaultCopyPolicy,
simgear::OSGSubstitutePolicy>::loadUsingReaderWriter(std::string const&,
osgDB::ReaderWriter::Options const*) (ModelRegistry.hxx:115)
==25068== by 0x8597DBE: simgear::ModelRegistryCallback<ACProcessPolicy,
simgear::DefaultCachePolicy, ACOptimizePolicy, simgear::DefaultCopyPolicy,
simgear::OSGSubstitutePolicy>::readNode(std::string const&,
osgDB::ReaderWriter::Options const*) (ModelRegistry.hxx:91)
==25068== by 0x858E92F: simgear::ModelRegistry::readNode(std::string const&,
osgDB::ReaderWriter::Options const*) (ModelRegistry.cxx:411)
==25068== by 0x4656D89: osgDB::Registry::readNode(std::string const&,
osgDB::ReaderWriter::Options const*) (Registry:206)
==25068== by 0x4654CC1: osgDB::readNodeFile(std::string const&,
osgDB::ReaderWriter::Options const*) (ReadFile.cpp:60)
==25068== by 0x858C450: sgLoad3DModel(std::string const&, std::string
const&, SGPropertyNode*, double, osg::Node* (*)(SGPropertyNode*), SGModelData*,
SGPath const&) (model.cxx:172)
==25068== by 0x8438242: fgLoad3DModelPanel(std::string const&, std::string
const&, SGPropertyNode*, double, SGPath const&) (model_panel.cxx:43)
==25068== by 0x8437891: FGAircraftModel::init() (acmodel.cxx:72)
==25068== by 0x8094929: fgIdleFunction() (main.cxx:801)
==25068== by 0x80DC422: FGManipulator::handle(osgGA::GUIEventAdapter const&,
osgGA::GUIActionAdapter&) (FGManipulator.cxx:148)
==25068== by 0x409136E:
osgGA::GUIEventHandler::handleWithCheckAgainstIgnoreHandledEventsMask(osgGA::GUIEventAdapter
const&, osgGA::GUIActionAdapter&) (GUIEventHandler:100)
==25068== by 0x40D68E4: osgViewer::Viewer::eventTraversal() (Viewer.cpp:774)
==25068== by 0x40DE65F: osgViewer::ViewerBase::frame(double)
(ViewerBase.cpp:579)
==25068== by 0x40DFA70: osgViewer::ViewerBase::run() (ViewerBase.cpp:553)
==25068== by 0x40D7B75: osgViewer::Viewer::run() (Viewer.cpp:274)
==25068== by 0x80E1133: fgOSMainLoop() (fg_os_osgviewer.cxx:219)
==25068== by 0x809429A: fgMainInit(int, char**) (main.cxx:1077)
==25068== by 0x8093425: main (bootstrap.cxx:220)
-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2005.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
_______________________________________________
Flightgear-devel mailing list
Flightgear-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/flightgear-devel