[Bf-python] Strange crash

Michel Selten michel.s at home.nl
Wed Jun 4 22:46:43 CEST 2003


On Tue, 2003-06-03 at 17:28, Jordi Rovira i Bonet wrote:
> In short:
> 
> 0x082d222d in visit_decref (op=0x83786c0, data=0x0) at 
> Modules/gcmodule.c:185
> 185     Modules/gcmodule.c: No such file or directory.
>         in Modules/gcmodule.c
> (gdb) backtrace 10
> #0  0x082d222d in visit_decref (op=0x83786c0, data=0x0) at 
> Modules/gcmodule.c:185
> #1  0x0828a846 in dict_traverse (op=0x8402b7c, visit=0x82d221c 
> <visit_decref>, arg=0x0) at Objects/dictobject.c:1589
> #2  0x082d1618 in collect (young=0x8393300, old=0x839330c) at 
> Modules/gcmodule.c:201
> #3  0x082d1bc4 in collect_generations () at Modules/gcmodule.c:518
> #4  0x082d208e in _PyObject_GC_New (tp=0x8386fc0) at Modules/gcmodule.c:879
> #5  0x08281ecd in PyList_New (size=0) at Objects/listobject.c:71
> #6  0x0822268a in nmface_from_data (mesh=0x8550ba8, vidxs=0xbfffe678, 
> mat_nr=0 '\000', flag=0 '\000', tface=0x0, col=0x0)
>     at ../../../../../source/blender/python/api2_2x/NMesh.c:914
^^^^
This one makes me think you're trying something with the NMesh module. I
did update all modules with the PyType_Type thing. However, NMesh is one
of the modules that doesn't have a M_xxx_Init function. So I had to
initialise the ob_type variable at some other point. This could be
wrong. I don't know.

> #7  0x082226ff in nmface_from_shortdata (mesh=0x8550ba8, face=0x8593d08, 
> tface=0x0, col=0x0) at 
> ../../../../../source/blender/python/api2_2x/NMesh.c:928
> #8  0x08222af4 in new_NMesh_internal (oldmesh=0x858c324, dlm=0x0, 
> extverts=0x0) at ../../../../../source/blender/python/api2_2x/NMesh.c:1062
> #9  0x08222b73 in new_NMesh (oldmesh=0x858c324) at 
> ../../../../../source/blender/python/api2_2x/NMesh.c:1074
> (More stack frames follow...)
> (gdb) print *op
> $1 = {ob_refcnt = 2, ob_type = 0x0}

Could you try another module? For example test the Lamp module.
Put a lamp somewhere in the default scene.
Create a script:

import Blender

bl = Blender.Lamp.Get("Lamp")
print bl.getType()

If this return a 0 on the console, then it probably works :) Also, then
the PyType_Type thing is working, but something needs to be fixed in the
NMesh.

With regards,
	Michel





More information about the Bf-python mailing list