[Bf-blender-cvs] [8ba1c3072ca] master: API Doc: Gotcha: add section about 'exceptions to the rules' known crashing cases.

Bastien Montagne noreply at git.blender.org
Tue Mar 12 14:12:56 CET 2019


Commit: 8ba1c3072ca9fd3b2ab3be3bffa617c2a5cf0b7b
Author: Bastien Montagne
Date:   Tue Mar 12 14:09:41 2019 +0100
Branches: master
https://developer.blender.org/rB8ba1c3072ca9fd3b2ab3be3bffa617c2a5cf0b7b

API Doc: Gotcha: add section about 'exceptions to the rules' known crashing cases.

As exposed in T62406, we can have some rare cases of crashes due to
memory re-allocation happening outside of expected scenarii.

Ideally this should be re-designed, but at least keep track of those
known exceptions to general rules...

===================================================================

M	doc/python_api/rst/info_gotcha.rst

===================================================================

diff --git a/doc/python_api/rst/info_gotcha.rst b/doc/python_api/rst/info_gotcha.rst
index d9238e0cb79..fd978e235c1 100644
--- a/doc/python_api/rst/info_gotcha.rst
+++ b/doc/python_api/rst/info_gotcha.rst
@@ -633,6 +633,7 @@ Here are some general hints to avoid running into these problems.
   fetch data from the context each time the script is activated.
 - Crashes may not happen every time, they may happen more on some configurations/operating-systems.
 - Be wary of recursive patterns, those are very efficient at hiding the issues described here.
+- See last sub-section about `Unfortunate Corner Cases`_ for some known breaking exceptions.
 
 .. note::
 
@@ -827,6 +828,17 @@ the next example will still crash.
    print(vertices)  # <- this may crash
 
 
+Unfortunate Corner Cases
+------------------------
+
+Besides all expected cases listed above, there are a few others that should not be
+an issue but, due to internal implementation details, currently are:
+
+- ``Object.hide_viewport``, ``Object.hide_select`` and ``Object.hide_render``:
+  Setting any of those booleans will trigger a rebuild of Collection caches, hence breaking
+  any current iteration over ``Collection.all_objects``.
+
+
 sys.exit
 ========



More information about the Bf-blender-cvs mailing list