[Bf-committers] [Bug 17457] Corrupted input file?

Jingyuan Huang jingyuan.huang at gmail.com
Fri Oct 3 08:52:57 CEST 2008


Hi everyone,
I'm new to development for Blender. I looked at the bug tracker and
would like to start with some bug fixings. I'm looking at bug #17457
and found that after the input file is loaded, a mesh object would
have multires info, but no vertices. Adding additional output to
link_global in source/blender/blenloader/intern/readfile.c gives me
the following output, where FORMAT is FileGlobal->subvstr (I don't
know what it represents), multires is m->mr, and verts is m->mr->verts
if m->mr is not NULL.

jing at Himura:~/repository/bf-blender/blender$ ./blender ../demo7.blend
Compiled with Python version 2.5.2.
Checking for installed Python... got it!
FORMAT:    5, minversion: 245
multires: 0
multires: 0
multires: 0
multires: 0
multires: 0
multires: 0
multires: 0
multires: 0
multires: 0
multires: 0
multires: 0
multires: 0
FORMAT:   16, minversion: 240
multires: 0
FORMAT:    0, minversion: 245
multires: 9a92ad8
verts: 0 // <-- this causes the crash

A simple workaround fix would be the following, though I'm really not
satisfied with this kind of fixing. What could be the possible causes
for multires having no verts? I'd like to get a couple of pointers
before I poke the code a bit more. Thanks a lot.

Index: source/blender/render/intern/source/convertblender.c
===================================================================
--- source/blender/render/intern/source/convertblender.c	(revision 16876)
+++ source/blender/render/intern/source/convertblender.c	(working copy)
@@ -3075,7 +3075,7 @@
 		if(need_orco)
 			mask |= CD_MASK_ORCO;

-	if(me->mr) {
+	if(me->mr && me->mr->verts) {
 		if(re->flag & R_SKIP_MULTIRES)
 			me->mr->flag |= MULTIRES_NO_RENDER;
 		else

-- 
Best Wishes
Jingyuan Huang
------------------------------------
Software Engineering
University of Waterloo


More information about the Bf-committers mailing list