Page MenuHome

MSVC 2011 - 2012 bug: Blender Startup Failure when called from a process without SDOUT (Python crashes)
Closed, ResolvedPublic


Blender Version
Broken: Blender on Windows built with MSVC 11.0 or later (includes 2.71 release)
Worked: 2.70a and earlier

When Blender is called from a subprocess with no STDOUT available, the Py_Initialize procedure will cause a fatal error, due to a bug in more recent MSVC versions. (This issue will be fixed in MSVC 14)

The respective Issue on the Python Tracker:

This breaks the Auto-Import functionality for blend files in Unity (, where a .blend dropped in an asset directory will be automatically converted to FBX by calling the Blender executable (and the FBX exporter python module).

I can confirm that a possible workaround outlined at fixes the issue. This would imply modifying pythonrun.c and replacing the Python34.dll with a modified version.

Event Timeline

Ignacio (Ignaramus) raised the priority of this task from to 90.
Ignacio (Ignaramus) updated the task description. (Show Details)
Ignacio (Ignaramus) edited a custom field.

Fixed DLL for 32-Bit Windows

Fixed DLL for 64-Bit Windows

Thanks for tracking that issue down!

Adding our py & win maintainers here too.

I doubt we’ll ever agree to distribute a patched version of python with our Blender but at least users that really need that feature from Unity now have a workaround… I’d bet this report will stay open for quite a bit of time (thanks M$).

PS: There may be another way around that issue, though, less intrusive - python can call processes with its own stdin/out/err, so a simple modification of Unity script to feature such fake streams might solve it, without having to replace whole py dll?

Bastien Montagne (mont29) lowered the priority of this task from 90 to Normal.Jul 1 2014, 7:31 PM

The Blender process itself crashes on Python Initialization, so there is no hope to have the script run in the first place, Unity itself does not use Python. They should be able to work around this, depending on how they handle subprocesses, but not a simply as that.

Ah ok… well, yes, not so simple in this case, indeed :/

Bastien Montagne (mont29) renamed this task from Blender Startup Failure on Windows when called from a process without SDOUT (Broken Unity Blender Auto-Import) to MSVC 2011 - 2012 bug: Blender Startup Failure when called from a process without SDOUT (Python crashes).Jul 2 2014, 4:05 PM
Bastien Montagne (mont29) triaged this task as Low priority.

Set prio to 'Low', because we can’t do anything really here. I think it’s worth keeping it open though, so other users hitting the issue can find it (and the workaround)…

Martijn Berger (juicyfruit) changed the task status from Unknown Status to Resolved.Aug 29 2014, 2:13 PM

Closed by commit rBL61419.