Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSergey Sharybin <sergey.vfx@gmail.com>2013-06-02 19:02:17 +0400
committerSergey Sharybin <sergey.vfx@gmail.com>2013-06-02 19:02:17 +0400
commit732c566f2fb5253c152b81ebbe76eb6a17862046 (patch)
treef63858393ec3b8f16dd7d9fcf2cfc251eaaf396b /build_files/scons/tools/Blender.py
parent0fa08424b7a78bbf3fd6eb142d477feb0cca9806 (diff)
Fix #35587: Cycles: image movie to single image crashing
Crash was happening on windows platforms only and was caused by some specifics about how CRT works. Basically, blender and all of the .dll are compiled with /MT flag, which means blender.exe and all .dll are using separate environments. This makes it impossible to pass file descriptors from blender to other dll, because it becomes invalid in the dll. And this is exactly what was happening: OIIO was trying to open movie file with all known plugins and one of them was zlib. And the way OIIO was using zlib API is opening the file using Boost and passing a file descriptor to zlib. And since zlib was a dynamic library this lead to general issues using this descriptor in zlib code. Solved by linking to zlib statically. This allows to safely pass file descriptor to zlib API. Alternative would be to compile all the stuff with /MD flag, but that's much bigger and less robust way to fix the issue. Tested on windows using msvc2008, scons plus cmake both 32 and 64 bit versions. Seems to be working fine. Further tweaks for mingw and msvc2012 could be needed tho.
Diffstat (limited to 'build_files/scons/tools/Blender.py')
-rw-r--r--build_files/scons/tools/Blender.py8
1 files changed, 4 insertions, 4 deletions
diff --git a/build_files/scons/tools/Blender.py b/build_files/scons/tools/Blender.py
index c5b4494e14f..c6cb88faebc 100644
--- a/build_files/scons/tools/Blender.py
+++ b/build_files/scons/tools/Blender.py
@@ -155,12 +155,12 @@ def setup_staticlibs(lenv):
libincs += Split(lenv['BF_OPENEXR_LIBPATH'])
if lenv['WITH_BF_STATICOPENEXR']:
statlibs += Split(lenv['BF_OPENEXR_LIB_STATIC'])
+ if lenv['WITH_BF_ZLIB'] and lenv['WITH_BF_STATICZLIB']:
+ statlibs += Split(lenv['BF_ZLIB_LIB_STATIC'])
if lenv['WITH_BF_TIFF']:
libincs += Split(lenv['BF_TIFF_LIBPATH'])
if lenv['WITH_BF_STATICTIFF']:
statlibs += Split(lenv['BF_TIFF_LIB_STATIC'])
- if lenv['WITH_BF_ZLIB'] and lenv['WITH_BF_STATICZLIB']:
- statlibs += Split(lenv['BF_ZLIB_LIB_STATIC'])
if lenv['WITH_BF_FFTW3']:
libincs += Split(lenv['BF_FFTW3_LIBPATH'])
if lenv['WITH_BF_STATICFFTW3']:
@@ -282,10 +282,10 @@ def setup_syslibs(lenv):
if lenv['WITH_BF_OPENEXR'] and not lenv['WITH_BF_STATICOPENEXR']:
syslibs += Split(lenv['BF_OPENEXR_LIB'])
- if lenv['WITH_BF_TIFF'] and not lenv['WITH_BF_STATICTIFF']:
- syslibs += Split(lenv['BF_TIFF_LIB'])
if lenv['WITH_BF_ZLIB'] and not lenv['WITH_BF_STATICZLIB']:
syslibs += Split(lenv['BF_ZLIB_LIB'])
+ if lenv['WITH_BF_TIFF'] and not lenv['WITH_BF_STATICTIFF']:
+ syslibs += Split(lenv['BF_TIFF_LIB'])
if lenv['WITH_BF_FFMPEG'] and not lenv['WITH_BF_STATICFFMPEG']:
syslibs += Split(lenv['BF_FFMPEG_LIB'])
if lenv['WITH_BF_OGG']: