Blender Git Loki
Git Commits -> Revision 732c566
Revision 732c566 by Sergey Sharybin (master) June 2, 2013, 15:02 (GMT) |
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. |
Commit Details:
Full Hash: 732c566f2fb5253c152b81ebbe76eb6a17862046
SVN Revision: 57192
Parent Commit: 0fa0842
Lines Changed: +9, -31
8 Modified Paths:
/build_files/scons/config/linuxcross-config.py (+1, -1) (Diff)
/build_files/scons/config/win32-mingw-config.py (+1, -1) (Diff)
/build_files/scons/config/win32-vc-config.py (+1, -1) (Diff)
/build_files/scons/config/win64-vc-config.py (+1, -1) (Diff)
/build_files/scons/tools/Blender.py (+4, -4) (Diff)
/CMakeLists.txt (+1, -5) (Diff)
/SConstruct (+0, -1) (Diff)
/source/creator/CMakeLists.txt (+0, -17) (Diff)
/build_files/scons/config/win32-mingw-config.py (+1, -1) (Diff)
/build_files/scons/config/win32-vc-config.py (+1, -1) (Diff)
/build_files/scons/config/win64-vc-config.py (+1, -1) (Diff)
/build_files/scons/tools/Blender.py (+4, -4) (Diff)
/CMakeLists.txt (+1, -5) (Diff)
/SConstruct (+0, -1) (Diff)
/source/creator/CMakeLists.txt (+0, -17) (Diff)