Menu

#2113 DDS cache: segmentation fault when reloading scenery.

None
Done
Low
2019-03-12
2019-02-19
No

Ok, since my old ticket was not reopened, I have to create a new one. The problem reappeared when switching from FreeBSD to Linux.

Steps to reproduce:
1. Enable DDS cache in Rendering dialog.
2. Either go to "Select Airport" and press "Go to Airport" or "Environment Settings" and press "Reload Scenery".

  /usr/lib/libc.so.6 : ()+0x37e00
  /home/mike/var/games/flightgear/bin/fgfs : simgear::sha1_write(simgear::sha1nfo*, char const*, unsigned long)+0x1c
  /home/mike/var/games/flightgear/bin/fgfs : SGFile::computeHash[abi:cxx11]()+0xcb
  /home/mike/var/games/flightgear/bin/fgfs : simgear::ModelRegistry::readImage(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, osgDB::Options const*)+0x1037
  /home/mike/var/games/OpenSceneGraph/lib/libosgDB.so.131 : osgDB::readRefImageFile(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, osgDB::Options const*)+0x51
  /home/mike/var/games/flightgear/bin/fgfs : SplashScreen::setupLogoImage()+0x137
  /home/mike/var/games/flightgear/bin/fgfs : SplashScreen::createNodes()+0x16b6
  /home/mike/var/games/flightgear/bin/fgfs : SplashScreen::doUpdate()+0x268
  /home/mike/var/games/flightgear/bin/fgfs : SplashScreenUpdateCallback::operator()(osg::Node*, osg::NodeVisitor*)+0x15
  /home/mike/var/games/OpenSceneGraph/lib/libosg.so.131 : virtual thunk to osg::NodeCallback::run(osg::Object*, osg::Object*)+0x59
  /home/mike/var/games/flightgear/bin/fgfs : osg::Group::accept(osg::NodeVisitor&)+0x87
  /home/mike/var/games/OpenSceneGraph/lib/libosg.so.131 : osg::Group::traverse(osg::NodeVisitor&)+0x33
  /home/mike/var/games/flightgear/bin/fgfs : osg::Group::accept(osg::NodeVisitor&)+0x87
  /home/mike/var/games/OpenSceneGraph/lib/libosgViewer.so.131 : osgViewer::Viewer::updateTraversal()+0x131
  /home/mike/var/games/OpenSceneGraph/lib/libosgViewer.so.131 : ()+0xbc954
  /home/mike/var/games/flightgear/bin/fgfs : fgOSMainLoop()+0x143
  /home/mike/var/games/flightgear/bin/fgfs : fgMainInit(int, char**)+0x13bf
  /home/mike/var/games/flightgear/bin/fgfs : main()+0x17c
  /usr/lib/libc.so.6 : __libc_start_main()+0xf3
  /home/mike/var/games/flightgear/bin/fgfs : _start()+0x2e

Discussion

  • James Turner

    James Turner - 2019-02-19
    • assigned_to: Richard Harrison
     
  • Anonymous

    Anonymous - 2019-02-19

    Now that I've looked more carefully at the new trace, it looks similar to the old one in #2092.

     
  • James Turner

    James Turner - 2019-02-19

    Have you got a debug build you can reproduce this in? The backtrace from running under gdb ought to give us an idea why computeHash is crrashing.

     
  • Richard Harrison

    This is a side effect of the splash screen code attempting to load a directory rather than a file. see splash.cxx:291

    _logoImage = osgDB::readRefImageFile(logoPath.utf8Str());

    However for my part I've modified the DDS-TC to catch and handle the sgio_exception gracefully.

     
    • James Turner

      James Turner - 2019-02-20

      I'm confused - I wrote the code, and it definitiely does load from files, not directories. So what is going on?

       
  • Richard Harrison

    flying the ja37-viggen the logoPath is set to "i:/flightgear/aircraft/JA37" which is a directory and thus can't load as an image.

    It works on initial startup because the DDS-TC is disabled - but when the DTC is activated it will cause the hash method to fail.

     
    • James Turner

      James Turner - 2019-02-21

      Ah I should catch that case in the splash code, it's not allowed to use a directory path there. Should be a one line fix :)

       
  • Anonymous

    Anonymous - 2019-02-21

    May this be related to symlinks somehow? But far as I know I don't have any in my setup anymore...

     
  • xDraconian

    xDraconian - 2019-03-03
    • labels: --> Crash, Linux
     
  • Richard Harrison

    • status: New --> Done
     
  • Richard Harrison

    Fixed in DDS cache and also in the calling code to not request an image that is a directory.

     
  • Anonymous

    Anonymous - 2019-03-12

    Thanks, just checked, it works now.

     

Log in to post a comment.