[Bf-python] Blender, Python, and Irix
Willian Padovani Germano
wgermano at ig.com.br
Thu Nov 11 14:13:08 CET 2004
Hi Chris,
Chris Want wrote:
> A bit of hacking my python lib and using some printf's
> shows that there are probs during clean up when python
> is processing NMFaceType and SceneType (maybe stuff is
> getting free'd twice?). It looks like it finally croaks
> when it tries to clean up NMeshType.
>
> I don't know how to solve these problems.
Python can be compiled in debug mode and print ref counts all the time,
but that isn't all that useful from what I remember.
There are some simple things we can test:
Does that crash on leaving Blender happens even if you don't use Python:
no scriptlinks used in the loaded .blend file, no scripts executed at
all? Like using a "stock" .B.blend and just starting and quitting Blender?
If so, a possible test is commenting out / removing line 524
(registration of Types module) in source/blender/python/api2_2x/Blender.c
And seeing if that makes any difference.
One thing I've seen causing crashes when leaving Blender (when switching
from Py 2.2 to 2.3) was Python itself, seemingly, having trouble with
garbage collecting an error obj (lines 398 and 399 in
source/blender/python/BPY_interface.c). Adding a call to PyErr_Clear()
there made things work fine, then. You could try adding such a call
before Py_Finalize(), for example in line 169 in this same file.
Another issue might be initialization of the types, we've had crashes in
Mandrake related to that (and module types probably needs some updates
to support newer objects). Those crashes were caused on startup and the
trouble seemed to be with this or that particular module, but it was not.
A problem with ref counting in NMesh or Scene themselves would probably
cause crashes right after running scripts that used those modules, when
their global dictionaries got freed.
It would be important to have a better idea about when these crashes
started. Would you say that they are not as old as the current bpython
itself (Blender 2.28)?
--
Willian
More information about the Bf-python
mailing list