Re: [Flightgear-devel] FG hangs on loading scenery when using many objects

2011-09-24 Thread Michael Sgier
Still no luck here.Could anyone push it so i can do a git pull?
Thanks

--- On Fri, 9/23/11, Thomas Albrecht ra...@web.de wrote:

From: Thomas Albrecht ra...@web.de
Subject: Re: [Flightgear-devel] FG hangs on loading scenery when using many 
objects
To: flightgear-devel@lists.sourceforge.net
Date: Friday, September 23, 2011, 11:24 PM

Hey Csaba,
hey Geoff,

thanks a lot for looking into this! 

 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:

Same here -- uncommenting this part in simgear/scene/model/SGPagedLOD.cxx
fixes the issue for me, too. 20k objects were loaded within 10 sec on my P4 
2.4 GHz, though frame rate is ~5 then...

Cheers,
Tom

-Inline Attachment Follows-

--
All of the data generated in your IT infrastructure is seriously valuable.
Why? It contains a definitive record of application performance, security
threats, fraudulent activity, and more. Splunk takes this data and makes
sense of it. IT sense. And common sense.
http://p.sf.net/sfu/splunk-d2dcopy2
-Inline Attachment Follows-

___
Flightgear-devel mailing list
Flightgear-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/flightgear-devel
--
All of the data generated in your IT infrastructure is seriously valuable.
Why? It contains a definitive record of application performance, security
threats, fraudulent activity, and more. Splunk takes this data and makes
sense of it. IT sense. And common sense.
http://p.sf.net/sfu/splunk-d2dcopy2___
Flightgear-devel mailing list
Flightgear-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/flightgear-devel


Re: [Flightgear-devel] FG hangs on loading scenery when using many objects

2011-09-23 Thread Michael Sgier
Hi cannot find it. grep -r nor Qtcreator find it, which files are those or how 
should i search?

I gets worse on my PC. I've several sceneries that hang so I need to 
investigate.Thanks

--- 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 of the data generated in your IT infrastructure is seriously valuable.
Why? It contains a definitive record of application performance, security
threats, fraudulent activity, and more. Splunk takes this data and makes
sense of it. IT sense. And common sense.
http://p.sf.net/sfu/splunk-d2dcopy2___
Flightgear-devel mailing list
Flightgear-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/flightgear-devel


Re: [Flightgear-devel] FG hangs on loading scenery when using many objects

2011-09-23 Thread Thomas Albrecht
Hey Csaba,
hey Geoff,

thanks a lot for looking into this! 

 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:

Same here -- uncommenting this part in simgear/scene/model/SGPagedLOD.cxx
fixes the issue for me, too. 20k objects were loaded within 10 sec on my P4 
2.4 GHz, though frame rate is ~5 then...

Cheers,
Tom


signature.asc
Description: This is a digitally signed message part.
--
All of the data generated in your IT infrastructure is seriously valuable.
Why? It contains a definitive record of application performance, security
threats, fraudulent activity, and more. Splunk takes this data and makes
sense of it. IT sense. And common sense.
http://p.sf.net/sfu/splunk-d2dcopy2___
Flightgear-devel mailing list
Flightgear-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/flightgear-devel


Re: [Flightgear-devel] FG hangs on loading scenery when using many objects

2011-09-22 Thread Michael Sgier
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


Re: [Flightgear-devel] FG hangs on loading scenery when using many objects

2011-09-22 Thread Geoff McLane
Hi Tom,

Thanks for adding the png texture... Now they look 
like trees ;=)) not square buildings...
 http://geoffair.org/tmp/fgfs-screen-003.png 
 http://geoffair.org/tmp/fgfs-screen-004.png 

But still no problem loading in my machine...

And switching to your second test, EHLE, using 10K 
trees, again no problems loading -
 http://geoffair.org/tmp/fgfs-screen-005.png 

And actually I chose to ADD the 10,000 python 
generated objects into the existing 3040154.stg...

Naturally the scenery loading stage seemed longer, 
but no freeze... and my frame rate was down to 
about 15 fps...

I even tried a _MAD_ example of 100,000 trees... 

This certainly took lots longer to load... the fading 
of the splash alone took about a minute... reduced 
my frame rate to 1, and the rendering engine refused 
to paint them all...
 http://geoffair.org/tmp/fgfs-screen-006.png 

Well the size of the block was continuing to grow 
all the time - I could see the rendering thread 
add trees, horizontal, row by row, so maybe if I 
had waited the time...

