Warning: file_get_contents(/data/phpspider/zhask/data//catemap/9/ios/102.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
iOS Google Analytics在启动时随机崩溃_Ios_Crash_Google Analytics - Fatal编程技术网

iOS Google Analytics在启动时随机崩溃

iOS Google Analytics在启动时随机崩溃,ios,crash,google-analytics,Ios,Crash,Google Analytics,我遇到了一个随机的谷歌分析崩溃问题。 当我的应用程序启动并尝试初始化GANTracker时,会发生此问题。 它是随机发生的,很难复制。我想知道在实现GA initial的过程中,我是否遗漏了什么或者应该避免什么 这是我的GANTracker初始代码: #define GAKey @“UA-xxxxxx-x" static const NSInteger kGANDispatchPeriodSec = 10; [[GANTracker sharedTracker] startTrackerWit

我遇到了一个随机的谷歌分析崩溃问题。 当我的应用程序启动并尝试初始化GANTracker时,会发生此问题。 它是随机发生的,很难复制。我想知道在实现GA initial的过程中,我是否遗漏了什么或者应该避免什么

这是我的GANTracker初始代码:

#define GAKey @“UA-xxxxxx-x"

static const NSInteger kGANDispatchPeriodSec = 10;
[[GANTracker sharedTracker] startTrackerWithAccountID:GAKey
                                       dispatchPeriod:kGANDispatchPeriodSec
                                             delegate:nil];
当我启动这个程序时,我的代码正在使用该方法在另一个辅助线程中执行一些同步网络活动

[NSURLConnection sendSynchronousRequest:request returningResponse:nil error:nil]
这是事故日志,希望能有所帮助

-[GANTracker startTrackerWithAccountID:dispatchPeriod:delegate:]
-[GANPersistentEventStore init]
-[GANPersistentEventStore initWithPath:]
-[GANPersistentEventStore setupStatements]
-[NSAssertionHandler handleFailureInMethod:object:file:lineNumber:description:]
+[NSException raise:format:arguments:]

任何建议都将不胜感激

更新:根据谷歌的问题数据库,据称这在GANTracker的v1.4中已经修复: http://code.google.com/mobile/analytics/download.html


我在GANTracker启动时遇到相同的崩溃,出现以下两个错误之一:

NSInternalInconsistencyException:错误:无法准备select会话语句 NSInternalInconsistencyException:错误:无法准备更新时间戳语句

对断言的堆栈跟踪(与OP不同的方法):

在sqlite3\u prepare\u v2期间创建googleanalytics.sql文件时,它看起来像是一个未经处理的错误

这对于我在IOS4.3.3上的一些用户来说是重复出现的,对于IOS4.2.1来说也是随机出现的 我的调度周期与OP相同。无法在我自己的模拟器/设备上重新调度

我希望google analytics能够发布他们的源代码,以便在无法创建sqlite文件或prepare语句失败时添加一些错误处理

GA论坛上有一个帖子也有同样的错误:

使用sqlite3\u prepare\u v2时可能会出现同样的问题:

我也遇到了类似的崩溃:**由于未捕获的异常“nsInternalInconsistenceException”而终止应用程序,原因是:“错误:无法准备select custom\u var\u cache语句:1”将尝试在try-catch中包装,而不记录发生此错误的用户try/catch-wrap对我不起作用,这对你有用吗?仍然在ios5中看到这一崩溃,这增加了谷歌分析的问题跟踪崩溃:GANTracker IOS startTrackerWithAccountID需要sqlite3错误检查
- [GANTracker startTrackerWithAccountID:dispatchPeriod:delegate:]
- [GANPersistentEventStore init]
- [GANPersistentEventStore initWithPath:]
- [GANPersistentEventStore initializeSession]
- [NSAssertionHandler handleFailureInMethod:object:file:lineNumber:description:]