mobfox / MobFox-iOS-SDK

Apache License 2.0
15 stars 12 forks source link

Crash with 3.4.1 #68

Closed andre-arsenault closed 6 years ago

andre-arsenault commented 6 years ago

Hello again. I am in the process of testing my update to SDK 3.4.1 and I am seeing crashes as soon as a banner ad is loaded. The crash is very similar to the call stack reported in issue #65.

From the app log:

2018-03-26 14:03:09.417582+0200 LifeTotal[8610:6185980] dbg: ### MobFoxPlugin >> MobFoxAdDidLoad
2018-03-26 14:03:09.586602+0200 LifeTotal[8610:6186572] Metal GPU Frame Capture Enabled
2018-03-26 14:03:09.598950+0200 LifeTotal[8610:6186572] Metal API Validation Enabled
2018-03-26 14:03:09.832538+0200 LifeTotal[8610:6186274] *** Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '*** -[__NSPlaceholderArray initWithObjects:count:]: attempt to insert nil object from objects[1]'

And the call stack of the crash:

Last Exception Backtrace:
0   CoreFoundation                  0x185c7f164 __exceptionPreprocess + 124
1   libobjc.A.dylib                 0x184ec8528 objc_exception_throw + 55
2   CoreFoundation                  0x185c17c9c _CFThrowFormattedException + 111
3   CoreFoundation                  0x185b4a8a0 -[__NSPlaceholderArray initWithObjects:count:] + 283
4   CoreFoundation                  0x185b5687c +[NSArray arrayWithObjects:count:] + 51
5   LifeTotal                       0x102e11ce4 __23-[MobFoxJSContext init]_block_invoke_4 + 548068 (MobFoxJSContext.m:71)
6   CFNetwork                       0x186209d68 __75-[__NSURLSessionLocal taskForClass:request:uploadFile:bodyData:completion:]_block_invoke + 31
7   CFNetwork                       0x1862226bc __49-[__NSCFLocalSessionTask _task_onqueue_didFinish]_block_invoke + 151
8   Foundation                      0x186655ba0 __NSBLOCKOPERATION_IS_CALLING_OUT_TO_A_BLOCK__ + 15
9   Foundation                      0x186595894 -[NSBlockOperation main] + 71
10  Foundation                      0x1865854c4 -[__NSOperationInternal _start:] + 847
11  libdispatch.dylib               0x1855fea14 _dispatch_client_callout + 15
12  libdispatch.dylib               0x185606200 _dispatch_block_invoke_direct$VARIANT$mp + 287
13  libdispatch.dylib               0x1855fea14 _dispatch_client_callout + 15
14  libdispatch.dylib               0x185606200 _dispatch_block_invoke_direct$VARIANT$mp + 287
15  libdispatch.dylib               0x1856060ac dispatch_block_perform$VARIANT$mp + 103
16  Foundation                      0x186657878 __NSOQSchedule_f + 375
17  libdispatch.dylib               0x1855fea14 _dispatch_client_callout + 15
18  libdispatch.dylib               0x185606f08 _dispatch_continuation_pop$VARIANT$mp + 427
19  libdispatch.dylib               0x18560580c _dispatch_async_redirect_invoke$VARIANT$mp + 603
20  libdispatch.dylib               0x18560bcf4 _dispatch_root_queue_drain + 599
21  libdispatch.dylib               0x18560ba38 _dispatch_worker_thread3 + 119
22  libsystem_pthread.dylib         0x1858a706c _pthread_wqthread + 1267
23  libsystem_pthread.dylib         0x1858a6b6c start_wqthread + 3

Any help would be greatly appreciated.

nabriski commented 6 years ago

ok, we'll debug this and release a fix.

MosheNe commented 6 years ago

Looks like we solved it. We would appreciate if you could Kindly test the following version (3.4.2B1) on your platform and give us your feedback.

http://static.starbolt.io/MobFox-iOS-SDK-3.4.2B1-binaries.zip

andre-arsenault commented 6 years ago

The crash appears to be fixed with those new binaries!

I have seen multiple ads served successfully now whereas before it would crash as soon as the first ad came through. Thanks!