As demanded by Robert, I repost an extended bug report that went
to osg-submissions first. This segfault happened before Lionel's
fix for that same function, and it still happens afterwards, using
revision 8944:

  OS:   Linux 2.6.25.2 (i86/Intel P4/32bit)
  gcc:  (SUSE Linux) 4.3.1 20080507
  libc: 2.8 (20080425)
  app:  FlightGear (cvs/head)
  db:   no idea; maybe some other fgfs developer could explain that :-)

The crash happens every few flightgear runs, without obvious pattern.
See the attached gdb log for details. More gdb or other info on request.

m.
Program received signal SIGSEGV, Segmentation fault.
[Switching to Thread 0xb3e24b90 (LWP 27878)]
osgDB::DatabasePager::FindCompileableGLObjectsVisitor::apply (this=0xb3e240c8, 
stateset=0xef260a0) at /home/m/fgfs/osg/include/osgDB/DatabasePager:431
431                     if ( texture->getTextureObject(*iter) == NULL ) return 
false;




(gdb) bt
#0  osgDB::DatabasePager::FindCompileableGLObjectsVisitor::apply 
(this=0xb3e240c8, stateset=0xef260a0) at 
/home/m/fgfs/osg/include/osgDB/DatabasePager:431
#1  0xb7bfaffe in osgDB::DatabasePager::FindCompileableGLObjectsVisitor::apply 
(this=0xb3e240c8, [EMAIL PROTECTED]) at 
/home/m/fgfs/osg/src/osgDB/DatabasePager.cpp:206
#2  0xb7a9c80e in osg::Geode::accept (this=0x11460358, [EMAIL PROTECTED]) at 
/home/m/fgfs/osg/include/osg/Geode:39
#3  0xb7ac75aa in osg::Group::traverse (this=0x114602c8, [EMAIL PROTECTED]) at 
/home/m/fgfs/osg/src/osg/Group.cpp:62
#4  0xb7bfae89 in osgDB::DatabasePager::FindCompileableGLObjectsVisitor::apply 
(this=0xb3e240c8, [EMAIL PROTECTED]) at 
/home/m/fgfs/osg/include/osg/NodeVisitor:181
#5  0xb7af399e in osg::NodeVisitor::apply (this=0xb3e240c8, [EMAIL PROTECTED]) 
at /home/m/fgfs/osg/src/osg/NodeVisitor.cpp:86
#6  0xb7ac8efe in osg::Group::accept (this=0x114602c8, [EMAIL PROTECTED]) at 
/home/m/fgfs/osg/include/osg/Group:38
#7  0xb7ac75aa in osg::Group::traverse (this=0x118b6c90, [EMAIL PROTECTED]) at 
/home/m/fgfs/osg/src/osg/Group.cpp:62
#8  0xb7bfae89 in osgDB::DatabasePager::FindCompileableGLObjectsVisitor::apply 
(this=0xb3e240c8, [EMAIL PROTECTED]) at 
/home/m/fgfs/osg/include/osg/NodeVisitor:181
#9  0xb7af399e in osg::NodeVisitor::apply (this=0xb3e240c8, [EMAIL PROTECTED]) 
at /home/m/fgfs/osg/src/osg/NodeVisitor.cpp:86
#10 0xb7af3a54 in osg::NodeVisitor::apply (this=0xb3e240c8, [EMAIL PROTECTED]) 
at /home/m/fgfs/osg/src/osg/NodeVisitor.cpp:121
#11 0xb7af3aa2 in osg::NodeVisitor::apply (this=0xb3e240c8, [EMAIL PROTECTED]) 
at /home/m/fgfs/osg/src/osg/NodeVisitor.cpp:136
#12 0xb7ae904a in osg::MatrixTransform::accept (this=0x118b6c90, [EMAIL 
PROTECTED]) at /home/m/fgfs/osg/include/osg/MatrixTransform:37
#13 0xb7ac75aa in osg::Group::traverse (this=0x1134eb78, [EMAIL PROTECTED]) at 
/home/m/fgfs/osg/src/osg/Group.cpp:62
#14 0xb7bfae89 in osgDB::DatabasePager::FindCompileableGLObjectsVisitor::apply 
(this=0xb3e240c8, [EMAIL PROTECTED]) at 
/home/m/fgfs/osg/include/osg/NodeVisitor:181
#15 0xb7af399e in osg::NodeVisitor::apply (this=0xb3e240c8, [EMAIL PROTECTED]) 
at /home/m/fgfs/osg/src/osg/NodeVisitor.cpp:86
#16 0xb7ac8efe in osg::Group::accept (this=0x1134eb78, [EMAIL PROTECTED]) at 
/home/m/fgfs/osg/include/osg/Group:38
#17 0xb7bf26d4 in osgDB::DatabasePager::DatabaseThread::run (this=0x904c140) at 
/home/m/fgfs/osg/src/osgDB/DatabasePager.cpp:675
#18 0xb79a3231 in OpenThreads::ThreadPrivateActions::StartThread 
(data=0x904c14c) at /home/m/fgfs/osg/src/OpenThreads/pthreads/PThread.c++:170
#19 0xb798d175 in start_thread () from /lib/libpthread.so.0
#20 0xb7524dce in clone () from /lib/libc.so.6




