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

  • $\begingroup$ 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.. $\endgroup$ – MidnightCow May 8 '17 at 13:23
  • 2
    $\begingroup$ I THINK 2.77a doesn't have this problem. $\endgroup$ – MidnightCow May 8 '17 at 14:59
  • $\begingroup$ @MidnightCow I'm now trying 2.77a and I haven't seen the error yet! $\endgroup$ – Chris Watts May 8 '17 at 22:49
  • $\begingroup$ Try with a recent daily build from builder.blender.org $\endgroup$ – dr. Sybren Jul 13 '17 at 6:29

Toggling pose mode / imports / rendering scene, many situations in blender can break pointers,

for example

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

foo can now cause crash!

full documentation https://docs.blender.org/api/2.78b/info_gotcha.html#help-my-script-crashes-blender https://docs.blender.org/api/2.78b/info_gotcha.html#edit-mode-memory-access

  • $\begingroup$ But I'm not toggling pose mode... $\endgroup$ – Chris Watts May 9 '17 at 9:09
  • 1
    $\begingroup$ you said you render your scene, so after that you must regenerate your pointer variables $\endgroup$ – Nico Lob May 9 '17 at 20:11

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.