2
$\begingroup$

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

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

1 Answer 1

1
$\begingroup$

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

for example

foo = bpy.data.objects["Cube"]
bpy.ops.posemode_toggle()

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

$\endgroup$
2
  • $\begingroup$ But I'm not toggling pose mode... $\endgroup$ Commented May 9, 2017 at 9:09
  • 1
    $\begingroup$ you said you render your scene, so after that you must regenerate your pointer variables $\endgroup$ Commented May 9, 2017 at 20:11

You must log in to answer this question.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.