Google Analytics(分析)3.12在iOS上崩溃 [英] Google Analytics 3.12 crashes on iOS

查看:127
本文介绍了Google Analytics(分析)3.12在iOS上崩溃的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我是iOS开发新手,我的iOS应用程序崩溃(由供应商开发)。
我学会了阅读日志,这就是我看到的:

  2015-06-15 19:00: 51.628 my_app [2540:113596]警告:GoogleAnalytics 3.12 void GAIUncaughtExceptionHandler(NSException *)(GAIUncaughtExceptionHandler.m:48):未捕获异常:***  -  [__ NSArrayI objectAtIndex:]:索引0超出空数组范围
2015 -06-15 19:00:51.636 my_app [2540:113791]信息:GoogleAnalytics 3.12 - [GAIAnalyticsPropertiesStore propertyRecordForTrackingId:](GAIAnalyticsPropertiesStore.m:464):记录追踪ID my_tracking_id not found
2015-06-15 19 :00:51.640 my_app [2540:113791] VERBOSE:GoogleAnalytics 3.12 - [GAIBatchingDispatcher persist:]

I想知道Google Analytics(分析)是否导致崩溃或其他触发崩溃的事件。 API调用没问题,应用程序的其他部分工作正常。



编辑
Additonal stacktrace

  ***由于未捕获的异常'NSRangeException',终止应用程序,原因:'***  -  [__ NSArrayI objectAtIndex:]:索引0超出空界限数组'
***第一个抛出调用堆栈:

0 CoreFoundation 0x000000010656cc65 __exceptionPreprocess + 165
1 libobjc.A.dylib 0x0000000106205bb7 objc_exception_throw + 45
2 CoreFoundation 0x000000010646317e - [__ NSArrayI objectAtIndex:] + 190
3 my_app 0x0000000105396095 - [PromotionDetailViewController tableView:cellForRowAtIndexPath:] + 4213
4 UIKit 0x00000001076faa28 - [UITableView _createPreparedCellForGlobalRow:withIndexPath:willDisplay:] + 508
5 UIKit 0x00000001076d 9248 - [UITableView _updateVisibleCellsNow:isRecursive:] + 2853
6 UIKit 0x00000001076ef8a9 - [UITableView layoutSubviews] + 210
7 UIKit 0x0000000107679a2b - [UIView(CALayerDelegate)layoutSublayersOfLayer:] + 536
8 QuartzCore 0x00000001073d1ec2 - [CALayer的layoutSublayers] + 146
9分配QuartzCore 0x00000001073c66d6 _ZN2CA5Layer16layout_if_neededEPNS_11TransactionE + 380
10分配QuartzCore 0x00000001073c6546 _ZN2CA5Layer28layout_and_display_if_neededEPNS_11TransactionE + 24
11分配QuartzCore 0x0000000107332886 _ZN2CA7Context18commit_transactionEPNS_11TransactionE + 242
12分配QuartzCore 0x0000000107333a3a _ZN2CA11Transaction6commitEv + 462
13 QuartzCore 0x00000001073340eb _ZN2CA11Transaction17observer_callbackEP19__CFRun LoopObservermPv + 89
14分配的CoreFoundation 0x000000010649fca7 __CFRUNLOOP_IS_CALLING_OUT_TO_AN_OBSERVER_CALLBACK_FUNCTION__ + 23
15分配的CoreFoundation 0x000000010649fc00 __CFRunLoopDoObservers + 368
16分配的CoreFoundation 0x0000000106495a33 __CFRunLoopRun + 1123
17分配的CoreFoundation 0x0000000106495366 CFRunLoopRunSpecific + 470
18个分配GraphicsServices 0x0000000109f4ca3e GSEventRunModal + 161
19 UIKit 0x00000001075f9900 UIApplicationMain + 1282
20 my_app 0x00000001053de35f main + 111
21 libdyld.dylib 0x0000000108a15145 start + 1

libc ++ abi.dylib :终止于NSException类型的未捕获异常


解决方案

一个类似的问题,并得出结论,它不是 didFinishLaunchingWithOptions中更改了以下设置:


GAI * gai = [GAI sharedInstance];
gai.trackUncaughtExceptions = NO;


