Page MenuHome

Crash when deleting imported meshes.
Closed, ArchivedPublic


System Information
Operating system: Windows 10
Graphics card: NVIDIA

Blender Version
Broken: 2.91.2
Worked: 2.91.1

Blender crashes when deleting meshes that were created via python scripts (e.g. via import operators). It seems to be related to python-generated node trees, but I'm not totally sure. It is easily reproducible though, and crippling for our community as we very often need to clean things up after importing and at the moment that just results in instant crashes.

Exact steps for others to reproduce the error

This bug only affects content that was created via python in the current blender session. Saving as .blend and then re-opening the file bypasses the bug. Thus I can't just share a single blend file to showcase the error.

After tinkering around for awhile I managed to narrow down the bug specifically to deletion of objects that were using node trees created via script. To that end I created a python script that generates and assigns simple node trees to objects in the scene. You can run this script and then attempt to delete an object to trigger the crash.


  1. Load up the attached blend file which contains a character model.
  2. Navigate to the text editor and run the provided script.
  3. The script should generate and assign materials to all meshes in the scene.
  4. Make sure you're in material preview mode, then attempt to delete the character's torso.
  5. Crash.

Video Tutorial:

Attached are the crash log and example blend file:

Event Timeline

I cannot reproduce this in the current 2.92-beta or master. Could you try the beta version from ?

getting an Assert when closing blender (but no crash on deleting):

BLI_assert failed: source/blender/gpu/intern/gpu_codegen.c:1057, gpu_pass_free(), at 'pass->refcount == 0'

I cannot reproduce this in the current 2.92-beta or master. Could you try the beta version from ?

Tried the 2.92 beta and can confirm that I also cannot reproduce it on that build.

It seems as though this has been fixed in the recent versions. Closing.