Hi Ron,

Thanks a lot for the quick response. Although I was not able to connect to
the httpd property server ( it might not be up yet), I found the following
code that sets /sim/fg-home in fg_init.cxx:

#ifdef _MSC_VER
    char *envp = ::getenv( "APPDATA" );
    if (envp != NULL ) {
        SGPath config( envp );
        config.append( "flightgear.org" );
#else
    if ( homedir != NULL ) {
        SGPath config( homedir );
        config.append( ".fgfs" );
#endif
        fgSetString("/sim/fg-home", config.c_str());

So I set HOME environment variable, and the Nasal error disappeared when
running in DOS-Prompt. I noticed before that when running in MSYS, I got
different console output, and I realize now that in MSYS, there is HOME
environment variable.

However, I got a different problem, and this time, there is no error in
console output. A Windows "Send Error Report" dialog came up, after clicking
on Don't Send button, fgfs application exited. When I turned on log-level as
the following

fgfs --httpd=5500 --log-level=info

There are a lot message output in console, and the last few lines are:

Adding subsystem nasal
trying to load aircraft data from
c:/gnu/depot/home/rfu/.fgfs/aircraft-data/c172p.xml (OK if not found)
Cannot load flight from c:/gnu/depot/home/rfu/.fgfs/aircraft-data/c172p.xml

loading scenario 'aircraft_demo'
Reading image "C:\gnu\msys\1.0.11\local\src\FlightGear-
0.9\data\Aircraft\737-300\Models\733UAii.rgb"
Reading model "C:/gnu/msys/1.0.11/local/src/FlightGear-0.9
/data/Aircraft/737-300/Models/737-300.ac"


Splash screen progress setting up time & renderer
If I click on Debug button on the Send Error Report dialog, I got:

        unhandled exception in fgfs.exe:0xC0000005: Access Violation.

I guess something might not be loaded correctly, and I'll do more tracing,
and any advice is welcome. I have one question though: which version of
pthread should be used with the latest FlightGear? I used pthreads-w32 2.8.0,
and I'm not sure if it'll cause any problem. BTW, here is SimGear
configuration summary which shows that pthread lib was found:

Configure Summary
=================
Prefix: /usr/local
Debug messages: yes
Automake version: automake (GNU automake) 1.7.1
Without JPEG Factory support
Threads: pthread lib found.


Thanks a lot for your help!
Robert Fu


On 9/10/07, Ron Jensen <[EMAIL PROTECTED]> wrote:
>
> On Mon, 2007-09-10 at 16:58 -0700, Robert Fu wrote:
> > Hi,
> >
> > I'm new to FlightGrear and this mail list. The pre-built and
> > self-built FlightGear-0.9.11-pre1 worked in my environment: MinGW/MSYS
> > on Windows XP. But for build of the lastest CVS code of FlightGear and
> > SimGear, I got the following error:
> >
> > C:\>fgfs --aircraft=f16 --airport-id=KJFK
> >   Model Author:  Erik Hofman
> >   Creation Date: 2001-01-01
> >   Version:       $Revision: 1.44 $
> >   Description:   Models an F-16A Block-32 (Basic US configuration)
> > Nasal runtime error: non-scalar in string context
> >   at
> > C:/gnu/msys/1.0.11/local/src/FlightGear-0.9/data/Nasal/aircraft.nas,
> > line 395
> >   called from:
> > C:/gnu/msys/1.0.11/local/src/FlightGear-0.9/data/Nasal/aircraft.nas,
> > line 818
> > Nasal runtime error: non-scalar in string context
> >   at
> > C:/gnu/msys/1.0.11/local/src/FlightGear-0.9/data/Nasal/globals.nas,
> > line 118
> >
> > The splash screen showed:
> >       reading airport & navaigation data
> >       ......
> >       loading aircraft
> >       initializing subsystems
> >
> > then a Windows error dialog appeared and the fgfs application was
> > closed.
> >
> > Line 395 and 818 of aircraft.nas are:
> >
> >   me.path = getprop("/sim/fg-home") ~ "/aircraft-data/" ~
> > getprop("/sim/aircraft") ~ ".xml";
> >
> >   data.init();
> >
> > Line 118 of globals.nas is:
> >
> >     var path = getprop("/sim/fg-home") ~ "/Nasal";
> >
> > It seems that the problem is in the function getprop. I guess getprop
> > is a core API, so something may be fundamentally wrong in my setup.
> > I'll list some details at the end of this email. BTW, I got the same
> > error in Windows Vista.
> >
> > Did anyone encountered similar error before? May someone please advice
> > on how to locate the problem area and resolve this issue?
> >
> > Thanks a lot,
> > Robert Fu
> >
>
>
> Robert,
>
> The common thread I am seeing is the prop /sim/fg-home.  This is
> supposed to point to a user place to store persistant data.  Under linux
> its /home/(user)/.fgfs.  Under windows it should be something like the
> path to "My Documents".
>
> Assuming you can fire up fgfs without choosing an aircraft, look in the
> property browser and see if /sim/fg-home is set, and set to something
> sensible, (that is to say a writable directory).
>
> Good luck,
>
> Ron
>
>
>
>
>
>
>
> -------------------------------------------------------------------------
> This SF.net email is sponsored by: Microsoft
> Defy all challenges. Microsoft(R) Visual Studio 2005.
> http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
> _______________________________________________
> Flightgear-users mailing list
> Flightgear-users@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/flightgear-users
>
-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2005.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
_______________________________________________
Flightgear-users mailing list
Flightgear-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/flightgear-users

Reply via email to