[Gtkradiant] aabb.h model.h and OSX

Vincent Morénas vmorenas at free.fr
Tue May 8 07:08:09 CDT 2007

Hi everyone,

I am trying to make GtkRadiant1.5 (latest svn) succeeds in loading  
md3 models without crashing at runtime and here is the situation I  
found (the crash happens on both architectures ppc and intel).
I am using the Quake3 "museum.map" file to trigger the crash.
Using gdb/ddd, I noticed this : when Gtkradiant loads femhead.md3  
(the first model used by the map), there is a call to   
model.updateAABB() in md3.cpp.
In the updateAABB() procedure of the Model class in model.h, there is  
a loop and the problem comes from that loop.
At the beginnig, the loop variable i is correctly defined and the  
first iteration runs ok. But things change for the second : here are  
typical values I got :
	first iteration :    	i:  _M_current = 0x73da700	*i:   (Surface *&)  
@0x73da700: 0x357b
	second iteration: 	i:  _M_current = 0x73da704	*i:   (Surface *&)  
@0x73da704: 0x0  <--------  NULL pointer !!!
and the program crashes at the call (*i)->localAABB()

I also noticed something which looks  wrong  to me, related to the  
m_surfaces variables at this same point ;  here are some of the  
values I got from gdb :
this->m_surfaces :	_M_start		0x73da700
					_M_finish	0x73da718
					_M_end_of_storage		0x0    <-----  NULL again !!

Any ideas or suggestions ?


More information about the Gtkradiant mailing list