[Bf-python] Blender, Python, and Irix

Chris Want cwant at ualberta.ca
Thu Nov 11 15:27:13 CET 2004


Willian Padovani Germano wrote:
> 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?

No, if there is no scriptlink, blender starts fine.
Ton had me do an interesting test where I started blender
fresh and I pressed 'New' in the scriptlink window.
When I pressed the up arrow key blender crashed.
Many blends crash on load, such as camera.blend
and lostride.blend.


> 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.

I'll try testing a few things on my work machine (I have a long
weekend here so I can do much testing except for batch mode until
Monday).

> 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)?

The turning point seems to be the switch to python 2.3, i.e.,
blender 2.33 and blender 2.34 have been mostly unusable.
Unfortunately the feedback from the irix user base has been
underwhelming, so it is difficult to pin this down further.

Chris



More information about the Bf-python mailing list