Browse Source

Welcome to HAXLand. Population: Hoikas.

See the comment for details. I've been seeing this crash since we
started doing fancy idprop stuff. Of course, my test blend has always
had bleeding edge junk and has crashed left, right, and center. For more
fun, follow the progress on D4196.
pull/133/head
Adam Johnson 6 years ago
parent
commit
520520796e
Signed by: Hoikas
GPG Key ID: 0B6515D6FF6F271E
  1. 14
      korman/nodes/node_core.py

14
korman/nodes/node_core.py

@ -384,3 +384,17 @@ class PlasmaNodeTree(bpy.types.NodeTree):
@classmethod
def poll(cls, context):
return (context.scene.render.engine == "PLASMA_GAME")
# Welcome to HAXland!
# Blender 2.79 is great in that it allows us to have ID Datablock pointer properties everywhere.
# However, there is an error in the way user refcounts are handled in node trees. When a node is freed,
# it always decrements the user count. Good. But, the node tree decrements that same count again, resulting
# in a use-after-free (or double-free?) crash in Blender. I modelled and submitted a fix (see: Blender D4196)
# but a workaround is to just remove the nodes from all Plasma node trees before the data is unloaded. :)
@bpy.app.handlers.persistent
def _nuke_plasma_nodes(dummy):
for i in bpy.data.node_groups:
if isinstance(i, PlasmaNodeTree):
i.nodes.clear()
bpy.app.handlers.load_pre.append(_nuke_plasma_nodes)

Loading…
Cancel
Save