I'm new to iOS development and I have a crash on my iOS app (developed by vendor). I have learnt to read logs and this is what I see:

2015-06-15 19:00:51.628 my_app[2540:113596] WARNING: GoogleAnalytics 3.12 void GAIUncaughtExceptionHandler(NSException *) (GAIUncaughtExceptionHandler.m:48): Uncaught exception: *** -[__NSArrayI objectAtIndex:]: index 0 beyond bounds for empty array
2015-06-15 19:00:51.636 my_app[2540:113791] INFO: GoogleAnalytics 3.12 -[GAIAnalyticsPropertiesStore propertyRecordForTrackingId:] (GAIAnalyticsPropertiesStore.m:464): Record for tracking id my_tracking_id not found
2015-06-15 19:00:51.640 my_app[2540:113791] VERBOSE: GoogleAnalytics 3.12 -[GAIBatchingDispatcher persist:] 

I want to know if Google Analytics is causing the crash or something else that is triggering the crash. The API calls are fine and other parts of the app are working fine.

EDIT Additonal stacktrace

*** Terminating app due to uncaught exception 'NSRangeException', reason: '*** -[__NSArrayI objectAtIndex:]: index 0 beyond bounds for empty array'
*** First throw call stack:
(
    0   CoreFoundation                      0x000000010656cc65 __exceptionPreprocess + 165
    1   libobjc.A.dylib                     0x0000000106205bb7 objc_exception_throw + 45
    2   CoreFoundation                      0x000000010646317e -[__NSArrayI objectAtIndex:] + 190
    3   my_app                            0x0000000105396095 -[PromotionDetailViewController tableView:cellForRowAtIndexPath:] + 4213
    4   UIKit                               0x00000001076faa28 -[UITableView _createPreparedCellForGlobalRow:withIndexPath:willDisplay:] + 508
    5   UIKit                               0x00000001076d9248 -[UITableView _updateVisibleCellsNow:isRecursive:] + 2853
    6   UIKit                               0x00000001076ef8a9 -[UITableView layoutSubviews] + 210
    7   UIKit                               0x0000000107679a2b -[UIView(CALayerDelegate) layoutSublayersOfLayer:] + 536
    8   QuartzCore                          0x00000001073d1ec2 -[CALayer layoutSublayers] + 146
    9   QuartzCore                          0x00000001073c66d6 _ZN2CA5Layer16layout_if_neededEPNS_11TransactionE + 380
    10  QuartzCore                          0x00000001073c6546 _ZN2CA5Layer28layout_and_display_if_neededEPNS_11TransactionE + 24
    11  QuartzCore                          0x0000000107332886 _ZN2CA7Context18commit_transactionEPNS_11TransactionE + 242
    12  QuartzCore                          0x0000000107333a3a _ZN2CA11Transaction6commitEv + 462
    13  QuartzCore                          0x00000001073340eb _ZN2CA11Transaction17observer_callbackEP19__CFRunLoopObservermPv + 89
    14  CoreFoundation                      0x000000010649fca7 __CFRUNLOOP_IS_CALLING_OUT_TO_AN_OBSERVER_CALLBACK_FUNCTION__ + 23
    15  CoreFoundation                      0x000000010649fc00 __CFRunLoopDoObservers + 368
    16  CoreFoundation                      0x0000000106495a33 __CFRunLoopRun + 1123
    17  CoreFoundation                      0x0000000106495366 CFRunLoopRunSpecific + 470
    18  GraphicsServices                    0x0000000109f4ca3e GSEventRunModal + 161
    19  UIKit                               0x00000001075f9900 UIApplicationMain + 1282
    20  my_app                            0x00000001053de35f main + 111
    21  libdyld.dylib                       0x0000000108a15145 start + 1
)
libc++abi.dylib: terminating with uncaught exception of type NSException

解决方案

Just ran into a similar issue, and have concluded that it is not Google Analytics causing the crash. Google Analytics is just merely wrapping around another crash for reporting purposes.

If you change the following setting in your App Delegate's didFinishLaunchingWithOptions: (or other location), the crash will appear as a normal error in the XCode console:

GAI *gai = [GAI sharedInstance]; gai.trackUncaughtExceptions = NO;

这篇关于Google Analytics(分析)3.12在iOS上崩溃的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
相关文章
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