Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Google Cast iOS SDK crashes when playing SSAI streams and receiver send ad blocks #131

Open
rajeshbeats opened this issue Mar 21, 2023 · 5 comments

Comments

@rajeshbeats
Copy link

We have noticed Google Cast iOS SDK crashes when we try to cast SSAI (Server-Side Ad Insertion) videos and the receiver sends ad blocks events back to the app. The crash is caused by an exception in the -[__NSArrayM insertObject:atIndex:] method of the Core Foundation framework inside Google cast iOS SDK.

libc++abi: terminating with uncaught exception of type NSException
*** Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '*** -[__NSArrayM insertObject:atIndex:]: object cannot be nil'
terminating with uncaught exception of type NSException

Steps to reproduce:

Launch the app and connect to a receiver.
Play an SSAI video on the receiver.
Wait for an ad to play and the receiver to send ad blocks back to the app.
Observe that the app crashes.

Expected behavior:

The SDK should handle ad blocks sent by the receiver without crashing.

Actual behavior:

The SDK crashes when the receiver sends ad blocks back to the app.

Additional information on environment

Device : iPhone 12
OS : 16.2
Xcode version: 14.1

Here is the stack trace from crash report

Last Exception Backtrace:
0   CoreFoundation                	0x199cb2708 __exceptionPreprocess + 220 (NSException.m:199)
1   libobjc.A.dylib               	0x1ae7bc7a8 objc_exception_throw + 60 (objc-exception.mm:565)
2   CoreFoundation                	0x199d249c8 _CFThrowFormattedException + 116 (CFObject.m:2015)
3   CoreFoundation                	0x199d21f4c -[__NSArrayM insertObject:atIndex:].cold.1 + 52 (NSArrayM.m:157)
4   CoreFoundation                	0x199b8bb5c -[__NSArrayM insertObject:atIndex:] + 1020 (NSArrayM.m:157)
5   GoogleCast                    	0x107e81270 +[GCKUIMediaController computeAdBlocks:] + 832
6   GoogleCast                    	0x107e817ec -[GCKUIMediaController remoteMediaClientDidUpdateProgress:] + 76
7   GoogleCast                    	0x107f16480 -[GCKRemoteMediaClient notifyDidUpdateProgress] + 192
8   GoogleCast                    	0x107f5ed4c -[GCKBWeakTimerTarget timerDidFire:] + 88
9   Foundation                    	0x19b087438 __NSFireTimer + 104 (NSTimer.m:280)
10  CoreFoundation                	0x199c2d1d4 __CFRUNLOOP_IS_CALLING_OUT_TO_A_TIMER_CALLBACK_FUNCTION__ + 32 (CFRunLoop.c:1807)
11  CoreFoundation                	0x199c2cdd0 __CFRunLoopDoTimer + 1076 (CFRunLoop.c:2415)
12  CoreFoundation                	0x199c2c220 __CFRunLoopDoTimers + 328 (CFRunLoop.c:2575)
13  CoreFoundation                	0x199c25f8c __CFRunLoopRun + 1872 (CFRunLoop.c:3080)
14  CoreFoundation                	0x199c25308 CFRunLoopRunSpecific + 600 (CFRunLoop.c:3242)
15  GraphicsServices              	0x1b12a8734 GSEventRunModal + 164 (GSEvent.c:2259)
16  UIKitCore                     	0x19c6a375c -[UIApplication _run] + 1072 (UIApplication.m:3269)
17  UIKitCore                     	0x19c6a8fcc UIApplicationMain + 168 (UIApplication.m:4740)
18  MyApp_iOS                      	0x104e9cc14 main + 176

We observed below warning appears before the crash.
-[GCKUICastSliderAdBlock initWithAdBlockPosition:adBlockDuration:watched:expanded:] - adBlockPosition should be within the range [0:1]

Also, Our iOS app doesnt have implementation of GCKUIMediaController or any Ad Breaks (such as GCKAdBreakClipInfoBuilder)

@darrennolan
Copy link

A note, we have sender applications on both Android and Web that don't encounter this issue with the setup of ads on streams, this only seems to affect iOS sender applications.

@julianjohn
Copy link

@rajeshbeats & @darrennolan I am also running into this issue. Were you guys able to fix this issue?

@darrennolan
Copy link

@julianjohn - never really resolved. We even reached out to our partnerships people. For us, the specific issue was ads of very short length, < 5s. I think we had 3s bumpers added in that worked as ads, and that caused the issue. When those bumpers were removed (before further testing from us/google) - the issue went away and no one was able to investigate further.

Hope that helps you a little.

@julianjohn
Copy link

Thanks very much, @darrennolan. This helps. In our case, it is a ~1 min video.

@alarochelle
Copy link

Also running into this issue.
Not happening on Web or Android, only iOS. Happens with pretty long content (~20mins) and ads are minimum 5-15s. Always happens whenever the content reaches the end or starts.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants