App launched with --justlaunch
immediately crashes when trying to print to stdout
#594
Open
6 of 9 tasks
Expected behavior
The app can print to stdout without the app crashing.
Actual behavior.
The app immediately crashes when attempting to write to stdout.
Steps to reproduce the problem
See steps in this repo, otherwise:
App.swift
(or equivalent) to look like this:ios-deploy
like this (again, replacing theid
andbundle
path as appropriate):Commentary on the issue
This seems to be related to the timing between when:
--justlaunch
flag), andApp.swift
)The app will not crash if you do any of the following:
ios-deploy
ios-deploy
without the--justlaunch
flagios-deploy
that adds atime.sleep(10)
call above this lineNote that if you use Xcode 15 and a device running iOS 17 and use
devicectl
then the crash does not occur, so I am confident that it's something to do with whatios-deploy
is doing in terms of stdout/stderr.The actual error that ends up getting thrown is
errno 5 (EIO)
.Maybe it's something to do with how the process is being detached and the state of the various pipes involved at that point?
System Specs
Please run the commands below in your Terminal.app and include it in the issue. Check when done and include results below.
1.12.2
/Applications/Xcode-14.3.1.app/Contents/Developer
The text was updated successfully, but these errors were encountered: