> On Mon, Sep 13, 2010 at 5:03 PM, Torsten Dreyer <[email protected]> wrote:
> >     Hi all,
> >
> > the new METAR handler uses the following code
> >
> > static const string coverage_string[] = {
> >   SGCloudLayer::SG_CLOUD_CLEAR_STRING,
> >
> > Does anybody else see this? Is a static string array a bad idea?
> 
> Looks like initialization order problem. I guess the static strings
> themselves have not been constructed yet when the array tries to copy
> them. You could check that from a debugger. The compiler should have
> generated proper order, assuming there are no circular dependencies.
> For me, on linux, the initializers run in the expected order:
Excellent - that's it. SGCloudLayer::SG_FOO_BAR_STRING is not yet initialized.
Interestingly this is on MacOS only (gcc 4.2.1) while Linux (gcc.4.4.1) runs 
fine.
I'll think about a workaround - Many thanks for the hint, it saved me some 
hours of debugging!

Torsten

------------------------------------------------------------------------------
Start uncovering the many advantages of virtual appliances
and start using them to simplify application deployment and
accelerate your shift to cloud computing
http://p.sf.net/sfu/novell-sfdev2dev
_______________________________________________
Flightgear-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/flightgear-devel

Reply via email to