# Intermittent Error: EXCEPTION_ACCESS_VIOLATION when using Python script

I'm running a script that opens .obj files and renders them from a series of viewpoints. Most of the time, it works no problem. However, sometimes it crashes, giving only Error: EXCEPTION_ACCESS_VIOLATION. If I try again, it usually works the second time around.

Is this maybe a Windows read/write lock messing things up? I can't really debug where in the code it gets stopped as it's not raising an exception. Sometimes it fails after rendering "Cam0", sometimes after "Cam1", or sometimes before loading the model - it's really inconsistent!

Another observation: if I pass n models to the script, it's much more likely to crash than if I run the script n times on each model separately.

Any ideas? The only solution I have is to keep trying over and over until it succeeds. I've commented out parts of the original script so you can run it yourselves with: blender -b -P view_interpolate.py -- path/containing/an/obj/model [more paths...]

I am running Blender 2.78c

• We've been having the same problem with a python import script, Blender just vanishes completely trying to run the script. It happens intermittently, sometimes it does, sometimes it doesn't. The only reason i noticed the 'Error: EXCEPTION_ACCESS_VIOLATION' was because i started launching from CommandPrompt in order to test debug modes and disable the crash handler, and also because Blender outputs it's console messages to CommandPrompt it means they are persistent and don't disappear when it crashes.. – MidnightCow May 8 '17 at 13:23
• I THINK 2.77a doesn't have this problem. – MidnightCow May 8 '17 at 14:59
• @MidnightCow I'm now trying 2.77a and I haven't seen the error yet! – CJxD May 8 '17 at 22:49
• Try with a recent daily build from builder.blender.org – dr. Sybren Jul 13 '17 at 6:29

foo = bpy.data.objects["Cube"]