2

嗨,我已经审查了一个 iOS 应用程序,但它刚刚被拒绝......我一直在尝试用 iOS 6.1.3 刺激我的 ipad,使其崩溃,如苹果所述:

当我们点击操作或选项按钮时,您的应用程序崩溃了。

但是我失败了,可以从下面的报告中读取崩溃的确切过程吗?我怀疑他们正在做一些非常疯狂的事情,你能告诉我崩溃是否与网络有关吗?或者他们是否一直在按下某个按钮?我自己找不到足够的信息:

象征性:

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

Last Exception Backtrace:
0   CoreFoundation                  0x32b0629e __exceptionPreprocess + 158
1   libobjc.A.dylib                 0x3a9aa97a objc_exception_throw + 26
2   CoreFoundation                  0x32b061c0 +[NSException raise:format:] + 100
3   UIKit                           0x34aab56c -[UINib instantiateWithOwner:options:] + 1632
4   UIKit                           0x34aaab96 -[UIViewController _loadViewFromNibNamed:bundle:] + 230
5   UIKit                           0x349a3038 -[UIViewController loadView] + 88
6   UIKit                           0x3492d468 -[UIViewController loadViewIfRequired] + 64
7   CodeFriend                      0x0000fb14 -[ThemesPopOverViewController initWithNibName:bundle:] (ThemesPopOverViewController.m:24)
8   CodeFriend                      0x0000e21a -[AppDelegate settingAct:] (AppDelegate.m:127)
9   UIKit                           0x349f90c0 -[UIApplication sendAction:to:from:forEvent:] + 68
10  UIKit                           0x349f9072 -[UIApplication sendAction:toTarget:fromSender:forEvent:] + 26
11  UIKit                           0x349f9050 -[UIControl sendAction:to:forEvent:] + 40
12  UIKit                           0x349f8906 -[UIControl(Internal) _sendActionsForEvents:withEvent:] + 498
13  UIKit                           0x349f8dfc -[UIControl touchesEnded:withEvent:] + 484
14  UIKit                           0x349215ec -[UIWindow _sendTouchesForEvent:] + 520
15  UIKit                           0x3490e7fc -[UIApplication sendEvent:] + 376
16  UIKit                           0x3490e116 _UIApplicationHandleEvent + 6150
17  GraphicsServices                0x3660259e _PurpleEventCallback + 586
18  GraphicsServices                0x366021ce PurpleEventCallback + 30
19  CoreFoundation                  0x32adb16e __CFRUNLOOP_IS_CALLING_OUT_TO_A_SOURCE1_PERFORM_FUNCTION__ + 30
20  CoreFoundation                  0x32adb112 __CFRunLoopDoSource1 + 134
21  CoreFoundation                  0x32ad9f94 __CFRunLoopRun + 1380
22  CoreFoundation                  0x32a4ceb8 CFRunLoopRunSpecific + 352
23  CoreFoundation                  0x32a4cd44 0x32a44000 + 36164
24  GraphicsServices                0x366012e6 GSEventRunModal + 70
25  UIKit                           0x349622fc UIApplicationMain + 1116
26  CodeFriend                      0x0000d3b6 main (main.m:16)
27  libdyld.dylib                   0x3ade1b1c start + 0


