[iOS IMA SDK]Seeing to end in ad-rules with a mid-roll only crashes the app.

160 views
Skip to first unread message

Liusha Huang

unread,
Apr 28, 2015, 4:45:36 PM4/28/15
to ima...@googlegroups.com
Hi IMA Team,

I am developing a player with Google iOS IMA SDK.

ISSUES:

After content playback starts and before the playhead hit the mid-roll cue point, I seek the content playback to the end. Sometime the app crashes by this operation, normally 8 out of 10. And it happens more often with slower wifi.

I am not using AVPlayer so that IMA SDK keeps track of "currentTime" of my player so that it knows when to play mid-roll ads. I think the issue is that I called "contentComplete" right after the seek complete. So at this point the mid-roll is not played but the "currentTime" property has been updated to the correct value. After "contentComplete" called, the app crashes in the code inside Google IMA SDK.

I have attached the log from console.


Here is the stack from xCode debug navigator:

#0 0x00000001984bc0a8 in objc_exception_throw ()
#1 0x00000001873e9348 in -[__NSDictionaryM setObject:forKey:] ()
#2 0x00000001002c7d1c in +[IMAMessage deepCopyDictionary:] ()
#3 0x00000001002c7b08 in +[IMAMessage deepCopyObject:] ()
#4 0x00000001002c7850 in -[IMAMessage initWithChannelName:sessionId:messageType:messageData:] ()
#5 0x00000001002c6c18 in +[IMAJavascriptDispatcher messageWithChannelName:data:] ()
#6 0x00000001002c63ec in -[IMAJavascriptDispatcher processNewMessageWithChannelName:data:] ()
#7 0x00000001002c5e94 in -[IMAJavascriptBridge userContentController:didReceiveScriptMessage:] ()
#8 0x000000018c844308 in ScriptMessageHandlerDelegate::didPostMessage(WebKit::WebPageProxy&, WebKit::WebFrameProxy&, WebCore::SerializedScriptValue&) ()
#9 0x000000018c8aff9c in WebKit::WebUserContentControllerProxy::didPostMessage(IPC::Connection*, unsigned long long, unsigned long long, unsigned long long, IPC::DataReference const&) ()
#10 0x000000018c82b38c in void IPC::handleMessage<Messages::WebUserContentControllerProxy::DidPostMessage, WebKit::WebUserContentControllerProxy, void (WebKit::WebUserContentControllerProxy::)(IPC::Connection, unsigned long long, unsigned long long, unsigned long long, IPC::DataReference const&)>(IPC::Connection*, IPC::MessageDecoder&, WebKit::WebUserContentControllerProxy*, void (WebKit::WebUserContentControllerProxy::)(IPC::Connection, unsigned long long, unsigned long long, unsigned long long, IPC::DataReference const&)) ()
#11 0x000000018c7b01f0 in IPC::MessageReceiverMap::dispatchMessage(IPC::Connection*, IPC::MessageDecoder&) ()
#12 0x000000018c8c4f0c in WebKit::WebProcessProxy::didReceiveMessage(IPC::Connection*, IPC::MessageDecoder&) ()
#13 0x000000018c73cacc in IPC::Connection::dispatchMessage(std::_1::unique_ptr<IPC::MessageDecoder, std::_1::default_delete<IPC::MessageDecoder> >) ()
#14 0x000000018c73ea78 in IPC::Connection::dispatchOneMessage() ()
#15 0x0000000188de9f14 in WTF::RunLoop::performWork() ()
#16 0x0000000188dea54c in WTF::RunLoop::performWork(void*) ()
#17 0x00000001874b6d34 in _CFRUNLOOP_IS_CALLING_OUT_TO_A_SOURCE0_PERFORM_FUNCTION_ ()
#18 0x00000001874b5fd8 in __CFRunLoopDoSources0 ()
#19 0x00000001874b4088 in __CFRunLoopRun ()
#20 0x00000001873e11f4 in CFRunLoopRunSpecific ()
#21 0x00000001907036fc in GSEventRunModal ()
#22 0x000000018bd7210c in UIApplicationMain ()





Feel free to let me know if you need more information.

Thanks,
Liusha


Crash_log.txt

Shawn Busolits (IMA SDK Team)

unread,
Apr 29, 2015, 3:20:41 PM4/29/15
to ima...@googlegroups.com
Hi Liusha,

Thanks so much for the info. I was able to replicate this by calling contentComplete immediately after updating the currentTime to a value >=10, so I think your suspicion is correct. I'll let the rest of the team know about this and we'll look further into it.

Thanks,
Shawn Busolits
IMA SDK Team

Francisco Salvador Velazquez

unread,
Oct 27, 2015, 2:06:16 PM10/27/15
to Interactive Media Ads SDK
Hey Shawn,

