[Bf-committers] request for win32 debugger

Stealth Apprentice stealthapprentice at yahoo.com
Sat Jan 7 08:52:25 CET 2006

outliner.c, line 443 see below.

str is uninitialized memory because when outliner
calls get_constraint_target, con is type 0, flag is
17, and name is "Const". get_constraint_target does
not recognize type 0, and so str never gets
initialized. Therefore the code crashes.
The routine get_constraint_target does not have a
default: case to set the str pointer to 0.

This does not fail on Linux because the behavior of
malloc is different. WHen a linux app starts, the
memory is cleared to zero. On Windows this does not

You must insert

*subtarget= NULL;

just before get_constraint_target's return NULL
statement at the end of the function at line 386 of

I hope someone can patch this fix into CVS,


					if(ob!=G.obedit) {	// channels undefined in
editmode, but we want the 'tenla' pose icon itself
						int a= 0;
						for(pchan= ob->pose->chanbase.first; pchan;
pchan= pchan->next, a++) {
							ten= outliner_add_element(soops,
&tenla->subtree, ob, tenla, TSE_POSE_CHANNEL, a);
							ten->name= pchan->name;
							ten->directdata= pchan;
							pchan->prev= (bPoseChannel *)ten;
							if(pchan->constraints.first) {
								Object *target;
								bConstraint *con;
								TreeElement *ten1;
								TreeElement *tenla1=
outliner_add_element(soops, &ten->subtree, ob, ten,
								int a= 0;
								char *str;
								tenla1->name= "Constraints";
								for(con= pchan->constraints.first; con; con=
con->next, a++) {
									ten1= outliner_add_element(soops,
&tenla1->subtree, ob, tenla1, TSE_CONSTRAINT, a);
									target= get_constraint_target(con, &str);
									if(str && str[0]) ten1->name= str;

--- Ed Halley <ed at halley.cc> wrote:

> Could someone with a Win32 2.40 build, who can use a
> debugger, please 
> check what might be causing a .blend to crash on
> load?
>   http://halley.cc/blender/joan2.blend - linux ok -
> windows ok
>   http://halley.cc/blender/joan3.blend - linux ok -
> windows crash
> If this info doesn't square with your experiences,
> let me know also. 
> Most of the differences in the two versions are
> related to armatures.
> -- 
> [ e d @ h a l l e y . c c ]
> _______________________________________________
> Bf-committers mailing list
> Bf-committers at projects.blender.org

Yahoo! DSL – Something to write home about. 
Just $16.99/mo. or less. 

More information about the Bf-committers mailing list