Page MenuHome

Segmentation fault, when script active and render animation with motion blur
Closed, ResolvedPublic

Description

System Information
osx 10.9.1, mbpr 13.1, 16gb Ram

Blender Version
Broken: own 2.69.10 a81cf31 and buildbot e07e8e3
Worked: official 2.69
Short description of error
Blender crash on random frame while rendering animation. Sometimes it crashes after 30 frames sometimes after 1. It appears only to happen if Motion Blur is enabled.

Traceback (most recent call last):
  File "/Text", line 9, in update_test
  File "/Text", line 37, in focus_test
AttributeError: Writing to ID classes in this context is not allowed: Camera, Camera datablock, error setting Camera.lens
Segmentation fault: 11

Exact steps for others to reproduce the error
Open crash.blend
Run the Script
Hit Render Animation

Event Timeline

The Auto Tile Size Addon suffers the same issue - if you animate the render tile size it crashes blender eventually:

Traceback (most recent call last):
  File "/Users/bashi/Library/Application Support/Blender/2.69/scripts/addons/auto_tile_size_release_02.py", line 65, in on_scene_update
    scene.TileSizePrevDevice = device
AttributeError: Writing to ID classes in this context is not allowed: Scene, Scene datablock, error setting Scene.TileSizePrevDevice
trigger device changed
Traceback (most recent call last):
  File "/Users/bashi/Library/Application Support/Blender/2.69/scripts/addons/auto_tile_size_release_02.py", line 65, in on_scene_update
    scene.TileSizePrevDevice = device
AttributeError: Writing to ID classes in this context is not allowed: Scene, Scene datablock, error setting Scene.TileSizePrevDevice
Segmentation fault: 11
Sergey Sharybin (sergey) triaged this task as Confirmed, Medium priority.

You have a classical race condition - update() called from UI thread, update_test() called from render animation thread on the same time.
Write access to bpy.context.scene.camera.data.lens (or any other property in general) be in need of properly locking.

But I have no idea how to implement it correctly.