【问题标题】:iOS App crashes in Archive Build but not Release/RuniOS 应用程序在存档构建中崩溃但不是发布/运行
【发布时间】:2011-12-19 01:51:50
【问题描述】:

从归档构建运行时,我从我的应用程序中收到以下崩溃日志

0 AllPaste 0x000a16c1 AllPaste + 108225
1 AllPaste 0x000a1ad7 AllPaste + 109271
2 libsystem_c.dylib 0x38215539 _sigtramp + 48
3 CoreData 0x37321921 -[_PFManagedObjectReferenceQueue _processReferenceQueue:] + 940
4 CoreData 0x3737fd0f -[NSManagedObjectContext(_NSInternalChangeProcessing) _processRecentChanges:] + 3046
5 CoreData 0x3730975d -[NSManagedObjectContext executeFetchRequest:error:] + 452
6 CoreData 0x373e5e51 -[NSFetchedResultsController performFetch:] + 540
7 AllPaste 0x000953e7 AllPaste + 58343
8 AllPaste 0x00095f09 AllPaste + 61193
9 AllPaste 0x000924c3 AllPaste + 46275
10 UIKit 0x31e436b5 -[UIViewController _setViewAppearState:isAnimating:] + 144
11 UIKit 0x31e438c1 -[UINavigationController viewWillAppear:] + 288
12 UIKit 0x31e436b5 -[UIViewController _setViewAppearState:isAnimating:] + 144
13 UIKit 0x31e9d1f3 -[UITabBarController viewWillAppear:] + 210
14 UIKit 0x31e436b5 -[UIViewController _setViewAppearState:isAnimating:] + 144
15 UIKit 0x31e9e61b -[UIViewController beginAppearanceTransition:animated:] + 190
16 UIKit 0x31ee4691 -[UIWindowController transition:fromViewController:toViewController:target:didEndSelector:] + 4076
17 UIKit 0x31f3e461 -[UIViewController _dismissViewControllerWithTransition:from:completion:] + 1732
18 UIKit 0x31ea1af1 -[UIViewController dismissViewControllerWithTransition:completion:] + 756
19 UIKit 0x31ea1af1 -[UIViewController dismissViewControllerWithTransition:completion:] + 756
20 AllPaste 0x0008a9eb AllPaste + 14827
21 CoreFoundation 0x37183435 -[NSObject performSelector:withObject:withObject:] + 52
22 UIKit 0x31e1c9eb -[UIApplication sendAction:to:from:forEvent:] + 62
23 UIKit 0x31ee23cf -[UIBarButtonItem(UIInternal) _sendAction:withEvent:] + 118
24 CoreFoundation 0x37183435 -[NSObject performSelector:withObject:withObject:] + 52
25 UIKit 0x31e1c9eb -[UIApplication sendAction:to:from:forEvent:] + 62
26 UIKit 0x31e1c9a7 -[UIApplication sendAction:toTarget:fromSender:forEvent:] + 30
27 UIKit 0x31e1c985 -[UIControl sendAction:to:forEvent:] + 44
28 UIKit 0x31e1c6f5 -[UIControl(Internal) _sendActionsForEvents:withEvent:] + 492
29 UIKit 0x31e1d02d -[UIControl touchesEnded:withEvent:] + 476
30 UIKit 0x31e1b50f -[UIWindow _sendTouchesForEvent:] + 318
31 UIKit 0x31e1af01 -[UIWindow sendEvent:] + 380
32 UIKit 0x31e014ed -[UIApplication sendEvent:] + 356
33 UIKit 0x31e00d2d _UIApplicationHandleEvent + 5808
34 GraphicsServices 0x32e5be13 PurpleEventCallback + 882
35 CoreFoundation 0x371fd553 __CFRUNLOOP_IS_CALLING_OUT_TO_A_SOURCE1_PERFORM_FUNCTION__ + 38
36 CoreFoundation 0x371fd4f5 __CFRunLoopDoSource1 + 140
37 CoreFoundation 0x371fc343 __CFRunLoopRun + 1370
38 CoreFoundation 0x3717f4dd CFRunLoopRunSpecific + 300
39 CoreFoundation 0x3717f3a5 CFRunLoopRunInMode + 104
40 GraphicsServices 0x32e5afed GSEventRunModal + 156
41 UIKit 0x31e2f743 UIApplicationMain + 1090
42 AllPaste 0x00088e97 AllPaste + 7831
43 AllPaste 0x00088e50 AllPaste + 7760`

这仅在我存档和安装应用程序时发生,但在我通过 Xcode 运行它时不会发生,但两者都使用相同的 Ad Hoc 构建配置。

有谁知道为什么会发生这种情况,或者可以从日志中识别出我的错误吗?

【问题讨论】:

  • “归档构建”是什么意思?你有用于构建的 .xcarchive 吗?你在哪里阅读崩溃日志/从哪里复制出来?

标签: ios xcode cocoa-touch core-data uikit


【解决方案1】:

事实证明,在项目的早期我启用了僵尸并忘记了它。因此,当我在我的设备上运行模拟器并进行测试时,它没有检测到释放的对象。但是当我归档构建然后通过管理器将其共享到 ipa 时,我失去了启用的僵尸(当然)并且它没有更新表并抛出我的错误。

【讨论】:

    【解决方案2】:

    看起来您在使用 Core Data 时遇到了问题。您是否碰巧在更新的应用程序上更改了数据模型,并在设备上使用了旧版本的数据模型?崩溃可能是数据模型不一致的结果。如果是这种情况,您将需要从旧模型迁移到新模型。

    【讨论】:

    • 谢谢,我发现了问题,它与 Core-Data 相关,但问题是插入新条目时我没有更新表。
    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2020-02-01
    • 1970-01-01
    • 2012-04-15
    • 1970-01-01
    相关资源
    最近更新 更多