(gdb) print texture
$1 = (osg::Texture2D *) 0x114febb8




(gdb) bt full
#0  osgDB::DatabasePager::FindCompileableGLObjectsVisitor::apply 
(this=0xb3e240c8, stateset=0xef260a0) at 
/home/m/fgfs/osg/include/osgDB/DatabasePager:431
        texture = (osg::Texture2D *) 0x114febb8
        i = 0
#1  0xb7bfaffe in osgDB::DatabasePager::FindCompileableGLObjectsVisitor::apply 
(this=0xb3e240c8, [EMAIL PROTECTED]) at 
/home/m/fgfs/osg/src/osgDB/DatabasePager.cpp:206
        i = 6
#2  0xb7a9c80e in osg::Geode::accept (this=0x11460358, [EMAIL PROTECTED]) at 
/home/m/fgfs/osg/include/osg/Geode:39
No locals.
#3  0xb7ac75aa in osg::Group::traverse (this=0x114602c8, [EMAIL PROTECTED]) at 
/home/m/fgfs/osg/src/osg/Group.cpp:62
No locals.
#4  0xb7bfae89 in osgDB::DatabasePager::FindCompileableGLObjectsVisitor::apply 
(this=0xb3e240c8, [EMAIL PROTECTED]) at 
/home/m/fgfs/osg/include/osg/NodeVisitor:181
No locals.
#5  0xb7af399e in osg::NodeVisitor::apply (this=0xb3e240c8, [EMAIL PROTECTED]) 
at /home/m/fgfs/osg/src/osg/NodeVisitor.cpp:86
No locals.
#6  0xb7ac8efe in osg::Group::accept (this=0x114602c8, [EMAIL PROTECTED]) at 
/home/m/fgfs/osg/include/osg/Group:38
No locals.
#7  0xb7ac75aa in osg::Group::traverse (this=0x118b6c90, [EMAIL PROTECTED]) at 
/home/m/fgfs/osg/src/osg/Group.cpp:62
No locals.
#8  0xb7bfae89 in osgDB::DatabasePager::FindCompileableGLObjectsVisitor::apply 
(this=0xb3e240c8, [EMAIL PROTECTED]) at 
/home/m/fgfs/osg/include/osg/NodeVisitor:181
No locals.
#9  0xb7af399e in osg::NodeVisitor::apply (this=0xb3e240c8, [EMAIL PROTECTED]) 
at /home/m/fgfs/osg/src/osg/NodeVisitor.cpp:86
No locals.
#10 0xb7af3a54 in osg::NodeVisitor::apply (this=0xb3e240c8, [EMAIL PROTECTED]) 
at /home/m/fgfs/osg/src/osg/NodeVisitor.cpp:121
No locals.
#11 0xb7af3aa2 in osg::NodeVisitor::apply (this=0xb3e240c8, [EMAIL PROTECTED]) 
at /home/m/fgfs/osg/src/osg/NodeVisitor.cpp:136
No locals.
#12 0xb7ae904a in osg::MatrixTransform::accept (this=0x118b6c90, [EMAIL 
PROTECTED]) at /home/m/fgfs/osg/include/osg/MatrixTransform:37
No locals.
#13 0xb7ac75aa in osg::Group::traverse (this=0x1134eb78, [EMAIL PROTECTED]) at 
/home/m/fgfs/osg/src/osg/Group.cpp:62
No locals.
#14 0xb7bfae89 in osgDB::DatabasePager::FindCompileableGLObjectsVisitor::apply 
(this=0xb3e240c8, [EMAIL PROTECTED]) at 
/home/m/fgfs/osg/include/osg/NodeVisitor:181
No locals.
#15 0xb7af399e in osg::NodeVisitor::apply (this=0xb3e240c8, [EMAIL PROTECTED]) 
at /home/m/fgfs/osg/src/osg/NodeVisitor.cpp:86
No locals.
#16 0xb7ac8efe in osg::Group::accept (this=0x1134eb78, [EMAIL PROTECTED]) at 
/home/m/fgfs/osg/include/osg/Group:38
No locals.
#17 0xb7bf26d4 in osgDB::DatabasePager::DatabaseThread::run (this=0x904c140) at 
/home/m/fgfs/osg/src/osgDB/DatabasePager.cpp:675
        frov = (osgDB::DatabasePager::FindCompileableGLObjectsVisitor) {
  <osg::NodeVisitor> = {
    <osg::Referenced> = {
      _vptr.Referenced = 0xb7c453d4,
      _observerSetDataPtr = {
        _ptr = 0x0
      },
      _refCount = {
        _value = 0
      }
    },
    members of osg::NodeVisitor:
    _vptr.NodeVisitor = 0xb7c4534c,
    _visitorType = osg::NodeVisitor::NODE_VISITOR,
    _traversalNumber = -1,
    _frameStamp = {
      _ptr = 0x0
    },
    _traversalMode = osg::NodeVisitor::TRAVERSE_ALL_CHILDREN,
    _traversalMask = 4294967295,
    _nodeMaskOverride = 0,
    _nodePath = {
      <std::_Vector_base<osg::Node*, std::allocator<osg::Node*> >> = {
        _M_impl = {
          <std::allocator<osg::Node*>> = {
            <__gnu_cxx::new_allocator<osg::Node*>> = {<No data fields>}, <No 
data fields>},
          members of std::_Vector_base<osg::Node*, std::allocator<osg::Node*> 
>::_Vector_impl:
          _M_start = 0x97a9af0,
          _M_finish = 0x97a9b2c,
          _M_end_of_storage = 0x97a9b30
        }
      }, <No data fields>},
    _userData = {
      _ptr = 0x0
    },
    _databaseRequestHandler = {
      _ptr = 0x0
    },
    _imageRequestHandler = {
      _ptr = 0x0
    }
  },
  members of osgDB::DatabasePager::FindCompileableGLObjectsVisitor:
  _dataToCompile = @0x118b5334,
  _changeAutoUnRef = true,
  _valueAutoUnRef = true,
  _changeAnisotropy = false,
  _valueAnisotropy = 1,
  _drawablePolicy = osgDB::DatabasePager::DO_NOT_MODIFY_DRAWABLE_SETTINGS,
  _pager = 0x9118068,
  _textureSet = {
    _M_t = {
      _M_impl = {
        <std::allocator<std::_Rb_tree_node<osg::ref_ptr<osg::Texture> > >> = {
          
<__gnu_cxx::new_allocator<std::_Rb_tree_node<osg::ref_ptr<osg::Texture> > >> = 
{<No data fields>}, <No data fields>},
        members of std::_Rb_tree<osg::ref_ptr<osg::Texture>, 
osg::ref_ptr<osg::Texture>, std::_Identity<osg::ref_ptr<osg::Texture> >, 
std::less<osg::ref_ptr<osg::Texture> >, 
std::allocator<osg::ref_ptr<osg::Texture> > 
>::_Rb_tree_impl<std::less<osg::ref_ptr<osg::Texture> >, false>:
        _M_key_compare = {
          <std::binary_function<osg::ref_ptr<osg::Texture>, 
osg::ref_ptr<osg::Texture>, bool>> = {<No data fields>}, <No data fields>},
        _M_header = {
          _M_color = std::_S_red,
          _M_parent = 0x1134e058,
          _M_left = 0xf05f120,
          _M_right = 0x118aff18
        },
        _M_node_count = 6
      }
    }
  },
  _drawableSet = {
    _M_t = {
      _M_impl = {
        <std::allocator<std::_Rb_tree_node<osg::ref_ptr<osg::Drawable> > >> = {
          
<__gnu_cxx::new_allocator<std::_Rb_tree_node<osg::ref_ptr<osg::Drawable> > >> = 
{<No data fields>}, <No data fields>},
        members of std::_Rb_tree<osg::ref_ptr<osg::Drawable>, 
osg::ref_ptr<osg::Drawable>, std::_Identity<osg::ref_ptr<osg::Drawable> >, 
std::less<osg::ref_ptr<osg::Drawable> >, 
std::allocator<osg::ref_ptr<osg::Drawable> > 
>::_Rb_tree_impl<std::less<osg::ref_ptr<osg::Drawable> >, false>:
        _M_key_compare = {
          <std::binary_function<osg::ref_ptr<osg::Drawable>, 
osg::ref_ptr<osg::Drawable>, bool>> = {<No data fields>}, <No data fields>},
        _M_header = {
          _M_color = std::_S_red,
          _M_parent = 0x1134e070,
          _M_left = 0x91d6c88,
          _M_right = 0x91c0168
        },
        _M_node_count = 7
      }
    }
  },
  _kdTreeBuilder = {
    _ptr = 0x0
  }
}
        nodePath = {
  <std::_Vector_base<osg::Node*, std::allocator<osg::Node*> >> = {
    _M_impl = {
      <std::allocator<osg::Node*>> = {
        <__gnu_cxx::new_allocator<osg::Node*>> = {<No data fields>}, <No data 
fields>},
      members of std::_Vector_base<osg::Node*, std::allocator<osg::Node*> 
>::_Vector_impl:
      _M_start = 0x118b53c8,
      _M_finish = 0x118b53f4,
      _M_end_of_storage = 0x118b5418
    }
  }, <No data fields>}
        nodePathList = {
  <std::_Vector_base<std::vector<osg::Node*, std::allocator<osg::Node*> >, 
std::allocator<std::vector<osg::Node*, std::allocator<osg::Node*> > > >> = {
    _M_impl = {
      <std::allocator<std::vector<osg::Node*, std::allocator<osg::Node*> > >> = 
{
        <__gnu_cxx::new_allocator<std::vector<osg::Node*, 
std::allocator<osg::Node*> > >> = {<No data fields>}, <No data fields>},
      members of std::_Vector_base<std::vector<osg::Node*, 
std::allocator<osg::Node*> >, std::allocator<std::vector<osg::Node*, 
std::allocator<osg::Node*> > > >::_Vector_impl:
      _M_start = 0x118afc00,
      _M_finish = 0x118afc30,
      _M_end_of_storage = 0x118afc30
    }
  }, <No data fields>}
        loadedObjectsNeedToBeCompiled = false
        databaseRequest = {
  _ptr = 0x1134e228
}
        fileCachePath = <value optimized out>
        firstTime = true
        read_queue = {
  _ptr = 0x90cc7a0
}
        out_queue = {
  _ptr = 0x9076cc8
}
        cacheFilePath = {
  static npos = 4294967295,
  _M_dataplus = {
    <std::allocator<char>> = {
      <__gnu_cxx::new_allocator<char>> = {<No data fields>}, <No data fields>},
    members of std::basic_string<char, std::char_traits<char>, 
std::allocator<char> >::_Alloc_hider:
    _M_p = 0x871a72c ""
  }
}
#18 0xb79a3231 in OpenThreads::ThreadPrivateActions::StartThread 
(data=0x904c14c) at /home/m/fgfs/osg/src/OpenThreads/pthreads/PThread.c++:170
        pd = (OpenThreads::PThreadPrivateData *) 0x90cc2d8
        tcs = {
  thread = 0x904c14c,
  runflag = 0x90cc2e1
}
        status = <value optimized out>
