--------------------------------------------------
From: "James Turner" <zakal...@mac.com>
Sent: Wednesday, July 21, 2010 9:51 AM
To: "FlightGear developers discussions" 
<flightgear-devel@lists.sourceforge.net>
Subject: Re: [Flightgear-devel] aircraft search

>
> On 21 Jul 2010, at 09:24, Alan Teeder wrote:
>
>> Debugging on my windows boxes fg_init.cxx line 21 is reached.
>>
>>    if (_foundPath.str().empty()) {
>>      SG_LOG(SG_GENERAL, SG_ALERT, "Cannot find specified aircraft: " <<
>> aircraft );
>>      return false;
>>
>> aircaftDir is                   {path="C:/Flightgear/fgdata/Aircraft"}
>> aircraft is                        "c172p"
>>
>> Directory C:\FlightGear\fgdata\Aircraft\c172p exists on my system.
>
> Can you add some logging in the search functions, to see which directories 
> it is / isn't walking into? I tested on my MSVC box and it all seemed to 
> work as expected, but I will test again this evening.
>
> Note at this point in the startup, SG_LOG has not yet processed 
> the --log-level argument, so using std::cout to debug may be easier - this 
> confused me before I understood the order thing are happening in, here.
>

James

I edited line 507 of fg_init.cxx as log level ALERT works at this point
void fgFindAircraftInDir(const SGPath& dirPath, T* obj, bool 
(T::*pred)(const SGPath& p))
{
  if (!dirPath.exists()) {
    SG_LOG(SG_GENERAL, SG_ALERT, "fgFindAircraftInDir: no such path:" << 
dirPath.str());
    return;
  }

and the result was:

fgFindAircraftInDir: no such path:C:/Flightgear/fgdata/Aircraft

Single stepping the debugger showed that fopen in simgear SGPath::exists() 
failed.

Alan


 


------------------------------------------------------------------------------
This SF.net email is sponsored by Sprint
What will you do first with EVO, the first 4G phone?
Visit sprint.com/first -- http://p.sf.net/sfu/sprint-com-first
_______________________________________________
Flightgear-devel mailing list
Flightgear-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/flightgear-devel

Reply via email to