Hi all,

I've found a bug in the new integrated fgcom, which would cause a crash in
the following case:
1) start flightgear without fgcom activated (just the default cessna, at
KSFO)
2) Start the tutorial "Straight in landing"
3) Crash

I suspect it would crash on reset as well, but I haven't tested that

This small patch fixes it for me:
diff --git a/src/Network/fgcom.cxx b/src/Network/fgcom.cxx
index f57b75c..874d026 100644
--- a/src/Network/fgcom.cxx
+++ b/src/Network/fgcom.cxx
@@ -483,10 +483,12 @@ void FGCom::testMode(bool testMode)
     if( _callComm0 == -1 )
       SG_LOG( SG_IO, SG_ALERT, "FGCom cannot call selected freq (test
mode)" );
   } else {
-    iaxc_dump_call_number(_callComm0);
+/*
+       iaxc_dump_call_number(_callComm0);
     iaxc_millisleep(IAX_DELAY);
     _callComm0 = -1;
     _enabled = true;
+*/
   }
 }

I'm not quite sure what the commented out code is supposed to do, but it
seems pretty harmless to comment it out. The crucial line is: _enabled =
true; This makes other code assume that IAXClient has been properly
initialised, which it hasn't, causing a null pointer deref inside IAXClient
later on.

Stefan
------------------------------------------------------------------------------
Introducing Performance Central, a new site from SourceForge and 
AppDynamics. Performance Central is your source for news, insights, 
analysis and resources for efficient Application Performance Management. 
Visit us today!
http://pubads.g.doubleclick.net/gampad/clk?id=48897511&iu=/4140/ostg.clktrk
_______________________________________________
Flightgear-devel mailing list
Flightgear-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/flightgear-devel

Reply via email to