-------- Forwarded Message --------
> From: Robert Fu <[EMAIL PROTECTED]>
> Reply-To: FlightGear user discussions
> <[EMAIL PROTECTED]>
> To: FlightGear user discussions
> <[EMAIL PROTECTED]>
> Subject: Re: [Flightgear-users] Nasal runtime error: non-scalar in
> string context
> Date: Sat, 22 Sep 2007 21:38:05 -0700
> 
> Hi Ron,
>  
> Thanks a lot for your help. After spending a lot of hours, I think
> that the following factors seems contributed to the crash:
>  
> 1. OpenSceneGraph uses STL a lot, and some STL classes manage their
> own memory.
> 2. I verified on Linux, similar setup worked. Thus the Flightgear and
> OpenSceneGraph code seems fine. 
> 3. In my previous MinGW, libstdc++ is a statically linked, and it's
> based on static version of  system C library MSVCRT. For .EXE or .DLL
> modules which are statically-linked C Run-time library, problem can
> occur in some situations, such as  allocating memory with a C Run-time
> call in the .EXE/DLL and reallocating or freeing it in the other
> module. Each of these .EXE or .DLL has its own heap space. I think in
> my case, allocating memory in one heap space, and freeing it in
> another heap space eventually crashed the system. When tracing the
> execution in Eclipse, I noticed that  in some situations, after
> exiting a function, it came back to execute the last few lines of the
> same function again. The following are some links for someone
> interested in details of this cross DLL/EXE issue:
>  
> http://www.nabble.com/C
> ++-STL,-DLLs-and-our-friend-RtlFreeHeap-t1847074.html
>  
> http://mail-archives.apache.org/mod_mbox/xerces-c-dev/200004.mbox/%
> [EMAIL PROTECTED]
>  
> http://lists.trolltech.com/qt-interest/2004-12/thread00928-0.html
> http://lists.trolltech.com/qt-interest/2001-10/thread00530-0.html
>  
> http://support.microsoft.com/kb/140584
> http://support.microsoft.com/kb/94248
>  
> As suggested in the the above links, we need a DLL version of libstdc
> ++ in MinGW. Fortunately in the latest preview version of gcc 4.2.1,
> there is such a libstdc++. With some further steps like creating the
> missing libgcc_s.a, etc, I finally made CVS version of Flightgear with
> OpenSceneGraph worked with MinGW/MSYS on both Windows XP and Vista.
> FGRun also worked with MinGW/MSYS. If anyone is interested in details,
> please let me know.
>  
> Thanks,
> Robert Fu
>  
>  
> On 9/11/07, Ron Jensen <[EMAIL PROTECTED]> wrote: 
>         On Tue, 2007-09-11 at 09:37 -0700, Robert Fu wrote:
>         > Hi Ron,
>         >
>         
>         > 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.
>         
>         Cool :)
>         
>         > 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
>         
>         The above lines shouldn't be a problem as
>         ~/.fgfs/aircraft-data/c172p.xml doesn't exist here, either...
>         
>         > 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.
>         
>         
>         Perhaps its not liking the aircraft demo?  Try turning off
>         ai-models and
>         the traffic manager with this command line:
>         
>         fgfs --disable-ai-models --prop:/sim/traffic-manager/enabled=0
>         
>         Or go into $FGROOT/preferences.xml and comment out the
>         aircraft-demo, it 
>         should be around line 459.
>         
>         
>         >  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. 
>         
>         I have no idea, I'm not on windows.  I believe I'm just using
>         the
>         pthreads built into libc6.
>         
>         You could try asking on IRC as well...
>         
>         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-devel mailing list
Flightgear-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/flightgear-devel

Reply via email to