【问题标题】:Crash on updating app but not on fresh install更新应用程序时崩溃,但全新安装时没有
【发布时间】:2014-04-12 01:47:47
【问题描述】:

我收到报告称,当用户尝试更新我在应用商店中的应用时,该应用尝试使用新版本打开,但随后崩溃。重复此过程,直到用户从手机中删除该应用程序并进行全新安装。我已经掌握了其中一个崩溃日志,但是后面的跟踪让我几乎没有继续下去。

更新不应该像全新安装应用程序一样吗?更新如何导致崩溃但全新安装不会?以前版本中不应有可能导致崩溃的残留数据。

我看到另一个有类似问题的人:iOS crash log, backtrace not available

Exception Type:  EXC_CRASH (SIGABRT)
Exception Codes: 0x0000000000000000, 0x0000000000000000
Triggered by Thread:  0

Last Exception Backtrace:

0   CoreFoundation                  0x2e878efe _exceptionPreprocess + 126  
1   libobjc.A.dylib                 0x3900dce2 objc_exception_throw + 34  
2   Application                    0x0016bd6e 0xda000 + 597358  
3   Application                         0x0016ba16 0xda000 + 596502  
4   Application                         0x0019df38 0xda000 + 802616  
5   Application                         0x0019ddf8 0xda000 + 802296  
6   libdispatch.dylib               0x394f6d3a _dispatch_client_callout + 18  
7   libdispatch.dylib               0x394f796a dispatch_once_f + 42  
8   Application                         0x0019ddb6 0xda000 + 802230  
9   Application                         0x00199478 0xda000 + 783480  
10  Application                         0x0015cb38 0xda000 + 535352  
11  Application                         0x0015b70a 0xda000 + 530186  
12  UIKit                           0x31117cbc -[UIApplication   _handleDelegateCallbacksWithOptions:isSuspended:restoreState:] + 272  
13  UIKit                           0x3111760e -[UIApplication _callInitializationDelegatesForURL:payload:suspended:] + 1606  
14  UIKit                           0x31111cc4 -[UIApplication _runWithURL:payload:launchOrientation:statusBarStyle:statusBarHidden:] + 716  
15  UIKit                           0x310adc92 -[UIApplication handleEvent:withNewEvent:] + 3546  
16  UIKit                           0x310acdf4 -[UIApplication sendEvent:] + 68  
17  UIKit                           0x31111400 _UIApplicationHandleEvent + 612  
18  GraphicsServices                0x3371ab50 _PurpleEventCallback + 604  
19  GraphicsServices                0x3371a73a PurpleEventCallback + 30  
20  CoreFoundation                  0x2e84383a __CFRUNLOOP_IS_CALLING_OUT_TO_A_SOURCE1_PERFORM_FUNCTION__ + 30  
21  CoreFoundation                  0x2e8437d6 __CFRunLoopDoSource1 + 342  
22  CoreFoundation                  0x2e841fa2 __CFRunLoopRun + 1402  
23  CoreFoundation                  0x2e7ac7a4 CFRunLoopRunSpecific + 520  
24  CoreFoundation                  0x2e7ac586 CFRunLoopRunInMode + 102  
25  UIKit                           0x31110626 -[UIApplication _run] + 758  
26  UIKit                           0x3110b88c UIApplicationMain + 1132  
27  Application                         0x0013ecba 0xda000 + 412858  
28  libdyld.dylib                   0x3950bab2 tlv_initializer + 2  


Thread 0 Crashed:

0   libsystem_kernel.dylib          0x395c21f0 _pthread_kill + 8  
1   libsystem_pthread.dylib         0x3962a7b2 pthread_kill + 54  
2   libsystem_c.dylib               0x39572ff4 abort + 72  
3   libc++abi.dylib                 0x389c198a abort_message + 70  
4   libc++abi.dylib                 0x389da6e2 default_terminate_handler() + 250  
5   libobjc.A.dylib                 0x3900df7a _objc_terminate() + 190  
6   libc++abi.dylib                 0x389d81b0 std::_terminate(void (*)()) + 76  
7   libc++abi.dylib                 0x389d7a04 _cxa_throw + 112  
8   libobjc.A.dylib                 0x3900ddb6 objc_exception_throw + 246  
9   Application                         0x0016bd6e 0xda000 + 597358  
10  Application                         0x0016ba16 0xda000 + 596502  
11  Application                         0x0019df38 0xda000 + 802616  
12  Application                         0x0019ddf8 0xda000 + 802296  
13  libdispatch.dylib               0x394f6d3c _dispatch_client_callout + 20  
14  libdispatch.dylib               0x394f796a dispatch_once_f + 42  
15  Application                         0x0019ddb6 0xda000 + 802230  
16  Application                         0x00199478 0xda000 + 783480  
17  Application                         0x0015cb38 0xda000 + 535352  
18  Application                         0x0015b70a 0xda000 + 530186  
19  UIKit                           0x31117cbc -[UIApplication _handleDelegateCallbacksWithOptions:isSuspended:restoreState:] + 272  
20  UIKit                           0x3111760e -[UIApplication _callInitializationDelegatesForURL:payload:suspended:] + 1606  
21  UIKit                           0x31111cc4 -[UIApplication _runWithURL:payload:launchOrientation:statusBarStyle:statusBarHidden:] + 716  
22  UIKit                           0x310adc92 -[UIApplication handleEvent:withNewEvent:] + 3546  
23  UIKit                           0x310acdf4 -[UIApplication sendEvent:] + 68  
24  UIKit                           0x31111400 _UIApplicationHandleEvent + 612  
25  GraphicsServices                0x3371ab52 _PurpleEventCallback + 606  
26  GraphicsServices                0x3371a73a PurpleEventCallback + 30  
27  CoreFoundation                  0x2e84383c __CFRUNLOOP_IS_CALLING_OUT_TO_A_SOURCE1_PERFORM_FUNCTION__ + 32  
28  CoreFoundation                  0x2e8437d6 __CFRunLoopDoSource1 + 342  
29  CoreFoundation                  0x2e841fa2 __CFRunLoopRun + 1402  
30  CoreFoundation                  0x2e7ac7a4 CFRunLoopRunSpecific + 520  
31  CoreFoundation                  0x2e7ac586 CFRunLoopRunInMode + 102  
32  UIKit                           0x31110626 -[UIApplication _run] + 758  
33  UIKit                           0x3110b88c UIApplicationMain + 1132  
34  Application                         0x0013ecba 0xda000 + 412858  
35  libdyld.dylib                   0x3950bab4 start + 0  

【问题讨论】:

  • 您是否有机会使用 CoreData 并且您是否更改了模型?还要添加崩溃日志的任何信息,否则应该如何帮助您?
  • 1) 是的,有CoreData,是的,模型已经改变。但是如何防止在更新时发生崩溃? 2)我将编辑我的问题以涉及崩溃日志
  • “不应该有以前版本的残留数据”——这完全不正确!所有用户的数据,包括他们的NSUserDefaults 以及您放在 Documents 目录中的任何内容,都会从一个版本保存到另一个版本。

标签: ios


【解决方案1】:

【讨论】:

  • 哈!而已。我使用的是核心数据模型的第 8 版,并且在没有迁移的情况下对其进行了小改动。我假设更新就像全新安装一样。谢谢Solomiya,我不应该想到这一点。故事的寓意:永远不要假设:)
猜你喜欢
  • 1970-01-01
  • 2022-01-16
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 2015-03-24
  • 1970-01-01
  • 2014-07-01
相关资源
最近更新 更多