#19 0xb798d175 in start_thread () from /lib/libpthread.so.0
No symbol table info available.
#20 0xb7524dce in clone () from /lib/libc.so.6
No symbol table info available.




(gdb) print *texture
$2 = (osg::Texture2D) {
  <osg::Texture> = {
    <osg::StateAttribute> = {
      <osg::Object> = {
        <osg::Referenced> = {
          _vptr.Referenced = 0xb7bc5fe8,
          _observerSetDataPtr = {
            _ptr = 0x0
          },
          _refCount = {
            _value = 2
          }
        },
        members of osg::Object:
        _name = {
          static npos = 4294967295,
          _M_dataplus = {
            <std::allocator<char>> = {
              <__gnu_cxx::new_allocator<char>> = {<No data fields>}, <No data 
fields>},
            members of std::basic_string<char, std::char_traits<char>, 
std::allocator<char> >::_Alloc_hider:
            _M_p = 0xef23574 
"/home/m/fgfs/Data.osg/Textures.high/Terrain/Town1.rgb"
          }
        },
        _dataVariance = osg::Object::STATIC,
        _userData = {
          _ptr = 0x0
        }
      },
      members of osg::StateAttribute:
      _parents = {
        <std::_Vector_base<osg::StateSet*, std::allocator<osg::StateSet*> >> = {
          _M_impl = {
            <std::allocator<osg::StateSet*>> = {
              <__gnu_cxx::new_allocator<osg::StateSet*>> = {<No data fields>}, 
<No data fields>},
            members of std::_Vector_base<osg::StateSet*, 
std::allocator<osg::StateSet*> >::_Vector_impl:
            _M_start = 0x114feca8,
            _M_finish = 0x114fecac,
            _M_end_of_storage = 0x114fecac
          }
        }, <No data fields>},
      _updateCallback = {
        _ptr = 0x0
      },
      _eventCallback = {
        _ptr = 0x0
      }
    },
    members of osg::Texture:
    static s_numberTextureReusedLastInLastFrame = 0,
    static s_numberNewTextureInLastFrame = 7,
    static s_numberDeletedTextureInLastFrame = 0,
    _texParametersDirtyList = {
      _array = {
        <std::_Vector_base<unsigned int, std::allocator<unsigned int> >> = {
          _M_impl = {
            <std::allocator<unsigned int>> = {
              <__gnu_cxx::new_allocator<unsigned int>> = {<No data fields>}, 
<No data fields>},
            members of std::_Vector_base<unsigned int, std::allocator<unsigned 
int> >::_Vector_impl:
            _M_start = 0x11500d80,
            _M_finish = 0x11500d84,
            _M_end_of_storage = 0x11500d84
          }
        }, <No data fields>}
    },
    _texMipmapGenerationDirtyList = {
      _array = {
        <std::_Vector_base<unsigned int, std::allocator<unsigned int> >> = {
          _M_impl = {
            <std::allocator<unsigned int>> = {
              <__gnu_cxx::new_allocator<unsigned int>> = {<No data fields>}, 
<No data fields>},
            members of std::_Vector_base<unsigned int, std::allocator<unsigned 
int> >::_Vector_impl:
            _M_start = 0x10fc63f0,
            _M_finish = 0x10fc63f4,
            _M_end_of_storage = 0x10fc63f4
          }
        }, <No data fields>}
    },
    _wrap_s = osg::Texture::REPEAT,
    _wrap_t = osg::Texture::REPEAT,
    _wrap_r = osg::Texture::CLAMP,
    _min_filter = osg::Texture::LINEAR_MIPMAP_LINEAR,
    _mag_filter = osg::Texture::LINEAR,
    _maxAnisotropy = 8,
    _useHardwareMipMapGeneration = true,
    _unrefImageDataAfterApply = true,
    _clientStorageHint = false,
    _resizeNonPowerOfTwoHint = true,
    _borderColor = {
      _v = {0, 0, 0, 0}
    },
    _borderWidth = 0,
    _internalFormatMode = osg::Texture::USE_ARB_COMPRESSION,
    _internalFormatType = osg::Texture::NORMALIZED,
    _internalFormat = 0,
    _sourceFormat = 0,
    _sourceType = 0,
    _use_shadow_comparison = false,
    _shadow_compare_func = osg::Texture::LEQUAL,
    _shadow_texture_mode = osg::Texture::LUMINANCE,
    _shadow_ambient = 0,
    _textureObjectBuffer = {
      _array = {
        <std::_Vector_base<osg::ref_ptr<osg::Texture::TextureObject>, 
std::allocator<osg::ref_ptr<osg::Texture::TextureObject> > >> = {
          _M_impl = {
            <std::allocator<osg::ref_ptr<osg::Texture::TextureObject> >> = {
              
<__gnu_cxx::new_allocator<osg::ref_ptr<osg::Texture::TextureObject> >> = {<No 
data fields>}, <No data fields>},
            members of 
std::_Vector_base<osg::ref_ptr<osg::Texture::TextureObject>, 
std::allocator<osg::ref_ptr<osg::Texture::TextureObject> > >::_Vector_impl:
            _M_start = 0x160,
            _M_finish = 0x114fc734,
            _M_end_of_storage = 0x114fc734
          }
        }, <No data fields>}
    },
    _readPBuffer = {
      _ptr = 0x0
    }
  },
  members of osg::Texture2D:
  _image = {
    _ptr = 0x115f2660
  },
  _textureWidth = 0,
  _textureHeight = 0,
  _numMipmapLevels = 0,
  _subloadCallback = {
    _ptr = 0x0
  },
  _modifiedCount = {
    _array = {
      <std::_Vector_base<unsigned int, std::allocator<unsigned int> >> = {
        _M_impl = {
          <std::allocator<unsigned int>> = {
            <__gnu_cxx::new_allocator<unsigned int>> = {<No data fields>}, <No 
data fields>},
          members of std::_Vector_base<unsigned int, std::allocator<unsigned 
int> >::_Vector_impl:
          _M_start = 0x114fec98,
          _M_finish = 0x114fec9c,
          _M_end_of_storage = 0x114fec9c
        }
      }, <No data fields>}
  }
}

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

Reply via email to