[Bf-python] Python context state bug?

Bassam Kurdali bassam at urchn.org
Thu Oct 27 19:57:14 CEST 2016


Hi folks, I've been using animation nodes addon recently - overall,
it's great, and quite ambitious, given blender's limitations, and while
it mostly works great, there are a few problems (lockups due to some
race condition I haven't figured out, occasional DAG errors, maybe more
things). I'd like to help debugging this addon since it is so darn
useful.

One message I've been seeing a lot of recently on the console:

ERROR: Python context internal state bug. this should not happen!

So this seems to be connected to a sort of counter - py_call_level,
which is a global variable in bpy_interface.c it gets incremented, or
decremented in two functions - the latter in bpy_context_clear() in the
same file. The error happens when the decrement goes less than zero.

Any idea why/how this could be happening? I've only the fuzziest idea
of what is going on, but it seems something in the addon, under some
conditions, is managing to deepen the call level without having the
counter increment?

If anyone has a clue, it would be interesting to figure this one out.
I'm a bit out of my depth currently.



More information about the Bf-python mailing list