Thread 0 name:  Dispatch queue: com.apple.main-thread
Thread 0 Crashed:
0   libsystem_kernel.dylib          0x3aea8350 __pthread_kill + 8
1   libsystem_c.dylib               0x3ae1f11e pthread_kill + 54
2   libsystem_c.dylib               0x3ae5b96e abort + 90
3   libc++abi.dylib                 0x3a3f9d4a abort_message + 70
4   libc++abi.dylib                 0x3a3f6ff4 default_terminate() + 20
5   libobjc.A.dylib                 0x3a9aaa74 _objc_terminate() + 144
6   libc++abi.dylib                 0x3a3f7078 safe_handler_caller(void (*)()) + 76
7   libc++abi.dylib                 0x3a3f7110 std::terminate() + 16
8   libc++abi.dylib                 0x3a3f8594 __cxa_rethrow + 84
9   libobjc.A.dylib                 0x3a9aa9cc objc_exception_rethrow + 8
10  CoreFoundation                  0x32a4cf1c CFRunLoopRunSpecific + 452
11  CoreFoundation                  0x32a4cd44 CFRunLoopRunInMode + 100
12  GraphicsServices                0x366012e6 GSEventRunModal + 70
13  UIKit                           0x349622fc UIApplicationMain + 1116
14  CodeFriend                      0x0000d3b6 main (main.m:16)
15  libdyld.dylib                   0x3ade1b1c start + 0

Thread 1:
0   libsystem_kernel.dylib          0x3aea8d98 __workq_kernreturn + 8
1   libsystem_c.dylib               0x3adf6cf6 _pthread_workq_return + 14
2   libsystem_c.dylib               0x3adf6a12 _pthread_wqthread + 362
3   libsystem_c.dylib               0x3adf68a0 start_wqthread + 4

Thread 2 name:  Dispatch queue: com.apple.libdispatch-manager
Thread 2:
0   libsystem_kernel.dylib          0x3ae98648 kevent64 + 24
1   libdispatch.dylib               0x3adc8974 _dispatch_mgr_invoke + 792
2   libdispatch.dylib               0x3adc8654 _dispatch_mgr_thread$VARIANT$mp + 32

Thread 3:
0   libsystem_kernel.dylib          0x3aea8d98 __workq_kernreturn + 8
1   libsystem_c.dylib               0x3adf6cf6 _pthread_workq_return + 14
2   libsystem_c.dylib               0x3adf6a12 _pthread_wqthread + 362
3   libsystem_c.dylib               0x3adf68a0 start_wqthread + 4

Thread 4 name:  WebThread
Thread 4:
0   libsystem_kernel.dylib          0x3ae97eb4 mach_msg_trap + 20
1   libsystem_kernel.dylib          0x3ae98048 mach_msg + 36
2   CoreFoundation                  0x32adb040 __CFRunLoopServiceMachPort + 124
3   CoreFoundation                  0x32ad9d9e __CFRunLoopRun + 878
4   CoreFoundation                  0x32a4ceb8 CFRunLoopRunSpecific + 352
5   CoreFoundation                  0x32a4cd44 CFRunLoopRunInMode + 100
6   WebCore                         0x38a3c500 RunWebThread(void*) + 440
7   libsystem_c.dylib               0x3ae0130e _pthread_start + 306
8   libsystem_c.dylib               0x3ae011d4 thread_start + 4

Thread 0 crashed with ARM Thread State (32-bit):
    r0: 0x00000000    r1: 0x00000000      r2: 0x00000000      r3: 0x3c99e534
    r4: 0x00000006    r5: 0x3c99eb88      r6: 0x1dda5554      r7: 0x2fdf7a14
    r8: 0x1dda5530    r9: 0x00000300     r10: 0x00000000     r11: 0x00000000
    ip: 0x00000148    sp: 0x2fdf7a08      lr: 0x3ae1f123      pc: 0x3aea8350
  cpsr: 0x00000010

所以继续:用于初始化 ThemesPopOverViewController 的代码是:

- (id)initWithNibName:(NSString *)nibNameOrNil bundle:(NSBundle *)nibBundleOrNil

    {
        self = [super initWithNibName:nibNameOrNil bundle:nibBundleOrNil];
        if (self) {


            self.tableView = [[UITableView alloc] initWithFrame:CGRectMake(20, 0, self.view.frame.size.width - 40, 350)];
            [self.tableView setBackgroundColor:[UIColor clearColor]];
            [self.tableView setDelegate:self];
            [self.tableView setDataSource:self];
            themes = [[NSArray alloc] initWithObjects:kRegexHighlightViewThemeArray];
            [self.view addSubview:self.tableView];
            int item = [themes indexOfObject:theDelegate.codeView.currentTheme];
            NSIndexPath *indexPath = [NSIndexPath indexPathForItem:item inSection:0];
            [self.tableView selectRowAtIndexPath:indexPath animated:YES scrollPosition:UITableViewScrollPositionNone];

        }

        return self;
    }

    - (void)viewDidLoad
    {
        [super viewDidLoad];

        // Do any additional setup after loading the view from its nib.
    }

