Yes, I only found out that sometimes it can load after a restart... Mostly it 
hangs in conjunction with terragear trying to load terrain that I've flown 
multiple times already. So apart as Csaba mentioned, there might be some 
terragear code to improve as well?


--- On Thu, 9/22/11, Csaba Halász <csaba.hal...@gmail.com> wrote:

From: Csaba Halász <csaba.hal...@gmail.com>
Subject: Re: [Flightgear-devel] FG hangs on "loading scenery" when using many 
objects
To: "FlightGear developers discussions" <flightgear-devel@lists.sourceforge.net>
Date: Thursday, September 22, 2011, 3:13 AM

On Wed, Sep 21, 2011 at 11:07 PM, Thomas Albrecht <ra...@web.de> 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

------------------------------------------------------------------------------
All the data continuously generated in your IT infrastructure contains a
definitive record of customers, application performance, security
threats, fraudulent activity and more. Splunk takes this data and makes
sense of it. Business sense. IT sense. Common sense.
http://p.sf.net/sfu/splunk-d2dcopy1
_______________________________________________
Flightgear-devel mailing list
Flightgear-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/flightgear-devel
------------------------------------------------------------------------------
All the data continuously generated in your IT infrastructure contains a
definitive record of customers, application performance, security
threats, fraudulent activity and more. Splunk takes this data and makes
sense of it. Business sense. IT sense. Common sense.
http://p.sf.net/sfu/splunk-d2dcopy1
_______________________________________________
Flightgear-devel mailing list
Flightgear-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/flightgear-devel

Reply via email to