[Bf-python] Python context state bug?

Bassam Kurdali bassam at urchn.org
Mon Oct 31 19:17:35 CET 2016


can this happen from having multiple update handlers/ property updaters
etc. in your scene? or is that guaranteed to execute in a sane way?
If the former I can expect to see these errors just from installing
multiple addons, rather than a bug in a single addon, which feels
wrong.

On Mon, 2016-10-31 at 17:10 +0100, Sergey Sharybin wrote:
> Hi,
> AFAIR, such issues are usually happening when context is used from multiple threads. This is something you are not supposed to do actually, at least without knowing exactly what you're doing (such access is required for render engines to work but there we have special code which guarantees stability in the python bindings).
> 
> 
> > On Thu, Oct 27, 2016 at 7:57 PM, Bassam Kurdali <bassam at urchn.org> wrote:
> > 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.
> > 
> > _______________________________________________
> > 
> > Bf-python mailing list
> > 
> > Bf-python at blender.org
> > 
> > https://lists.blender.org/mailman/listinfo/bf-python
> > 
> > 
> 
> 
> 
> -- 
> With best regards, Sergey Sharybin
> 
> 
> 
> 
> _______________________________________________
> Bf-python mailing list
> Bf-python at blender.org
> https://lists.blender.org/mailman/listinfo/bf-python
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.blender.org/pipermail/bf-python/attachments/20161031/4e586c10/attachment.html>


More information about the Bf-python mailing list