Page MenuHome

EXCEPTION_ACCESS_VIOLATION using bpy.ops.import_mesh.stl
Closed, ArchivedPublic


System Information
Operating system & Graphics card, see

Blender Version
Broken: 2.81-windows64 and daily build: 2.82-33eabb82207e-windows64, master, 2019-12-25

Short description of error
I run an animation where one of the objects are animated by loading premade stl files. The stl loading process starts at frame 500. The first stl is loaded and rendered correctly and produces a correct png file for frame 500. At frame 501 or a bit later, Blender crashes and exits to Windows. The debug output reveal that a EXCEPTION_ACCESS_VIOLATION has occured. See

Exact steps for others to reproduce the error

  1. Download this blend file to a directory:
  2. Download this collection of stl files to same folder as blend file!Av6VIIhIJY1CkoIo79kuagaF8dqXqQ?e=1XPtxJ (173MB)
A directory named isoSurface should exist next to the blend file and isoSurface should contain 8 subdirectories with names: 4.944,4.952,4.959,4.967,4.975,4.983,4.992,5
Each of these directories contains a single stl file.

  1. Open Blender
  2. Load A.blend
  3. Run internal script: by pressing "Run Script" in Scripting workspace
  4. Press Render Animation (CTRL+F12)
  5. A crash will most likely happen before frame 509.

Event Timeline

Thanks for the report. Unfortunately the scenario described is too time consuming for us to track down, we require the bug reporter to narrow down the problem.

Normally .blend files can be simplified by removing most objects and disabling settings, until the problem reveals itself more clearly.

If there are many steps to reproduce the problem, please attach a .blend file saved right before the bug occurs, so only a few steps are needed to trigger the bug.

Ok, thanks for looking into my report. I know you are pretty busy and thanks for an amazing product. I'm a happy supporter :)

I'm sure the problem is related to stl import since everything works - expect when I enable stl import in my python script.

If I do a dry-run of the script in the blend file, with actually loading a stl file, no error occurs.

I have no idea currently how to demonstrate that bug to you - without actually having you guys load stl files on the fly. Therefore, my receipy is as lean as I can make it currently.

I would very much like stl import to work robustly in animation as it might be a leverage for me to convince collegues to use Blender for scientic visualization at work.


Hi again,
I discovered that the bug doesn't appear if I run the case from the command line.

blender -b A.blend --python-text -a

Does this information make the bug report valid?