TheOS纯程式码撰写tableView在滑动scroll的时候瞬间app崩溃,求救

大大请帮帮忙,我使用TheOS开发我的越狱应用程序。 这是我以编程方式的表视图代码,我几乎做了最简单的方法来实现表视图方法。 表视图将正确显示默认表数据,但是当我滚动表视图时应用程序将崩溃。 我的错误日志没有显示任何明显的日志。 请帮助我,我真的找不到在滚动视图时立即崩溃的原因。

而且奇怪的事,我将程式码放在xcode执行跑在实体机,不会崩溃,但是用theos生成的专桉在同样的程式码下就会崩溃。

#import "DeviceInfoTableViewController.h"

@interface DeviceInfoTableViewController ()

@end

@implementation DeviceInfoTableViewController
{
    NSArray *tableData;
}

- (void)loadView {
    [super loadView];
    self.title = @"Table View Controller";
}

- (void)viewDidLoad {
    [super viewDidLoad];

    // Initialize table data
    tableData = [NSArray arrayWithObjects:@"Egg Benedict", @"Mushroom Risotto", @"Full Breakfast", @"Hamburger", @"Ham and Egg Sandwich", @"Creme Brelee", @"White Chocolate Donut", @"Starbucks Coffee", @"Vegetable Curry", @"Instant Noodle with Egg", @"Noodle with BBQ Pork", @"Japanese Noodle with Pork", @"Green Tea", @"Thai Shrimp Cake", @"Angry Birds Cake", @"Ham and Cheese Panini", nil];
}

- (void)didReceiveMemoryWarning {
    [super didReceiveMemoryWarning];
    // Dispose of any resources that can be recreated.
}

#pragma mark - Table view data source

- (NSInteger)numberOfSectionsInTableView:(UITableView *)tableView {
    return 1;
}

- (NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section {
    NSLog(@"the tableData count: %ld", (unsigned long)tableData.count);
    return tableData.count;
}

- (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath {
    static NSString *CellIdentifier = @"Cell";
    UITableViewCell *cell = [tableView dequeueReusableCellWithIdentifier:CellIdentifier];

    if (!cell) {
        cell = [[[UITableViewCell alloc] initWithStyle:UITableViewCellStyleDefault reuseIdentifier:CellIdentifier] autorelease];
    }

    NSString *str = tableData[indexPath.row];
    cell.textLabel.text = str;
    return cell;
}

#pragma mark - Table view delegate

// In a xib-based application, navigation from a table can be handled in -tableView:didSelectRowAtIndexPath:
- (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath {

    [tableView deselectRowAtIndexPath:indexPath animated:YES];

}

@end

我也去查过ips崩溃报告,但没有显示任何有用的信息。syslog的错误讯息如下:

Oct  3 16:18:51: --- last message repeated 2 times ---
Oct  3 16:18:51 iPhone ReportCrash[3617]: MS:Notice: Injecting: (null) [ReportCrash] (1141.16)
Oct  3 16:18:51 iPhone ReportCrash[3617]: MS:Notice: Loading: /Library/MobileSubstrate/DynamicLibraries/0MobileGestaltFaker.dylib
Oct  3 16:18:51 iPhone ReportCrash[3617]: MS:Error: binary does not support this cpu type
Oct  3 16:18:51 iPhone ReportCrash[3617]: MS:Error: failure to check GoldPPServer.dylib
Oct  3 16:18:51 iPhone ReportCrash[3617]: MS:Notice: Loading: /Library/MobileSubstrate/DynamicLibraries/RocketBootstrap.dylib
Oct  3 16:18:51 iPhone ReportCrash[3617]: task_set_exception_ports(B07, 400, F03, 0, 0) failed with error (4: (os/kern) invalid argument)
Oct  3 16:18:51 iPhone ReportCrash[3617]: ReportCrash acting against PID 3614
Oct  3 16:18:51 iPhone ReportCrash[3617]: Formulating crash report for process testproject[3614]
Oct  3 16:18:51 iPhone com.apple.xpc.launchd[1] (UIKitApplication:com.zxx.testproject[0x6965][3614]): Service exited due to signal: Segmentation fault: 11
Oct  3 16:18:51 iPhone ReportCrash[3617]: Saved report to /Library/Logs/CrashReporter/testproject_2017-10-03-161851_iPhone.ips
Oct  3 16:18:51 iPhone SpringBoard[3524]: Application 'UIKitApplication:com.zxx.testproject[0x6965]' crashed.
Oct  3 16:18:51 iPhone assertiond[52]: pid_suspend failed for <BKNewProcess: 0x12fe2dfa0; com.zxx.testproject; pid: 3614; hostpid: -1>: Unknown error: -1, Unknown error: -1
Oct  3 16:18:51 iPhone assertiond[52]: Could not set priority of <BKNewProcess: 0x12fe2dfa0; com.zxx.testproject; pid: 3614; hostpid: -1> to 2, priority: No such process
Oct  3 16:18:51 iPhone assertiond[52]: Could not set priority of <BKNewProcess: 0x12fe2dfa0; com.zxx.testproject; pid: 3614; hostpid: -1> to 4096, priority: No such process
Oct  3 16:18:51 iPhone UserEventAgent[44]: id=com.zxx.testproject pid=3614, state=0
Oct  3 16:18:56 iPhone mstreamd[3606]: (Note ) mstreamd: Not monitoring for external power.
Oct  3 16:18:56 iPhone mstreamd[3606]: (Note ) PS: Media stream daemon stopping.
Oct  3 16:18:56 iPhone mstreamd[3606]: (Note ) AS: <MSIOSAlbumSharingDaemon: 0x145e74010>: Shared Streams daemon has shut down.
Oct  3 16:18:56 iPhone mstreamd[3606]: (Warn ) mstreamd: mstreamd shutting down.
Oct  3 16:18:56 iPhone mstreamd[3620]: MS:Notice: Injecting: com.apple.mediastream.mstreamd [mstreamd] (1141.16)
Oct  3 16:18:56 iPhone mstreamd[3620]: MS:Notice: Loading: /Library/MobileSubstrate/DynamicLibraries/0MobileGestaltFaker.dylib
Oct  3 16:18:56 iPhone mstreamd[3620]: MS:Error: binary does not support this cpu type
Oct  3 16:18:56 iPhone mstreamd[3620]: MS:Error: failure to check GoldPPServer.dylib
Oct  3 16:18:56 iPhone mstreamd[3620]: (Note ) mstreamd: mstreamd starting up.
Oct  3 16:18:56 iPhone mstreamd[3620]: (Note ) PS: Media stream daemon starting...
Oct  3 16:18:57 iPhone locationd[99]: Gesture EnabledForTopCLient: 0, EnabledInDaemonSettings: 0

我通过这种方式从另一个Root视图控制器调用这个tableView:

- (void)deviceInfoTap:(id)sender {
    DeviceInfoTableViewController *controller = [[DeviceInfoTableViewController alloc] init];
    [self.navigationController pushViewController:controller animated:YES];
}