Still no freeze exactly ;=() unless you count 
this very-slow-rendering... maybe that is what 
you are experiencing... with a Pentium 4... 

I had fgfs running for 20+ minutes to get that 
far even with my Core 2 Quad cpu...

Or maybe, as Csaba points out, there may be some 
timing / threading issue, but nothing shows up 
on my machine...

Enough FUN with trees ;=)) Now to remember to put 
my scenery back to what it was...

Sorry can not help more... 

Regards,
Geoff.

On Wed, 2011-09-21 at 23:07 +0200, Thomas Albrecht wrote:
 Hi Geoff,
 
 thanks for testing! Indeed, I forgot the texture, sorry about that. It is 
 included in a new package: http://www.mediafire.com/?q99zyzkyu2tw04w
 
 For further testing, I wrote a small python script which fills a rectangular 
 area at EHLE (because it's mostly flat there, so I can use hardcoded 
 elevation) with an arbitraty number of objects (all copies of that coco 
 palm). Could you please give it a try and see if you find any strange 
 behaviour with, say, 5k, 10k, 20k objects?
 
 Usage: 
 
 backup Objects/e000n50/e005n52/3040154.stg first!
 
 tar xzf Objects.tar.gz
 cd Objects/e000n50/e005n52
 ./place_objs.py 5000
 then start fgfs at EHLE
 
 On machine (much slower than yours: Pentium 4 2.4 GHz, 1.5GB DDR), FG hangs 
 when using ~2300 objects.
 
 Thanks,
 Tom



--
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


Re: [Flightgear-devel] FG hangs on loading scenery when using many objects

2011-09-21 Thread Geoff McLane
Hi Tom,

He, he, just for ***FUN*** I tried with 4000 
objects...

See the 'crowded' runway on startup -
 http://geoffair.org/tmp/fgfs-screen-001.png 
but more spectacular from the air -
 http://geoffair.org/tmp/fgfs-screen-002.png 

and had no problems loading ;=))

But you seem to have missed the png texture file 
from your zip, and maybe that would make a difference?

Console output - several times -
osgDB ac3d reader: could not find texture CocoPalmSeedling.png

Did not check the cpu usage, and the total load time 
was well under a minute... about 30 seconds...

