MSVC 2011 - 2012 bug: Blender Startup Failure when called from a process without SDOUT (Python crashes) #40907
Labels
No Label
Interest
Animation & Rigging
Interest
Blender Cloud
Interest
Collada
Interest
Core
Interest
Documentation
Interest
Eevee & Viewport
Interest
Geometry Nodes
Interest
Grease Pencil
Interest
Import and Export
Interest
Modeling
Interest
Modifiers
Interest
Nodes & Physics
Interest
Pipeline, Assets & IO
Interest
Platforms, Builds, Tests & Devices
Interest
Python API
Interest
Rendering & Cycles
Interest
Sculpt, Paint & Texture
Interest
Translations
Interest
User Interface
Interest
UV Editing
Interest
VFX & Video
Meta
Good First Issue
Meta
Papercut
Module
Add-ons (BF-Blender)
Module
Add-ons (Community)
Platform
Linux
Platform
macOS
Platform
Windows
Priority
High
Priority
Low
Priority
Normal
Priority
Unbreak Now!
Status
Archived
Status
Confirmed
Status
Duplicate
Status
Needs Info from Developers
Status
Needs Information from User
Status
Needs Triage
Status
Resolved
Type
Bug
Type
Design
Type
Known Issue
Type
Patch
Type
Report
Type
To Do
No Milestone
No project
No Assignees
14 Participants
Notifications
Due Date
No due date set.
Dependencies
No dependencies set.
Reference: blender/blender-addons#40907
Loading…
Reference in New Issue
Block a user
No description provided.
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
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:
http://bugs.python.org/issue17797
This breaks the Auto-Import functionality for blend files in Unity (unity3d.com), 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 http://bugs.python.org/issue17797#msg201964 fixes the issue. This would imply modifying pythonrun.c and replacing the Python34.dll with a modified version.
Changed status to: 'Open'
Added subscriber: @Ignaramus
blender/blender#41053 was marked as duplicate of this issue
blender/blender#41129 was marked as duplicate of this issue
blender/blender#40928 was marked as duplicate of this issue
blender/blender#41089 was marked as duplicate of this issue
blender/blender#41101 was marked as duplicate of this issue
Modified pythonrun.c with fixes according to http://bugs.python.org/issue17797#msg201964
Fixed DLL for 32-Bit Windows
Fixed DLL for 64-Bit Windows
Added subscribers: @ideasman42, @MartijnBerger, @mont29
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?
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 :/
Added subscriber: @vitorbalbio-3
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)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)…
Added subscriber: @compositor1
◀ Merged tasks: blender/blender#40928.
Added subscriber: @jrestemeier
Added subscriber: @dudeprgm
Added subscriber: @ygtsvtr
Added subscriber: @firedrake150
◀ Merged tasks: blender/blender#41053.
Added subscriber: @agentc0re
◀ Merged tasks: blender/blender#41089.
Added subscriber: @JJDeveloper
◀ Merged tasks: blender/blender#41101.
Added subscriber: @SememeS
Added subscriber: @Rigo.CL
Added subscriber: @Riw
◀ Merged tasks: blender/blender#41129.
Added subscriber: @piiichan
Removed subscriber: @agentc0re
Added subscriber: @SimeonConzendorf
This issue was referenced by None@61419
Changed status from 'Open' to: 'Resolved'
Closed by commit rBL61419.
This issue was referenced by None@61420
Added subscriber: @helt_vilt