Hi,

Hans Fugal wrote:
It compiles and runs the splash screen and setups but then crashes applying a
texture (don't know which).

I don't see that here (MacBook with Leopard), it runs fine. I think I

MacBook Pro with Tiger.

have had a problem like this before and it ended up being related to
the OSG plugin search path. Make sure you only have one set of plugins
and that OSG and FlightGear are successfully finding them.

Seems to be OK at least nobody's complaining about anything i.e. 'fgfs --log-level=debug' and OSG_NOTIFY_LEVEL don't give away anything.

Are you using the released OSG framework or did you compile OSG yourself?

Compiling myself from svn, as library not framework.
I'm pretty confident that the OSG build is OK as I'm using it for other projects as well.

I've attached a gdb backtrace of the crash along with some detail of the images it's crashing on (cirrus.rgba). As you can see the crash is actually in the OpenGL driver (gldAllocVertexBuffer..gldGetTextureLevel..gleGenMipmaps..glTexImage2D) called from osg::Texture::applyTexImage2D_load().

The texture and image look fine so maybe this is completely unrelated to the actual problem. If it's the first texture download it could just as well be a GL context problem...

I'm just getting my feet wet with the codebase so any help/hints etc. are appreciated.

Cheers!
/ulrich
Splash screen progress setting up time & renderer
Updating time
  Current Unix calendar time = 1200738689  warp = 0
  Current GMT = 1/19/2008 10:31:29
  Current Unix calendar time = 1200738689  warp = 0
  Current GMT = 1/19/2008 10:31:29
  Current Julian Date = 2.45448e+06
  COURSE: GMT = 0/19/108 10:31:29
  March 21 noon (GMT) = 1206100800
  Time since 3/21/108 GMT = -62.0615
  days = -62  hours = 10.5247  lon = 0  lst = 18.3914
  COURSE: GMT = 0/19/108 10:31:29
  March 21 noon (GMT) = 1206100800
  Time since 3/21/108 GMT = -62.0615
  days = -62  hours = 10.5247  lon = 122.357  lst = 10.2342
  Current lon=0.00 Sidereal Time = 18.4049
  gst => 210.405
  Current LOCAL Sidereal Time = 10.2478 (10.2478) (diff = 0.0135466)
After fgInitTimeOffset(): warp = 0
Panel visible = 0
Splash screen progress loading scenery objects

Program received signal EXC_BAD_ACCESS, Could not access memory.
Reason: KERN_INVALID_ADDRESS at address: 0x238ff000
0xffff0884 in ___memcpy () at 
/System/Library/Frameworks/System.framework/PrivateHeaders/i386/cpu_capabilities.h:228
228     
/System/Library/Frameworks/System.framework/PrivateHeaders/i386/cpu_capabilities.h:
 No such file or directory.
        in 
/System/Library/Frameworks/System.framework/PrivateHeaders/i386/cpu_capabilities.h
(gdb) where
#0  0xffff0884 in ___memcpy () at 
/System/Library/Frameworks/System.framework/PrivateHeaders/i386/cpu_capabilities.h:228
#1  0x18b2a58c in gldAllocVertexBuffer ()
#2  0x18b2b045 in gldGetTextureLevel ()
#3  0x18a9788c in gleGenMipmaps ()
#4  0x1897e7c2 in glTexImage2D_Exec ()
#5  0x92b27517 in glTexImage2D ()
#6  0x06f6a79b in osg::Texture::applyTexImage2D_load (this=0x290d1e60, [EMAIL 
PROTECTED], target=3553, image=0x29944a20, inwidth=256, inheight=256, 
numMipmapLevels=1) at 
/Users/uli/Projects/osg/OpenSceneGraph/src/osg/Texture.cpp:1057
#7  0x06f72a2c in osg::Texture2D::apply (this=0x290d1e60, [EMAIL PROTECTED]) at 
/Users/uli/Projects/osg/OpenSceneGraph/src/osg/Texture2D.cpp:204
#8  0x06fffaa7 in osg::State::applyAttributeList (this=0x76aed20, [EMAIL 
PROTECTED], [EMAIL PROTECTED]) at State:1158
#9  0x06f56625 in osg::State::apply (this=0x76aed20, dstate=0x290d2fa0) at 
/Users/uli/Projects/osg/OpenSceneGraph/src/osg/State.cpp:398
#10 0x06cd4722 in osgUtil::RenderLeaf::render (this=0x2ea85d60, [EMAIL 
PROTECTED], previous=0x0) at 
/Users/uli/Projects/osg/OpenSceneGraph/src/osgUtil/RenderLeaf.cpp:71
#11 0x06cd0896 in osgUtil::RenderBin::drawImplementation (this=0x2ea85580, 
[EMAIL PROTECTED], [EMAIL PROTECTED]) at 
/Users/uli/Projects/osg/OpenSceneGraph/src/osgUtil/RenderBin.cpp:408
#12 0x06cd0985 in osgUtil::RenderBin::drawImplementation (this=0x2ea852f0, 
[EMAIL PROTECTED], [EMAIL PROTECTED]) at 
/Users/uli/Projects/osg/OpenSceneGraph/src/osgUtil/RenderBin.cpp:458
#13 0x06cdd242 in osgUtil::RenderStage::drawImplementation (this=0x2ea852f0, 
[EMAIL PROTECTED], [EMAIL PROTECTED]) at 
/Users/uli/Projects/osg/OpenSceneGraph/src/osgUtil/RenderStage.cpp:1051
#14 0x06cdd57c in osgUtil::RenderStage::drawInner (this=0x2ea852f0, [EMAIL 
PROTECTED], [EMAIL PROTECTED], [EMAIL PROTECTED]) at 
/Users/uli/Projects/osg/OpenSceneGraph/src/osgUtil/RenderStage.cpp:719
#15 0x06cdcac3 in osgUtil::RenderStage::draw (this=0x2ea852f0, [EMAIL 
PROTECTED], [EMAIL PROTECTED]) at 
/Users/uli/Projects/osg/OpenSceneGraph/src/osgUtil/RenderStage.cpp:913
#16 0x06cd4d45 in osgUtil::RenderStage::drawPostRenderStages (this=0x76ad480, 
[EMAIL PROTECTED], [EMAIL PROTECTED]) at 
/Users/uli/Projects/osg/OpenSceneGraph/src/osgUtil/RenderStage.cpp:1069
#17 0x06cdc8f0 in osgUtil::RenderStage::draw (this=0x76ad480, [EMAIL 
PROTECTED], [EMAIL PROTECTED]) at 
/Users/uli/Projects/osg/OpenSceneGraph/src/osgUtil/RenderStage.cpp:979
#18 0x06ceef70 in osgUtil::SceneView::draw (this=0x76acbb0) at 
/Users/uli/Projects/osg/OpenSceneGraph/src/osgUtil/SceneView.cpp:1435
#19 0x06852885 in osgViewer::Renderer::cull_draw (this=0x76aca10) at 
/Users/uli/Projects/osg/OpenSceneGraph/src/osgViewer/Renderer.cpp:506
#20 0x06f038d8 in osg::GraphicsContext::runOperations (this=0x76ae950) at 
/Users/uli/Projects/osg/OpenSceneGraph/src/osg/GraphicsContext.cpp:694
#21 0x0687b63e in osgViewer::ViewerBase::renderingTraversals (this=0x76a9680) 
at /Users/uli/Projects/osg/OpenSceneGraph/src/osgViewer/ViewerBase.cpp:654
#22 0x00008b6c in GLUTdraw () at fg_os.cxx:136
#23 0x97445b3a in -[GLUTView drawRect:] ()
#24 0x974494b9 in -[GLUTView handleWorkEvent:] ()
#25 0x97462387 in processWindowWorkList ()
#26 0x974623ef in __glutProcessWorkEvents ()
#27 0x974516f1 in -[GLUTApplication run] ()
#28 0x97461dee in glutMainLoop ()
#29 0x00008c8d in fgOSMainLoop () at fg_os.cxx:165
#30 0x00005ae1 in fgMainInit (argc=2, argv=0xbffff974) at main.cxx:1077
#31 0x000033ec in main (argc=2, argv=0xbffff974) at bootstrap.cxx:220
(gdb)
...
(gdb) up
#6  0x070d779b in osg::Texture::applyTexImage2D_load (this=0x280cf100, [EMAIL 
PROTECTED], target=3553, image=0x28937760, inwidth=256, inheight=256, 
numMipmapLevels=1) at 
/Users/uli/Projects/osg/OpenSceneGraph/src/osg/Texture.cpp:1057
1057                    data -dataMinusOffset+dataPlusOffset);
(gdb) print image
$1 = (const osg::Image *) 0x28937760
(gdb) print *image
$2 = {
  <osg::Object> = {
    <osg::Referenced> = {
      _vptr$Referenced = 0x71bde68, 
      _refMutex = 0x289391f0, 
      _refCount = 3, 
      _observers = 0x0
    }, 
    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 = 0xa0b0eaa0 ""
      }
    }, 
    _dataVariance = osg::Object::STATIC, 
    _userData = {
      _ptr = 0x0
    }
  }, 
  members of osg::Image: 
  _fileName = {
    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 = 0x289391ac "/Users/uli/Projects/fgfs/data/Textures/Sky/cirrus.rgba"
    }
  }, 
  _origin = osg::Image::BOTTOM_LEFT, 
  _s = 256, 
  _t = 256, 
  _r = 1, 
  _internalTextureFormat = 2, // i.e. 2 channels, LUMINANCE_ALPHA
  _pixelFormat = 6410,        // i.e. GL_LUMINANCE_ALPHA
  _dataType = 5121,           // i.e. GL_UNSIGNED_BYTE
  _packing = 1, 
  _allocationMode = osg::Image::USE_NEW_DELETE, 
  _data = 0x1dbc5000 "#\003#\002#\002#", 
  _modifiedCount = 1, 
  _mipmapData = {
    <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 = 0x0, 
        _M_finish = 0x0, 
        _M_end_of_storage = 0x0
      }
    }, <No data fields>}, 
  _bufferObject = {
    _ptr = 0x0
  }
}
-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2008.
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

Reply via email to