Summary
Launching Unreal Editor under a debugger on this Mac reproducibly stops at FPythonScriptPlugin::InitializePython(). Python reports OSError: [Errno 9] Bad file descriptor / can't initialize sys standard streams.
The editor’s debugger pseudo-terminal starts valid and becomes revoked after its startup UnrealBuildTool SDK helper finishes. Investigation isolates the trigger to UBA’s CreateCallbackLogWriter: its uba-orphankill child creates a new session and executes a shell while retaining the inherited terminal descriptors. The cleanup shell has the debugger pseudo-terminal as its controlling terminal. After its exit, the editor’s shared descriptors become revoked.
What Type of Bug are you experiencing?
Foundation (C++ Tools, Profiling, & Pipeline)
Steps to Reproduce
-
Create a clean C++ Unreal project using the installed engine. Leave the editor Python plugin enabled.
-
Build its Development Editor target.
-
Launch the editor for this project directly under Rider Debug or Xcode’s debugger. A CLI LLDB launch also reproduces:
xcrun lldb -- '/Users/Shared/Epic Games/UE_5.8/Engine/Binaries/Mac/UnrealEditor.app/Contents/MacOS/UnrealEditor' '/path/to/MyProject/MyProject.uproject' -notraceserverThen execute
runin LLDB.-notraceserveris an isolation option; it does not prevent the issue. -
Observe the Python initialization ensure/breakpoint in
PythonScriptPlugin.cpp:1182. -
Inspect standard descriptors:
fcntl(F_GETFD)succeeds, whilefstatfails withEBADF.lsofreports the affected descriptors as(revoked).
Under Rider, stdin was revoked while stdout/stderr remained valid. Under the tested Xcode/CLI LLDB launch, all three descriptors shared one pseudo-terminal and were revoked.
Expected Result
Expected: the startup build helper completes without invalidating editor standard streams; Python initializes and the editor opens.
Observed Result
Actual: Python initialization fails and Unreal stops at an ensure. This also affects a newly created project, without project-specific plugins or a stream-repair workaround.
Affects Versions
5.8
Platform(s)
Mac