When I rebuilt the MacOS X version of FlightGear, after the 3D cloud 
code was added, I started getting an EXC_BAD_ACCESS runtime error.  I 
did some looking around with gdb and found out that the error was 
happening BEFORE the main was being called.

Program received signal EXC_BAD_ACCESS, Could not access memory.
0x90989544 in glGetIntegerv ()
(gdb) backtrace
#0  0x90989544 in glGetIntegerv ()
#1  0x002130b8 in SkyTextureState::SkyTextureState() (this=0x41e0478) 
at SkyTextureState.cpp:47
#2  0x00212814 in SkyMaterial::SkyMaterial() (this=0x41e03d0) at 
SkyMaterial.cpp:60
#3  0x0016df60 in SkyLight::SkyLight(SkyLight::SkyLightType) (this=0x0, 
eType=3221223248) at SkyLight.cpp:67
#4  0x003167c4 in __static_initialization_and_destruction_0(int, int) ()
#5  0x8fe16594 in __dyld_call_module_initializers_for_objects ()
#6  0x8fe160a0 in __dyld_call_module_initializers ()
#7  0x8fe133ac in __dyld__dyld_make_delayed_module_initializer_calls ()
#8  0x00002c04 in _call_mod_init_funcs () at 
/SourceCache/Csu/Csu-45/crt.c:299
#9  0x00002aec in _start (argc=1, argv=0xbffffc54, envp=0xbffffc5c) at 
/SourceCache/Csu/Csu-45/crt.c:217
#10 0x00002a4c in start ()

How is this possible?  If this were Ada, I would say that it is 
happening during Elaboration, but I'm not sure if C++ has something 
similar.  SkyLight::SkyLight is creating a new instance of SkyMaterial, 
and my bet is that glGetIntegerv is having the problem because OpenGL 
hasn't been initialized yet.

Does anyone have any ideas as to what is going wrong and why?

Thanks,

Jonathan Polley


_______________________________________________
Flightgear-devel mailing list
[EMAIL PROTECTED]
http://mail.flightgear.org/mailman/listinfo/flightgear-devel

Reply via email to