【问题标题】:Wierd thing, app works well on iphone 4s & ipad, but crashed on iphone 4奇怪的事情,应用程序在 iphone 4s 和 ipad 上运行良好,但在 iphone 4 上崩溃
【发布时间】:2012-08-11 06:14:06
【问题描述】:

我已将我的应用提交到 appstore 进行审核,但被拒绝如下:

我们发现您的应用在运行 iOS 5.1.1 的 iPhone 4 上崩溃,即 不符合 App Store 审核指南。你的应用 在 Wi-Fi 和蜂窝网络上启动时崩溃。

这是附加的崩溃日志:

Incident Identifier: 65E8D233-2F02-4545-85C9-74CA4A346051
CrashReporter Key:   5f5257827e93649c799893055b12d3d61c937314
Hardware Model:      iPhone3,1
Process:         iman360 [42785]
Path:            /var/mobile/Applications/EA2B491A-194D-4669-ADF7-721593D2B14F/iman360.app/iman360
Identifier:      iman360
Version:         ??? (???)
Code Type:       ARM (Native)
Parent Process:  launchd [1]
Date/Time:       2012-08-09 13:41:37.107 -0700
OS Version:      iPhone OS 5.1.1 (9B206)
Report Version:  104

Exception Type:  EXC_BAD_ACCESS (SIGSEGV)
Exception Codes: KERN_PROTECTION_FAILURE at 0x2fdfe6e0
Crashed Thread:  0

Thread 0 name:  Dispatch queue: com.apple.main-thread
Thread 0 Crashed:
0   ???                             0x2fdfe6e0 0 + 803202784
1   iman360                         0x00036ba2 -[ComicCatController     refreshWithActionHandlerExeced:] (ComicCatController.m:216)
2   iman360                         0x00036b0c -[ComicCatController refresh] (ComicCatController.m:207)
3   iman360                         0x0002e682 -[TabComicCityViewController showSegTabView:] (TabComicCityViewController.m:312)
4   iman360                         0x0002dcbc -[TabComicCityViewController segmentedViewValueChanged:] (TabComicCityViewController.m:96)
5   CoreFoundation                  0x372ee3f6 -[NSObject performSelector:withObject:withObject:] + 46
6   UIKit                           0x31083e00 -[UIApplication sendAction:to:from:forEvent:] + 56
7   UIKit                           0x31083dbc -[UIApplication sendAction:toTarget:fromSender:forEvent:] + 24
8   UIKit                           0x31083d9a -[UIControl sendAction:to:forEvent:] + 38
9   UIKit                           0x31083b0a -[UIControl(Internal) _sendActionsForEvents:withEvent:] + 486
10  iman360                         0x00019598 -[Iman360SegmentedView moveThumbToIndex:animate:] (Iman360SegmentedView.m:360)
11  iman360                         0x00017ab4 -[Iman360SegmentedView willMoveToSuperview:] (Iman360SegmentedView.m:117)
12  UIKit                           0x3106b502 -[UIView(Internal) _addSubview:positioned:relativeTo:] + 390
13  UIKit                           0x3106b370 -[UIView(Hierarchy) addSubview:] + 24
14  iman360                         0x0002d996 -[TabComicCityViewController viewDidLoad] (TabComicCityViewController.m:49)
15  UIKit                           0x310a1c84 -[UIViewController view] + 160
16  iman360                         0x0001c86a +[ViewControllerManager initGlobalContentBgImgForViewController:] (ViewControllerManager.m:43)
17  iman360                         0x0000422c -[Iman360ViewControllerBase init] (Iman360ViewControllerBase.m:25)
18  iman360                         0x0002b8ce -[IndexTabViewControllerBase initWithIndexViewController:] (IndexTabViewControllerBase.m:19)
19  iman360                         0x00004706 -[IndexViewController viewDidLoad] (IndexViewController.m:58)
20  UIKit                           0x310a1c84 -[UIViewController view] + 160
21  UIKit                           0x310a045a -[UIWindow addRootViewControllerViewIfPossible] + 38
22  UIKit                           0x31224774 -[UIWindow setRootViewController:] + 332
23  iman360                         0x0001c7da +[ViewControllerManager switchToViewController:] (ViewControllerManager.m:32)
24  iman360                         0x0001c60a -[LoadingViewController onBackgroundJobFinishedWithUpdateInfo:] (LoadingViewController.m:165)
25  CoreFoundation                  0x372f31f4 -[NSObject performSelector:withObject:] +   36
26  Foundation                      0x37c0e740 __NSThreadPerformPerform + 344
27  CoreFoundation                  0x37368acc __CFRUNLOOP_IS_CALLING_OUT_TO_A_SOURCE0_PERFORM_FUNCTION__ + 8
28  CoreFoundation                  0x37368298 __CFRunLoopDoSources0 + 208
29  CoreFoundation                  0x3736703e __CFRunLoopRun + 646
30  CoreFoundation                  0x372ea49e CFRunLoopRunSpecific + 294
31  CoreFoundation                  0x372ea366 CFRunLoopRunInMode + 98
32  GraphicsServices                0x33aa9432 GSEventRunModal + 130
33  UIKit                           0x31096cce UIApplicationMain + 1074
34  iman360                         0x00004d5c main (main.m:23)
35  iman360                         0x00002e60 0x1000 + 7776

Thread 0 crashed with ARM Thread State:
r0: 0x2fdfe6bc    r1: 0x2fdfe6bc      r2: 0x2fdfe6e0      r3: 0x00000000
r4: 0x0015d980    r5: 0x00000001      r6: 0x00059384      r7: 0x2fdfe6e0
r8: 0x00059388    r9: 0x0000000e     r10: 0x00153da0     r11: 0x314490ab
ip: 0x000249a1    sp: 0x2fdfe6e0      lr: 0x000249c1      pc: 0x2fdfe6e0
cpsr: 0x200f0010

但我已经在我的 iphone 4s 和 ipad 上对其进行了测试,它在那里运行良好。起初我以为我可能正在取消引用一个空指针,但 KERN_PROTECTION_FAILURE at 0x2fdfe6e0 表明事实并非如此。对此有什么想法吗?

【问题讨论】:

  • 你在 iPhone 4 模拟器上试过了吗?
  • iphone 4 模拟器?你的意思是IOS 4.3模拟器?我正在尝试在XCode->Preference->Download中安装ios模拟器,只找到IOS 4.3、IOS 5.0、IOS 5.1模拟器,我应该选择哪一个?
  • 选择 ios4.3 并尝试在那个模拟器上运行它:)
  • 好点。你的 4S 上运行的是 iOS 5.1.1 吗?如果这可行,那么理论上它应该可以在 iPhone 4 上运行。ARM 芯片的差异可能导致或至少揭示问题的可能性很小。要破译问题,这可能有用:stackoverflow.com/questions/1460892/…
  • 你能发布更多的崩溃日志吗?崩溃线程的堆栈帧,尤其是寄存器。从 cmets 看来,应用程序试图在违规地址执行代码,而不是取消引用对象成员。

标签: iphone crash app-store


【解决方案1】:

我做了一个静态代码分析,得到了一些东西。那是愚蠢的。我忘了用我的一些类初始化程序调用 [super init] 方法。但是有人可以帮忙分析一下这是否是问题所在吗?不确定这是否是问题所在,因为该应用仍在 appstore 审核中。

幸运的是,我的应用这次通过了。这是因为我没有为我的自定义类对象初始化调用[super init]。我只是很好奇为什么会发生这种情况,它有时效果很好。

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多