[Flightgear-devel] startup crash in SimGear (with patch?)

2011-07-31 Thread Ove Kåven
It seems there's a memory management issue in SimGear that may cause a
crash under certain conditions. (Actually I'm not totally sure why it
ever works at all, but that's another matter.)

In the routine sgLoad3DModel_internal
(scene/model/SGReaderWriterXML.cxx) there's a prop_root variable of type
SGSharedPtr. At some point, it may be passed to
Particles::appendParticles.

appendParticles (scene/model/particles.cxx) implicitly copies the value
into a newly allocated GlobalParticleCallback's field modelRoot, of type
SGPropertyNode*. So, when appendParticles return, there's a persistent
non-reference-counted pointer to this structure.

If there are no other references, the prop_root is automatically
destroyed when sgLoad3DModel_internal returns, causing the memory to be
freed. So, later on, when OSG wants to do something with these
particles, the freed memory is referenced and causes a crash.

I didn't see a fix for this in your git, so I've attached a quickfix,
but perhaps you prefer other solutions. And perhaps it's not the only
issue of this kind (especially since I see fgfs still crashes at exit),
but this is all I have time for right now.

Ove
Index: simgear/scene/model/particles.hxx
===
--- simgear/scene/model/particles.hxx	(revisjon 138)
+++ simgear/scene/model/particles.hxx	(revisjon 148)
@@ -99,7 +99,7 @@
 private:
 static osg::Vec3 gravity;
 static osg::Vec3 wind;
-const SGPropertyNode* modelRoot;
+SGSharedPtr modelRoot;
 static SGConstPropertyNode_ptr enabledNode;
 static bool enabled;
 };
--
Got Input?   Slashdot Needs You.
Take our quick survey online.  Come on, we don't ask for help often.
Plus, you'll get a chance to win $100 to spend on ThinkGeek.
http://p.sf.net/sfu/slashdot-survey
___
Flightgear-devel mailing list
Flightgear-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/flightgear-devel


[Flightgear-devel] A few more screenshots from today's AI/ATC work

2011-07-31 Thread Durk Talsma
hi all,

Today, I started working on a fairly major overhaul of the inner structure of 
the "intelligent" side of the AI system. although phase one of this operation 
is nearly complete, I did end today's coding session with a segmentation fault, 
so obviously it still needs more work. :-(
My main goal is to simplify the interaction between the AIModels and the ATC 
part. In doing so, I already managed to bring more stability to the way the AI 
system responds to user input, and I'm close to being able to implement the 
handoff between the ground and tower controllers (the underlying infrastructure 
more or less works, it still needs to be animated, and translated into 
appropriate phraseology. 

Since the code itself isn't ready to be committed yet, I thought I'd update my 
set of screenshots. I particular, the last two screenies are interesting (on 
page 2):  

http://www.dropbox.com/gallery/7455889/1/GroundNetVisualizations?h=1f4147

While taxiing onto the runway, other traffic waits; and while taking-off, the 
next #1 for the runway is about to line up and wait. Unfortunately, the last 
image was the one that I took immediately before getting the segmentation fault.

Cheers,
Durk
--
Got Input?   Slashdot Needs You.
Take our quick survey online.  Come on, we don't ask for help often.
Plus, you'll get a chance to win $100 to spend on ThinkGeek.
http://p.sf.net/sfu/slashdot-survey
___
Flightgear-devel mailing list
Flightgear-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/flightgear-devel


Re: [Flightgear-devel] [patch] Improved forests

2011-07-31 Thread ThorstenB
On 28.07.2011 00:30, Stuart Buchanan wrote:
> The patch does the following:
> 1) Fixes the longstanding bug where the first set of tree definitions
> in a tile were used for all forests within that tile.
> 2) Re-introduce a feature to fade in trees by distance

And, after doing a few circles at LOWI, the new forests really prove to 
be a very nice improvement!

cheers,
Thorsten

--
Got Input?   Slashdot Needs You.
Take our quick survey online.  Come on, we don't ask for help often.
Plus, you'll get a chance to win $100 to spend on ThinkGeek.
http://p.sf.net/sfu/slashdot-survey
___
Flightgear-devel mailing list
Flightgear-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/flightgear-devel


Re: [Flightgear-devel] OpenSceneGraph-3.0.1 released!

2011-07-31 Thread James Turner

On 31 Jul 2011, at 09:59, ThorstenB wrote:

> a new OSG stable release is available. Changes only involves a list of 
> fixes since OSG 3.0.0. Do we have a chance to update jenkins to use OSG 
> 3.0.1 for the windows installers (already using 3.0.0 right now)? Seems 
> a good idea to include those OSG patches in our release(-candidates).

For Linux and Mac it's trivial - since Jenkins build those, anyone with Jenkins 
access can adjust the SVN tag we pull for OSG. For Windows, it depends on Fred 
updating the 'third party packages' zips he produces.

James


--
Got Input?   Slashdot Needs You.
Take our quick survey online.  Come on, we don't ask for help often.
Plus, you'll get a chance to win $100 to spend on ThinkGeek.
http://p.sf.net/sfu/slashdot-survey
___
Flightgear-devel mailing list
Flightgear-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/flightgear-devel


[Flightgear-devel] OpenSceneGraph-3.0.1 released!