实际上,我似乎即使从视图层次结构中删除了弹出框,上面的 init 方法完成的分配也会占用内存,它是 ARC,我是否需要在删除弹出框上方的某个地方将其设置为 nil?所以每次按下弹出框时,内存分配都会增加......

4

2 回答 2

3

最相关的信息是:

7   CodeFriend   0x0000fb14 -[ThemesPopOverViewController initWithNibName:bundle:] (ThemesPopOverViewController.m:24)

ThemesPopOverViewController正在从 nib 文件 (xib) 加载。这意味着您已经创建了一个ThemesPopOverViewController实例并且您是view第一次访问它(例如,通过显示它)。

6   UIKit        0x3492d468 -[UIViewController loadViewIfRequired] + 64
5   UIKit        0x349a3038 -[UIViewController loadView] + 88 
4   UIKit        0x34aaab96 -[UIViewController _loadViewFromNibNamed:bundle:] + 230

UIKit 调用的方法来加载视图

3   UIKit        0x34aab56c -[UINib instantiateWithOwner:options:] + 1632

这是实际加载的视图,并且所有者中的 IBOutlets 已连接。

您无法从堆栈跟踪中了解更多信息。我很确定这不是内存错误,由于以下行,甚至应该有描述性错误消息

2   CoreFoundation    0x32b061c0 +[NSException raise:format:] + 100

这绝对与连接无关。可能是无效的 nib (xib) 文件或无效的 IBOutlets。您确定所有 IBOutlet 都已正确合成吗?

我还将简要描述堆栈上的先前步骤:

16  UIKit       0x3490e116 _UIApplicationHandleEvent + 6150
15  UIKit       0x3490e7fc -[UIApplication sendEvent:] + 376
14  UIKit       0x349215ec -[UIWindow _sendTouchesForEvent:] + 520

应用程序正在处理点击(触摸事件)。事件被发送到一个窗口 ( UIWindow)。

13  UIKit       0x349f8dfc -[UIControl touchesEnded:withEvent:] + 484
12  UIKit       0x349f8906 -[UIControl(Internal) _sendActionsForEvents:withEvent:] + 498
11  UIKit       0x349f9050 -[UIControl sendAction:to:forEvent:] + 40

该事件是一个“修饰”事件(touchesEnded被调用),接收者是一个按钮(UIButton继承自UIControl)。然后按钮生成一个动作,可能UIControlTouchUpInside并发送它。

10  UIKit       0x349f9072 -[UIApplication sendAction:toTarget:fromSender:forEvent:] + 26
9   UIKit       0x349f90c0 -[UIApplication sendAction:to:from:forEvent:] + 68

应用程序将操作发送给侦听器。

8   CodeFriend  0x0000e21a -[AppDelegate settingAct:] (AppDelegate.m:127)

-(void)settingAct在您调用的方法AppDelegate被调用以响应该操作。从名字我可以推断出“设置”按钮被触摸了。该方法尝试创建一个控制器(弹出框?)并发生崩溃。

于 2013-06-07T21:07:20.153 回答
0

您需要通过将崩溃报告拖入 Xcode 管理器窗口来符号化它。如果你有你发送的构建的符号文件(它应该在你的应用程序存档的管理器中),Xcode 将向你显示应用程序崩溃时每个线程正在做什么的更多信息。

于 2013-06-07T19:49:27.733 回答