Skip to content

Conversation

@jmagman
Copy link
Member

@jmagman jmagman commented Oct 23, 2020

Description

Exit ios-deploy debugger process when the app crashes. This will close the log line stream, which closes the log reader stream, which closes the protocol discovery device log stream.

In conjunction with #68756 that will return null for the uri log scraping discovery, which will eventually return an app launch failure error.

Also, continue passing lldb logs to the log reader until ios-deploy exits in order to print crash logs.

$ gh pr checkout 68756
$ git cherry-pick process-stop  
$ flutter run
Running "flutter pub get" in test_create...                        303ms
Launching lib/main.dart on iPhone 6s in debug mode...
Automatically signing iOS for device deployment using specified development team in Xcode project: S8QB4VV633
Running Xcode build...                                                  
 └─Compiling, linking and signing...                         6.2s
Xcode build done.                                           10.5s
(lldb) Process 6171 stopped                                             
* thread #1, queue = 'com.apple.main-thread', stop reason = Assertion failed: Crashing for no reason
    frame #0: 0x00000001a2868ec0 libswiftCore.dylib`_swift_runtime_on_report
libswiftCore.dylib`_swift_runtime_on_report:                            
->  0x1a2868ec0 <+0>: ret                                               
libswiftCore.dylib`_swift_reportToDebugger:                             
    0x1a2868ec4 <+0>: b      0x1a2868ec0               ; _swift_runtime_on_report
libswiftCore.dylib`_swift_shouldReportFatalErrorsToDebugger:            
    0x1a2868ec8 <+0>: adrp   x8, 248672                                 
    0x1a2868ecc <+4>: ldrb   w0, [x8, #0xa68]                           
Target 0: (Runner) stopped.                                             
Installing and launching...                                        11.7s
Error launching application on iPhone 6s.

Related Issues

#44944
#68756

Tests

ios-deploy test app crash, update tests to logging after the process stops to catch crash logs.

@jmagman jmagman self-assigned this Oct 23, 2020
@flutter-dashboard flutter-dashboard bot added tool Affects the "flutter" command-line tool. See also t: labels. work in progress; do not review labels Oct 23, 2020
@google-cla google-cla bot added the cla: yes label Oct 23, 2020
});

testWithoutContext('device locked', () async {
testWithoutContext('unknown app launch error', () async {
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copy paste problem, this was a duplicate and incorrect name.

// messages to the log reader until it exits to capture crash dumps.
_logger.printTrace(line);
if (!debuggerCompleter.isCompleted) {
debuggerCompleter.complete(false);
Copy link
Member Author

@jmagman jmagman Oct 23, 2020

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is now completed after the process exits.

if (!debuggerCompleter.isCompleted) {
debuggerCompleter.complete(false);
}

Copy link
Contributor

@jonahwilliams jonahwilliams left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@fluttergithubbot fluttergithubbot merged commit 832d776 into flutter:master Oct 23, 2020
@jmagman jmagman deleted the process-stop branch October 23, 2020 21:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

tool Affects the "flutter" command-line tool. See also t: labels.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants