Segmentation Fault in 2.66 Only From Console

Scripting in Blender with Python, and working on the API

Moderators: jesterKing, stiv

cedorman
Posts: 3
Joined: Mon Apr 22, 2013 5:27 pm

Segmentation Fault in 2.66 Only From Console

Postby cedorman » Mon Apr 22, 2013 5:50 pm

I have a simple model that I am rotating using a script. In version 2.66, the script works in the GUI, but crashes with a segmentation fault from the command line. Here is the script:

Code: Select all

import bpy

for count, Scn in enumerate(bpy.data.scenes):

    bpy.ops.transform.rotate(value=(0.9), axis=(-1,  0,  0))

print('Job finished')

It used to be more complicated but I removed code to get it to the minimum that crashes. The script worked fine in version 2.62 with the change that the value had to be written as "value=(0.9,)" because it was expecting a tuple.

I run it from the command line like

Code: Select all

% /opt/blender/blender -b my.blend -P blend_rotate.py
found bundled python: /opt/blender-2.66a-linux-glibc211-x86_64/2.66/python
read blend: /tmp/my.blend
Writing: /tmp/my.crash.txt
Segmentation fault

I can post the my.crash.txt if needed.

Am I missing something about the changes in the python API? Is there a migration guide?

My machine info: Ubuntu 12.04 LTS (GNU/Linux 3.2.0-24-generic x86_64). Blender version:
cdorman@pc-1051-cd-lin:/tmp$ /opt/blender/blender --version
Blender 2.66 (sub 1)
build date: 2013-03-05
build time: 16:51:10
build revision: 55057
build platform: Linux:64bit
build type: Release
build c flags: -pipe -fPIC -funsigned-char -fno-strict-aliasing -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -D_LARGEFILE64_SOURCE -fopenmp -DNDEBUG -O2 -msse -mss\
e2 -DWITH_MOD_FLUID -DWITH_MOD_OCEANSIM -D__LITTLE_ENDIAN__ -DWITH_AUDASPACE -DWITH_AVI -DWITH_BOOL_COMPAT
build c++ flags: -pipe -fPIC -funsigned-char -fno-strict-aliasing -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -D_LARGEFILE64_SOURCE -fopenmp -fpermissive -D__STDC\
_CONSTANT_MACROS -DNDEBUG -O2 -msse -msse2 -DWITH_MOD_FLUID -DWITH_MOD_OCEANSIM -D__LITTLE_ENDIAN__ -DWITH_AUDASPACE -DWITH_AVI -DWITH_BOOL_COMPAT
build link flags: -lrt
build system: SCons

CoDEmanX
Posts: 894
Joined: Sun Apr 05, 2009 7:42 pm
Location: Germany

Postby CoDEmanX » Mon Apr 22, 2013 7:15 pm

does it occur with 2.65? Since 2.66, there is a context restriction on addon registration time, not sure if this might be a problem for scripts like yours... (it shouldn't but i can't see any other obvious reason)
I'm sitting, waiting, wishing, building Blender in superstition...

cedorman
Posts: 3
Joined: Mon Apr 22, 2013 5:27 pm

Postby cedorman » Mon Apr 22, 2013 8:03 pm

it does not occur with 2.65, it ran fine. (Using blender 2.65a linux gliibc211-x86_64).

I have tried the script with multiple .blend files, and it fails in each of them. I re-downloaded 2.66a to make sure that I didn't mess up the file, but same problem.

CoDEmanX
Posts: 894
Joined: Sun Apr 05, 2009 7:42 pm
Location: Germany

Postby CoDEmanX » Mon Apr 22, 2013 9:00 pm

I'm sitting, waiting, wishing, building Blender in superstition...

cedorman
Posts: 3
Joined: Mon Apr 22, 2013 5:27 pm

Postby cedorman » Mon Apr 22, 2013 10:43 pm

It has been reported, id = 35056


Return to “Python”

Who is online

Users browsing this forum: No registered users and 2 guests