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

Crash inside Cast SDK iOS if a video is too short and contains ads request at the same time. #127

Open
soj opened this issue Dec 21, 2022 · 2 comments

Comments

@soj
Copy link

soj commented Dec 21, 2022

Hello!

I found that if a video is short and contains ads request at the same time - it crashes inside Google Cast SDK for iOS in this component [GCKUIMediaController computeAdBlocks:]

I can provide sample app for this issue. I downloaded Cast sample app for iOS and just added one my method func makeNewItem() -> GCKMediaInformation which creates "problematic" item. This item contains short video - https://storage.googleapis.com/interactive-media-ads/media/blank-0.2-sec.m4v and VMAP ad tag url.

Steps to reproduce

  1. Run the app
  2. Connect to Chromecast and play any video from the list with "Play now" option
  3. I substitute the original item with the problematic item. In almost 100% of cases the app will crash with this crash stack below when the ad start on the Chromecast device
  4. I found that this crash is not occurred if the video file duration is longer

2022-12-02 08:44:28.630554+0600 CastVideos-swift[42068:611451] *** Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '*** -[__NSArrayM insertObject:atIndex:]: object cannot be nil'
*** First throw call stack:
(
0 CoreFoundation 0x0000000112d478cb __exceptionPreprocess + 242
1 libobjc.A.dylib 0x000000010dc25ba3 objc_exception_throw + 48
2 CoreFoundation 0x0000000112dcf039 -[__NSCFString characterAtIndex:].cold.1 + 0
3 CoreFoundation 0x0000000112dcc595 -[__NSArrayM insertObject:atIndex:].cold.2 + 0
4 CoreFoundation 0x0000000112c31c18 -[__NSArrayM insertObject:atIndex:] + 993
5 CastVideos-swift 0x0000000104da6cbb +[GCKUIMediaController computeAdBlocks:] + 1095
6 CastVideos-swift 0x0000000104da722d -[GCKUIMediaController remoteMediaClientDidUpdateProgress:] + 71
7 CastVideos-swift 0x0000000104e459b5 -[GCKRemoteMediaClient notifyDidUpdateProgress] + 218
8 CastVideos-swift 0x0000000104ebec62 -[GCKBWeakTimerTarget timerDidFire:] + 89
9 Foundation 0x0000000114385266 __NSFireTimer + 67
10 CoreFoundation 0x0000000112ca7819 CFRUNLOOP_IS_CALLING_OUT_TO_A_TIMER_CALLBACK_FUNCTION + 20
11 CoreFoundation 0x0000000112ca7363 __CFRunLoopDoTimer + 812
12 CoreFoundation 0x0000000112ca6ada __CFRunLoopDoTimers + 243
13 CoreFoundation 0x0000000112ca12e4 __CFRunLoopRun + 2064
14 CoreFoundation 0x0000000112ca06f7 CFRunLoopRunSpecific + 560
15 GraphicsServices 0x0000000113a4728a GSEventRunModal + 139
16 UIKitCore 0x00000001255f362b -[UIApplication _run] + 994
17 UIKitCore 0x00000001255f8547 UIApplicationMain + 123
18 CastVideos-swift 0x0000000104d30fdf main + 63
Message from debugger: Terminated due to signal 6
19 dyld 0x000000010d9ac2bf start_sim + 10
20 ??? 0x0000000205638310 0x0 + 8680342288
)

Which version of the Cast SDK are you using? - I am using Cast SDK for iOS ver 4.7.0 (the latest one)
On which version(s) of the OS (iOS, Android) do you observe the problem? - iOS 16.1 at least
On which device type(s) such as phones, tablets or laptops (iPad, iPhone, etc.) do you observe the problem? iPhone, iPad
Do you observe the problem when running on a physical device, or the simulator, or both? both

@julianjohn
Copy link

I am running into the very same issue. Cast SDK Version - 4.7.1 beta. Is there a possible fix for this?

@maurovz
Copy link

maurovz commented Feb 20, 2024

Replying for visibility as I have the same problem. As far as I know this crash persists as of latest version.

This bug report might be related:
https://issuetracker.google.com/issues/260874571

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

3 participants