New issue
Advanced search Search tips

Issue 829449 link

Starred by 2 users

Issue metadata

Status: Fixed
Owner:
Closed: Apr 2018
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: iOS
Pri: 2
Type: Bug



Sign in to add a comment

[CRD iOS] Crash at glkKillClient

Project Member Reported by yuweih@chromium.org, Apr 5 2018

Issue description

104 crashes as of Apr 5.

https://developer.apple.com/library/content/qa/qa1766/_index.html

App shall not execute any OpenGL commands after it goes to background.

Repro step:

1. Connect to a host.
2. Play video on the host.
3. Lock the screen.
4. Unlock the screen.

Note that even if we fix this bug, the connection will still be dropped as the socket is disconnected.
 
Screen Shot 2018-04-05 at 10.32.11 AM.png
128 KB View Download

Comment 1 by yuweih@chromium.org, Apr 11 2018

I believe the crash rate will decrease on M67 as we now disable the video stream when the app goes to the background. Let's see how the data looks. If the crash rate is still high then we'll need to completely shutdown the GlRenderer when the app goes to the background.

Comment 2 by yuweih@chromium.org, Apr 11 2018

Labels: -Pri-2 -M-66 Pri-3

Comment 3 by yuweih@chromium.org, Apr 13 2018

Looks like this may still happen after we disable remote stream. Probably because the control message takes time to get to the host.

Comment 4 by yuweih@chromium.org, Apr 14 2018

Labels: -Pri-3 M-67 Pri-2

Comment 5 by yuweih@chromium.org, Apr 14 2018

Description: Show this description
Project Member

Comment 6 by bugdroid1@chromium.org, Apr 16 2018

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/9e9ae0c6e74194ec58ca37477b3149fa94d01b95

commit 9e9ae0c6e74194ec58ca37477b3149fa94d01b95
Author: Yuwei Huang <yuweih@chromium.org>
Date: Mon Apr 16 20:24:58 2018

[CRD iOS] Fix crash for executing OpenGL commands when app goes to the background

iOS doesn't allow app executing OpenGL commands after it goes to the
background. Disabling the video stream on the host isn't good enough as
the coming video frame will still arrive.

This CL fixes the crash by destroying the OpenGL context when the app
becomes inactive, and recreates the context when the app becomes active
again.

Note that even after we fix the crash, the session will still be
disconnected, since the app will eventually enter the Suspended state
and stop processing network events. See link about an iOS app's
lifecycle:
https://developer.apple.com/library/content/documentation/iPhone/Conceptual/iPhoneOSProgrammingGuide/TheAppLifeCycle/TheAppLifeCycle.html#//apple_ref/doc/uid/TP40007072-CH2-SW3

