From: Csaba H. <csa...@gm...> - 2011-09-22 01:13:15
|
On Wed, Sep 21, 2011 at 11:07 PM, Thomas Albrecht <ra...@we...> wrote: > > On machine (much slower than yours: Pentium 4 2.4 GHz, 1.5GB DDR), FG hangs > when using ~2300 objects. Here, with AMD 605e 2.3GHz, it hangs at around 5800 objects, with the CPU behaviour you described. Going slightly higher, from around 6000, FG starts to burn CPU again, but nevertheless won't get any result. Looking into the problem, seems the scenery is loaded eventually, but the fdm is not initialized so this check never passes: if (globals->get_tile_mgr()->isSceneryLoaded() && fgGetBool("sim/fdm-initialized")) { Now, the FDM init code has this: if (globals->get_scenery()->scenery_available(geod, range)) { SG_LOG(SG_FLIGHT, SG_INFO, "Scenery loaded, will init FDM"); That in turn ends up at: simgear::CheckSceneryVisitor csnv(getPagerSingleton(), toOsg(p), range_m, framestamp); // currently the PagedLODs will not be loaded by the DatabasePager // while the splashscreen is there, so CheckSceneryVisitor force-loads // missing objects in the main thread get_scene_graph()->accept(csnv); if(!csnv.isLoaded()) Finally we arrive at: void SGPagedLOD::forceLoad(osgDB::DatabasePager *dbp, FrameStamp* framestamp, NodePath& path) { //SG_LOG(SG_GENERAL, SG_ALERT, "SGPagedLOD::forceLoad(" << //getFileName(getNumChildren()) << ")"); And now the crazy part! If I uncomment this logging, everything suddenly works, even with 20k objects: http://i53.tinypic.com/wwn12f.png Sounds like some timing/threading issue to me. -- Csaba/Jester |