2011-07-31 Thread ThorstenB
Hi,

a new OSG stable release is available. Changes only involves a list of 
fixes since OSG 3.0.0. Do we have a chance to update jenkins to use OSG 
3.0.1 for the windows installers (already using 3.0.0 right now)? Seems 
a good idea to include those OSG patches in our release(-candidates).

cheers,
Thorsten

On 31.07.2011 10:45, Robert Osfield wrote:
> Hi All,
>
> Just one month after OpenSceneGraph-3.0.0 I'm a little amazed to
> announce the release of 3.0.1 - a binary compatible maintenance
> release, I believe this might well be a record for most speedy turned
> around of stable release ;-)
>
> The main changes are :
>
> Bug fixes to the new serializers and associated .osgb, .osgt and
> .osgx formats.
> Improvements to the DCMTK based dicom plugin that vastly improves
> the handling of scaling in dicom files so that a wider range of dicom
> files are handled well.
> Shader tweak to osgShadow's handling of spot lights when doing view
> dependent shadow map algorithms.
> Improved handling of initial bounding volume computation for view
> dependent text scaling/orientation.
> Improvements in handling of different GLES builds
>
>
> Thanks to all that have tested and provided fixes for this release,
>
> Cheers,
> Robert.
>
>
> Full ChangeLog since 3.0.0 :
>
> 2011-07-31 07:50  robert
>
>   * CMakeLists.txt: Changed release candidate numbe for 3.0.1
> release.
>
> 2011-07-31 07:48  robert
>
>   * src/osgShadow/StandardShadowMap.cpp: Changed the handling of the
> ambient contribution of light to avoid lighting errors in the
> shadowed region outside a spointlight.
>
> 2011-07-29 07:44  robert
>
>   * src/osgViewer/ViewerEventHandlers.cpp: Merged from svn/trunk
> revision 12735, fixed console output of end of frame barrier
> position.
>
> 2011-07-28 16:59  robert
>
>   * AUTHORS.txt, CMakeLists.txt, ChangeLog: Updated ChangeLog and
> release candidate number for 3.0.1-rc3
>
> 2011-07-28 16:41  robert
>
>   * src/osgPlugins/dicom/ReaderWriterDICOM.cpp: Improved the handling
> of scaling of dicom imagery.
>
> 2011-07-28 12:08  robert
>
>   * src/osgViewer/GraphicsWindowX11.cpp: Merged from svn/trunk
> revision 12722. Refectored the EGL setup so that it's honours the
> Traits values.
>
> 2011-07-28 11:05  robert
>
>   * src/osg/Texture.cpp, src/osgWrappers/serializers/osg/Texture.cpp:
> Merged from svn/trunk, revision 12727, Reverted the change to the
> default setting of _resizeNonPowerOfTwoHint back to true for all
> platforms to ensure the
> same behaivour across platforms, something that can be achieved
> now thanks to the integrated GLU library.
>   
> Corrected the default of the ResizeNonPowerOfTwoHint to true to
> reflect the actual default setting set by the
> Texture default constructor.
>
> 2011-07-28 08:19  robert
>
>   * src/osgDB/ObjectWrapper.cpp: From Johannes Baeuerle, merged from
> svn/trunk revision 12725, "in the file
> src/osgDB/ObjectWrapper.cpp, where the GlobalLookupTable for gl
> enums for serialization purposes is defined, some of the
> compressed texture formats are missing. I added enums for the pvr
> and etc formats."
>
> 2011-07-28 07:47  robert
>
>   * src/osgViewer/View.cpp: From Jason Beverage, merged from
> svn/trunk revision 12723, "Here is a small fix for
> getCameraContainingPosition. getXMin was
> being used in a case where getYMin should be used instead."
>
> 2011-07-25 19:28  robert
>
>   * AUTHORS.txt, ChangeLog: Updated ChangeLog and AUTHORS file for
> 3.0.1-rc2
>
> 2011-07-25 18:39  robert
>
>   * CMakeLists.txt: Updated release candidate number
>
> 2011-07-25 17:08  robert
>
>   * src/osgViewer/Renderer.cpp: Merged from svn/trunk revision 12818,
> "Fixed stats bug where not all stats fields were being collected
> by the cull_draw() method used in the SingleThreaded and
> CullDrawThreadPerContext threading models."
>
> 2011-07-22 09:28  robert
>
>   * src/osg/Texture.cpp: From Alexander Irion, merged from svn/trunk
> revision 12716, "Texture borders are not supported in ES.
>   
> _isTextureBorderClampSupported is set to "TRUE" in Texture.cpp,
> because of the version number check (GL VERSION>= 1.3).
>   
> This leads to an invalid enum error, when GL_TEXTURE_BORDER_COLOR
> is tried to set."
>
> 2011-07-22 08:26  robert
>
>   * src/osgViewer/ViewerEventHandlers.cpp: Merged from svn/trunk
> revision 12714, "In the RecordCameraPathhandler fixed the
> handling of pressing 'Z' before 'z' which was causing the view
> to be reset to 0,0,0 by AnimationPathManipualtor with an empty
> AnimationPath."
>
> 2011-07-21 09:54  robert
>
>   * AUTHORS.txt, CMakeLists.txt, ChangeLog,
> appl