After checking our app stability report we noticed an increase in crash rate. I have the same crash message as Liusha, which is what led me to find this thread.

My crash log:

Thread : Fatal Exception: NSInvalidArgumentException
0  CoreFoundation                 6500536136 __exceptionPreprocess
1  libobjc.A.dylib                6848348032 objc_exception_throw
2  CoreFoundation                 6499402976 -[__NSCFNumber hash]
3  IGN                            4297121204 +[IMAMessage deepCopyDictionary:]
4  IGN                            4297120672 +[IMAMessage deepCopyObject:]
5  IGN                            4297121140 +[IMAMessage deepCopyDictionary:]
6  IGN                            4297120672 +[IMAMessage deepCopyObject:]
7  IGN                            4297119976 -[IMAMessage initWithChannelName:sessionId:messageType:messageData:]
8  IGN                            4297116848 +[IMAJavascriptDispatcher messageWithChannelName:data:]
9  IGN                            4297114756 -[IMAJavascriptDispatcher processNewMessageWithChannelName:data:]
10 IGN                            4297113388 -[IMAJavascriptBridge userContentController:didReceiveScriptMessage:]
11 WebKit                         6606233160 ScriptMessageHandlerDelegate::didPostMessage(WebKit::WebPageProxy&, WebKit::WebFrameProxy&, WebKit::SecurityOriginData const&, WebCore::SerializedScriptValue&)
12 WebKit                         6605874960 WebKit::WebUserContentControllerProxy::didPostMessage(IPC::Connection&, unsigned long long, unsigned long long, WebKit::SecurityOriginData const&, unsigned long long, IPC::DataReference const&)
13 WebKit                         6605882864 void IPC::handleMessage<Messages::WebUserContentControllerProxy::DidPostMessage, WebKit::WebUserContentControllerProxy, void (WebKit::WebUserContentControllerProxy::*)(IPC::Connection&, unsigned long long, unsigned long long, WebKit::SecurityOriginData const&, unsigned long long, IPC::DataReference const&)>(IPC::Connection&, IPC::MessageDecoder&, WebKit::WebUserContentControllerProxy*, void (WebKit::WebUserContentControllerProxy::*)(IPC::Connection&, unsigned long long, unsigned long long, WebKit::SecurityOriginData const&, unsigned long long, IPC::DataReference const&))
14 WebKit                         6604154928 IPC::MessageReceiverMap::dispatchMessage(IPC::Connection&, IPC::MessageDecoder&)
15 WebKit                         6605751268 WebKit::WebProcessProxy::didReceiveMessage(IPC::Connection&, IPC::MessageDecoder&)
16 WebKit                         6603875036 IPC::Connection::dispatchMessage(std::__1::unique_ptr<IPC::MessageDecoder, std::__1::default_delete<IPC::MessageDecoder> >)
17 WebKit                         6603883400 IPC::Connection::dispatchOneMessage()
18 JavaScriptCore                 6529495312 WTF::RunLoop::performWork()
19 JavaScriptCore                 6529496940 WTF::RunLoop::performWork(void*)
20 CoreFoundation                 6500238660 __CFRUNLOOP_IS_CALLING_OUT_TO_A_SOURCE0_PERFORM_FUNCTION__
21 CoreFoundation                 6500237272 __CFRunLoopDoSources0
22 CoreFoundation                 6500228312 __CFRunLoopRun
23 CoreFoundation                 6499372192 CFRunLoopRunSpecific
24 GraphicsServices               6686261384 GSEventRunModal
25 UIKit                          6590697468 UIApplicationMain
26 IGN                            4295154172 main (main.m:16)
27 libdyld.dylib                  6857058488 start

We've had about 26k crashes affecting 3k users just in the past 24 hours.

If you have any suggestions on what we can do to fix this server side, that would be great.

Our app is using the Google IMA iOS SDK For AdMob 3.0.beta.12 in production.

Crashlytics report says 84% of the affected users are running iOS 9. 88% of the users are using iPhone devices, and 11% on iPad.

Thanks

Tyler Sidell (IMA SDK Team)

unread,
Oct 27, 2015, 4:05:57 PM10/27/15
to Interactive Media Ads SDK
Hi Francisco,

Thank you for reporting your crash.  I have reached out to the rest of the team to see if we can get an update about this particular crash.  I will keep you posted but feel free to provide any additional information that you can in the meantime.

Cheers,
Tyler Sidell
IMA SDK Team

Tyler Sidell (IMA SDK Team)

unread,
Oct 29, 2015, 11:13:04 AM10/29/15
to Interactive Media Ads SDK
Hi Francisco,

This crash should have been fixed in our recent versions.  If possible, can you try to upgrade to Beta 16?  Let us know if you are still able to reproduce the crash after the upgrade.

Thanks,
Tyler Sidell
IMA SDK Team

Reply all
Reply to author
Forward
0 new messages