Bug:  829449 
Change-Id: I507b8e2a856b3e019db99faff188bd5f312c5a51
Reviewed-on: https://chromium-review.googlesource.com/1013244
Commit-Queue: Yuwei Huang <yuweih@chromium.org>
Reviewed-by: Jamie Walch <jamiewalch@chromium.org>
Cr-Commit-Position: refs/heads/master@{#551097}
[modify] https://crrev.com/9e9ae0c6e74194ec58ca37477b3149fa94d01b95/remoting/client/display/gl_renderer.cc
[modify] https://crrev.com/9e9ae0c6e74194ec58ca37477b3149fa94d01b95/remoting/ios/app/host_view_controller.mm
[modify] https://crrev.com/9e9ae0c6e74194ec58ca37477b3149fa94d01b95/remoting/ios/display/gl_display_handler.h
[modify] https://crrev.com/9e9ae0c6e74194ec58ca37477b3149fa94d01b95/remoting/ios/display/gl_display_handler.mm

Comment 7 by yuweih@chromium.org, Apr 16 2018

Labels: Merge-Request-67
This only affects Chromoting and doesn't affect Chrome.
Project Member

Comment 8 by bugdroid1@chromium.org, Apr 17 2018

Labels: merge-merged-testbranch
The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/9e9ae0c6e74194ec58ca37477b3149fa94d01b95

commit 9e9ae0c6e74194ec58ca37477b3149fa94d01b95
Author: Yuwei Huang <yuweih@chromium.org>
Date: Mon Apr 16 20:24:58 2018

[CRD iOS] Fix crash for executing OpenGL commands when app goes to the background

iOS doesn't allow app executing OpenGL commands after it goes to the
background. Disabling the video stream on the host isn't good enough as
the coming video frame will still arrive.

This CL fixes the crash by destroying the OpenGL context when the app
becomes inactive, and recreates the context when the app becomes active
again.

Note that even after we fix the crash, the session will still be
disconnected, since the app will eventually enter the Suspended state
and stop processing network events. See link about an iOS app's
lifecycle:
https://developer.apple.com/library/content/documentation/iPhone/Conceptual/iPhoneOSProgrammingGuide/TheAppLifeCycle/TheAppLifeCycle.html#//apple_ref/doc/uid/TP40007072-CH2-SW3

Bug:  829449 
Change-Id: I507b8e2a856b3e019db99faff188bd5f312c5a51
Reviewed-on: https://chromium-review.googlesource.com/1013244
Commit-Queue: Yuwei Huang <yuweih@chromium.org>
Reviewed-by: Jamie Walch <jamiewalch@chromium.org>
Cr-Commit-Position: refs/heads/master@{#551097}
[modify] https://crrev.com/9e9ae0c6e74194ec58ca37477b3149fa94d01b95/remoting/client/display/gl_renderer.cc
[modify] https://crrev.com/9e9ae0c6e74194ec58ca37477b3149fa94d01b95/remoting/ios/app/host_view_controller.mm
[modify] https://crrev.com/9e9ae0c6e74194ec58ca37477b3149fa94d01b95/remoting/ios/display/gl_display_handler.h
[modify] https://crrev.com/9e9ae0c6e74194ec58ca37477b3149fa94d01b95/remoting/ios/display/gl_display_handler.mm

Project Member

Comment 9 by sheriffbot@chromium.org, Apr 17 2018

Labels: -Merge-Request-67 Merge-Approved-67 Hotlist-Merge-Approved
Your change meets the bar and is auto-approved for M67. Please go ahead and merge the CL to branch 3396 manually. Please contact milestone owner if you have questions.
Owners: cmasso@(Android), cmasso@(iOS), kbleicher@(ChromeOS), govind@(Desktop)

For more details visit https://www.chromium.org/issue-tracking/autotriage - Your friendly Sheriffbot
Project Member

Comment 10 by bugdroid1@chromium.org, Apr 17 2018

Labels: -merge-approved-67 merge-merged-3396
The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/a9ea7f6ae3ae374f99ef5d8f2b6cfcd8f71fe71c

commit a9ea7f6ae3ae374f99ef5d8f2b6cfcd8f71fe71c
Author: Yuwei Huang <yuweih@chromium.org>
Date: Tue Apr 17 20:55:06 2018

[CRD iOS] Fix crash for executing OpenGL commands when app goes to the background

iOS doesn't allow app executing OpenGL commands after it goes to the
background. Disabling the video stream on the host isn't good enough as
the coming video frame will still arrive.

This CL fixes the crash by destroying the OpenGL context when the app
becomes inactive, and recreates the context when the app becomes active
again.

Note that even after we fix the crash, the session will still be
disconnected, since the app will eventually enter the Suspended state
and stop processing network events. See link about an iOS app's
lifecycle:
https://developer.apple.com/library/content/documentation/iPhone/Conceptual/iPhoneOSProgrammingGuide/TheAppLifeCycle/TheAppLifeCycle.html#//apple_ref/doc/uid/TP40007072-CH2-SW3

Bug:  829449 
Change-Id: I507b8e2a856b3e019db99faff188bd5f312c5a51
Reviewed-on: https://chromium-review.googlesource.com/1013244
Commit-Queue: Yuwei Huang <yuweih@chromium.org>
Reviewed-by: Jamie Walch <jamiewalch@chromium.org>
Cr-Original-Commit-Position: refs/heads/master@{#551097}(cherry picked from commit 9e9ae0c6e74194ec58ca37477b3149fa94d01b95)
Reviewed-on: https://chromium-review.googlesource.com/1015187
Reviewed-by: Yuwei Huang <yuweih@chromium.org>
Cr-Commit-Position: refs/branch-heads/3396@{#61}
Cr-Branched-From: 9ef2aa869bc7bc0c089e255d698cca6e47d6b038-refs/heads/master@{#550428}
[modify] https://crrev.com/a9ea7f6ae3ae374f99ef5d8f2b6cfcd8f71fe71c/remoting/client/display/gl_renderer.cc
[modify] https://crrev.com/a9ea7f6ae3ae374f99ef5d8f2b6cfcd8f71fe71c/remoting/ios/app/host_view_controller.mm
[modify] https://crrev.com/a9ea7f6ae3ae374f99ef5d8f2b6cfcd8f71fe71c/remoting/ios/display/gl_display_handler.h
[modify] https://crrev.com/a9ea7f6ae3ae374f99ef5d8f2b6cfcd8f71fe71c/remoting/ios/display/gl_display_handler.mm

Status: Fixed (was: Assigned)

Sign in to add a comment