If you add that png, I would give it a try with 5000, 
but the problems does seem to be in your machine at the 
moment ;=((

HTH.

Regards,
Geoff.

System Information:
- SG/FG/FGDATA - Git of 2011/09/14 12:30:29
- OSG 3.0.1, PLIB 1.8.5, boost 1.40.00
- Ubuntu 10.04 (lucid) linux - 2.6.32-33-generic
- Video: ATI Technologies Inc RV630 [Radeon HD 2600XT]
- ATI/AMD proprietary fglrx driver - $ modinfo fglrx
  srcversion: 33640324E1E3A5E6A7234AC
- CPU: Intel Core 2 Quad Q6600 2.40 GHz
- RAM: 2 GB
- Box: Dell XPS 420 - Dell monitor at 1440x900, 60 Hz

Scripts used - after failing to load the new stg the first 
time, I rename the 1907463.stg in my Scenery-1.0.1, and 
copied in 1907463.stg.4000, plus the *.ac file... then
ran -

#!/bin/sh
# run_test.sh
#SCENERY=--fg-scenery=/home/downloads/temp:/home/geoff/Scenery-1.0.1
SCENERY=--fg-scenery=/home/geoff/Scenery-1.0.1
OPTS=--prop:/sim/frame-rate-throttle-hz=30 --disable-random-objects
--geometry=1920x1190+0+0
OPTS=$OPTS --atlas=socket,out,1,localhost,5500,udp --season=summer
$SCENERY
OPTS=$OPTS --aircraft=c172p --airport=TNCM --log-level=alert
OPTS=$OPTS --prop:/sim/rendering/multi-sample-buffers=true
--prop:/sim/rendering/multi-samples=2
OPTS=$OPTS --prop:/sim/ai-traffic/enabled=false
--prop:/sim/traffic-manager/enabled=false --prop:/sim/atc/enabled=false
OPTS=$OPTS --timeofday=dawn --enable-real-weather-fetch
--control=joystick --disable-auto-coordination
./run_fgfs.sh $OPTS

which runs -
#!/bin/sh
# run_fgfs.sh version=1.3.4, 2011-09-12 - run from anywhere
BN=`basename $0`
cd /home/geoff/fg/fg16
HERE=$PWD
cd install/fgfs/bin
export LD_LIBRARY_PATH=/home/geoff/fg/fg16/install/OSG301/lib
echo $BN: Running: ./fgfs --fg-root=/home/geoff/fg/fg16/fgfs/data $@
./fgfs --fg-root=/home/geoff/fg/fg16/fgfs/data $@


On Tue, 2011-09-20 at 23:00 +0200, Thomas Albrecht wrote:
 Hey group,
 
 I've come across a problem with FG when many (static) objects are to be 
 loaded 
 on FG startup.
 
 Usually, on my (faily old) PC FG loads for about 20 seconds, then 
 says loading scenery for about 6 seconds, and places me in the c172 ready 
 for takeoff. During all this CPU load is at 100%.
 
 Now if I start FG with scenery that contains many ( 1000) objects, I get the 
 following:
 - FG still loads for about 20 sec, then says loading scenery
 - about 3 seconds later, CPU load drops to ~20% and stays there
 - and FG never finishes startup
 --log-level=debug shows the main loop is running, I can use the menu, but I 
 never end up in the c172, nor see anything else but the splash screen
 
 Starting at a nearby airport and flying into said scenery works. I can also 
 teleport to this nearby airport while FG 'hangs', and then fly into said 
 scenery flawlessly.
 
 I've created a test scenery [1] which uses TNCM terrain and 5000 instances of 
 one object, furthermore, a script which lets me reduce the number of objects 
 in the .stg. If I use 3100 objects, everything is fine. 3200 objects, and FG 
 hangs. 100% repeatable, though I did not narrow down the threshold number 
 further.
 
 However, the threshold number seems to depend on 
 - the object(s) loaded
 - CPU load: If I have another process running (mplayer, for example) which 
 consumes some CPU, FG now also hangs for the 3100 objects case (which would 
 otherwise load fine if there was no other demanding process).
 
 It appears as if FG somewhat locks up if the initial scenery is not loaded 
 within a certain wall clock time.
 
 Any ideas?
 
 Cheers,
 Tom
 
 - Git from 5 Sep 2011
 - Gentoo Linux
 - GeForce 7600 GS (running ancient nvidia drivers 180.29)
 
 fgfs --prop:/sim/frame-rate-throttle-hz=30 --disable-random-objects 
 --geometry=1920x1190+0+0 --atlas=socket,out,1,localhost,5500,udp 
 --fg-root=/home/tom/daten/fgfs/src/fgdata --season=summer 
 --fg-scenery=/home/tom/fgfs/home/Scenery-Manual:/home/tom/fgfs/home/Scenery-TerraSync:/home/tom/daten/fgfs/src/fgdata/Scenery:/home/tom/fgfs/home/Scenery-1.0.1
  --aircraft=c172p --airport=TNCM --log-level=alert 
 --prop:/sim/rendering/multi-sample-buffers=true 
 --prop:/sim/rendering/multi-samples=2 --prop:/sim/ai-traffic/enabled=false 
 --prop:/sim/traffic-manager/enabled=false --prop:/sim/atc/enabled=false 
 --timeofday=dawn --enable-real-weather-fetch --control=joystick 
 --disable-auto-coordination
 
 [1] http://www.mediafire.com/?n9uftx7vil98btz
 




Re: [Flightgear-devel] FG hangs on loading scenery when using many objects

2011-09-21 Thread lists
+++ Geoff McLane [21/09/11 13:38 +0200]:
If you add that png, I would give it a try with 5000, 
but the problems does seem to be in your machine at the 
moment ;=((

I've seen something similar before, it's incredibly annoying, and I suspect
you'll eventually track it down to a typo in an stg file.

What happens is that the scenery engine never finishes loading the startup
scenery, so everything hangs.

When you fly *to* the airport in question flightgear is already running in
its normal state and so doesn't have that all the scenery is loaded hurdle
to get over.

Start it up with some very verbose logging and you'll track it down.

-- 
Jon Stockill
li...@stockill.net

--
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


Re: [Flightgear-devel] FG hangs on loading scenery when using many objects

2011-09-21 Thread Thomas Albrecht
Hi Geoff,

thanks for testing! Indeed, I forgot the texture, sorry about that. It is 
included in a new package: http://www.mediafire.com/?q99zyzkyu2tw04w

For further testing, I wrote a small python script which fills a rectangular 
area at EHLE (because it's mostly flat there, so I can use hardcoded 
elevation) with an arbitraty number of objects (all copies of that coco 
palm). Could you please give it a try and see if you find any strange 
behaviour with, say, 5k, 10k, 20k objects?

Usage: 

backup Objects/e000n50/e005n52/3040154.stg first!

tar xzf Objects.tar.gz
cd Objects/e000n50/e005n52
./place_objs.py 5000
then start fgfs at EHLE

On machine (much slower than yours: Pentium 4 2.4 GHz, 1.5GB DDR), FG hangs 
when using ~2300 objects.

Thanks,
Tom


signature.asc
Description: This is a digitally signed message part.
--
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


Re: [Flightgear-devel] FG hangs on loading scenery when using many objects

2011-09-21 Thread Thomas Albrecht
Hi Jon!

 I've seen something similar before, it's incredibly annoying, and I suspect
 you'll eventually track it down to a typo in an stg file.

I've also had typos/missing objects in .stgs before, causing similiar effects. 
However, for testing, I'm creating the .stg with a very simple python script, 
placing the same object over and over at different locations. I am pretty 
sure it's not a typo or such.

Cheers,
Tom

#!/usr/bin/env python

import numpy as np
import sys

obj=Juliana-CocoPalmSeedling.ac
alt=-5
hdg=0

mid_x=5.519707
mid_y=52.456022

size_x=0.0050
size_y=0.0050
num_x=num_y=int(sys.argv[1])**0.5

X = np.linspace(-0.5*size_x, 0.5*size_x, num_x) + mid_x
Y = np.linspace(-0.5*size_y, 0.5*size_y, num_y) + mid_y

f = open(3040154.stg, w)
for y in Y:
for x in X:
f.write(OBJECT_STATIC %s %1.10g %1.10g %g %g\n % (obj, x, y, alt, 
hdg))
f.close()


signature.asc
Description: This is a digitally signed message part.
--
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


Re: [Flightgear-devel] FG hangs on loading scenery when using many objects

2011-09-21 Thread Csaba Halász
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


[Flightgear-devel] FG hangs on loading scenery when using many objects

2011-09-20 Thread Thomas Albrecht
Hey group,

I've come across a problem with FG when many (static) objects are to be loaded 
on FG startup.

Usually, on my (faily old) PC FG loads for about 20 seconds, then 
says loading scenery for about 6 seconds, and places me in the c172 ready 
for takeoff. During all this CPU load is at 100%.

Now if I start FG with scenery that contains many ( 1000) objects, I get the 
following:
- FG still loads for about 20 sec, then says loading scenery
- about 3 seconds later, CPU load drops to ~20% and stays there
- and FG never finishes startup
--log-level=debug shows the main loop is running, I can use the menu, but I 
never end up in the c172, nor see anything else but the splash screen

Starting at a nearby airport and flying into said scenery works. I can also 
teleport to this nearby airport while FG 'hangs', and then fly into said 
scenery flawlessly.

I've created a test scenery [1] which uses TNCM terrain and 5000 instances of 
one object, furthermore, a script which lets me reduce the number of objects 
in the .stg. If I use 3100 objects, everything is fine. 3200 objects, and FG 
hangs. 100% repeatable, though I did not narrow down the threshold number 
further.

However, the threshold number seems to depend on 
- the object(s) loaded
- CPU load: If I have another process running (mplayer, for example) which 
consumes some CPU, FG now also hangs for the 3100 objects case (which would 
otherwise load fine if there was no other demanding process).

It appears as if FG somewhat locks up if the initial scenery is not loaded 
within a certain wall clock time.

Any ideas?

Cheers,
Tom

- Git from 5 Sep 2011
- Gentoo Linux
- GeForce 7600 GS (running ancient nvidia drivers 180.29)

fgfs --prop:/sim/frame-rate-throttle-hz=30 --disable-random-objects 
--geometry=1920x1190+0+0 --atlas=socket,out,1,localhost,5500,udp 
--fg-root=/home/tom/daten/fgfs/src/fgdata --season=summer 
--fg-scenery=/home/tom/fgfs/home/Scenery-Manual:/home/tom/fgfs/home/Scenery-TerraSync:/home/tom/daten/fgfs/src/fgdata/Scenery:/home/tom/fgfs/home/Scenery-1.0.1
 --aircraft=c172p --airport=TNCM --log-level=alert 
--prop:/sim/rendering/multi-sample-buffers=true 
--prop:/sim/rendering/multi-samples=2 --prop:/sim/ai-traffic/enabled=false 
--prop:/sim/traffic-manager/enabled=false --prop:/sim/atc/enabled=false 
--timeofday=dawn --enable-real-weather-fetch --control=joystick 
--disable-auto-coordination

[1] http://www.mediafire.com/?n9uftx7vil98btz



signature.asc
Description: This is a digitally signed message part.
--
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