imberezin / google-cast-sdk

Automatically exported from code.google.com/p/google-cast-sdk
0 stars 0 forks source link

iOS crash going to background #630

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
Basically the same as 
https://code.google.com/p/google-cast-sdk/issues/detail?id=361, but that one is 
closed. So I'm opening a replacement for it, as the issue appears to be still 
around.

What steps will reproduce the problem?
1. Connect iOS sender to remote Chromecast receiver.
2. Background the iOS sender app i.e. press the hardware Home button on the iOS 
device.
3. See crashlog generated on iOS device.

What version of the product are you using? On what operating system?
Mac OS X 10.10 / Xcode 6.4 / iPhone 6+ / iOS 8.3 (12F70) / iOS Cast SDK reports 
kGCKFrameworkVersion = 2.7.1.2664.

What is the expected output? What do you see instead?
Expected: no crash.
Actual:
Incident Identifier: F4E82D10-5A06-4608-85CE-7A7BB217A501
CrashReporter Key:   fa5c0f2e700b072f12ad95476bc8b25d3834a4a3
Hardware Model:      iPhone7,1
Process:             ChromecastSampleApp [1709]
Path:                
/private/var/mobile/Containers/Bundle/Application/7B865584-FD78-4552-BBEA-60552D
73F777/ChromecastSampleApp.app/ChromecastSampleApp
Identifier:          com.ooyala.ChromecastSampleApp
Version:             1 (1.0)
Code Type:           ARM-64 (Native)
Parent Process:      launchd [1]

Date/Time:           2015-08-06 17:18:08.309 -0700
Launch Time:         2015-08-06 17:14:04.081 -0700
OS Version:          iOS 8.3 (12F70)
Report Version:      105

Exception Type:  EXC_BAD_ACCESS (SIGSEGV)
Exception Subtype: KERN_INVALID_ADDRESS at 0x0000000000000010
Triggered by Thread:  0

Thread 0 name:  Dispatch queue: com.apple.main-thread
Thread 0 Crashed:
0   libobjc.A.dylib                 0x0000000195607bd0 objc_msgSend + 16
1   CoreFoundation                  0x0000000183d6e2c0 
__CFNOTIFICATIONCENTER_IS_CALLING_OUT_TO_AN_OBSERVER__ + 16
2   CoreFoundation                  0x0000000183cab44c _CFXNotificationPost + 
2056
3   Foundation                      0x0000000184bdaa7c -[NSNotificationCenter 
postNotificationName:object:userInfo:] + 68
4   UIKit                           0x0000000188a98354 -[UIApplication 
_handleApplicationDectivationWithScene:shouldForceExit:transitionContext:complet
ion:] + 1092
5   UIKit                           0x0000000188aa0dc8 __88-[UIApplication 
_handleApplicationLifecycleEventWithScene:transitionContext:completion:]_block_i
nvoke + 88
6   UIKit                           0x0000000188aa0d50 -[UIApplication 
_handleApplicationLifecycleEventWithScene:transitionContext:completion:] + 376
7   UIKit                           0x0000000188a93fdc -[UIApplication 
scene:didUpdateWithDiff:transitionContext:completion:] + 548
8   FrontBoardServices              0x000000018c5d13c4 __31-[FBSSerialQueue 
performAsync:]_block_invoke_2 + 28
9   CoreFoundation                  0x0000000183d80278 
__CFRUNLOOP_IS_CALLING_OUT_TO_A_BLOCK__ + 16
10  CoreFoundation                  0x0000000183d7f380 __CFRunLoopDoBlocks + 308
11  CoreFoundation                  0x0000000183d7d9a4 __CFRunLoopRun + 1752
12  CoreFoundation                  0x0000000183ca92d0 CFRunLoopRunSpecific + 392
13  GraphicsServices                0x000000018d4bf6f8 GSEventRunModal + 164
14  UIKit                           0x000000018886efa8 UIApplicationMain + 1484
15  ChromecastSampleApp             0x00000001000b3824 main (main.m:14)
16  libdyld.dylib                   0x0000000195c72a04 start + 0

Original issue reported on code.google.com by jonsl...@ooyala.com on 10 Aug 2015 at 6:27

GoogleCodeExporter commented 8 years ago

Original comment by jonathan...@google.com on 12 Aug 2015 at 3:45

GoogleCodeExporter commented 8 years ago
Update: Please close this as I am no longer able to reproduce this. We did not 
change the Chromecast iOS SDK version - so far, logically implies it was an 
issue with our own code.

Original comment by jonsl...@ooyala.com on 13 Aug 2015 at 5:18

GoogleCodeExporter commented 8 years ago

Original comment by jonathan...@google.com on 13 Aug 2015 at 8:03

GoogleCodeExporter commented 8 years ago
I've managed to find a way to repro with our own code, and with some 
instrumentation I currently think it is due to GCKDeviceManager being dealloc'd 
during postNotificationName:object:userInfo:. What I did was to swizzle into 
NSNotificationCenter, and see that the postNotificationName dies, and that 
GCKDeviceManager was trying to remove its own subscriptions -- which I am 
guessing is because it is trying to dealloc.

Ask for Google: Please check for a race with GCKDeviceManager and 
NSNotificationCenter cf. 
https://www.google.com/#q=nsnotificationcenter+thread+safe

Original comment by jonsl...@ooyala.com on 17 Aug 2015 at 5:54

GoogleCodeExporter commented 8 years ago
Issue 634 has been merged into this issue.

Original comment by jonathan...@google.com on 17 Aug 2015 at 8:40