2010-07-02 196 views
0

我的应用程序崩溃 - 不幸的是,它不可重现 - 这是我得到的崩溃日志,但我无法读取任何有助于我的内容。也许你是某个人?将reeeeeeeeally伟大的...iPhone:这个Crash Log是什么意思?

0 libSystem.B.dylib    0x00088c24 __kill + 8 
1 libSystem.B.dylib    0x00088c12 kill + 4 
2 libSystem.B.dylib    0x00088c06 raise + 10 
3 libSystem.B.dylib    0x0009f902 abort + 54 
4 libstdc++.6.dylib    0x00065a00 __gnu_cxx::__verbose_terminate_handler() + 588 
5 libobjc.A.dylib     0x00007f1c _objc_terminate + 160 
6 libstdc++.6.dylib    0x00063100 __cxxabiv1::__terminate(void (*)()) + 76 
7 libstdc++.6.dylib    0x00063178 std::terminate() + 16 
8 libstdc++.6.dylib    0x000632a0 __cxa_throw + 100 
9 libobjc.A.dylib     0x00006504 objc_exception_throw + 104 
10 CoreFoundation     0x000a01c0 +[NSException raise:format:arguments:] + 64 
11 CoreFoundation     0x000a01f4 +[NSException raise:format:] + 24 
12 Foundation      0x0002cbc6 -[NSPlaceholderMutableString initWithString:] + 78 
13 here_my_app      0x0002c35e 0x1000 + 176990 
14 here_my_app      0x00029a6c 0x1000 + 166508 
15 UIKit       0x000a9248 -[UITableView(UITableViewInternal) _createPreparedCellForGlobalRow:withIndexPath:] + 644 
16 UIKit       0x000a8eac -[UITableView(UITableViewInternal) _createPreparedCellForGlobalRow:] + 44 
17 UIKit       0x0006f3b8 -[UITableView(_UITableViewPrivate) _updateVisibleCellsNow:] + 1100 
18 UIKit       0x0006ce40 -[UITableView layoutSubviews] + 200 
19 UIKit       0x00014ab0 -[UIView(CALayerDelegate) _layoutSublayersOfLayer:] + 32 
20 CoreFoundation     0x000285ba -[NSObject(NSObject) performSelector:withObject:] + 18 
21 QuartzCore      0x0000a61c -[CALayer layoutSublayers] + 176 
22 QuartzCore      0x0000a2a4 CALayerLayoutIfNeeded + 192 
23 QuartzCore      0x00009bb0 CA::Context::commit_transaction(CA::Transaction*) + 256 
24 QuartzCore      0x000097d8 CA::Transaction::commit() + 276 
25 QuartzCore      0x000119d8 CA::Transaction::observer_callback(__CFRunLoopObserver*, unsigned long, void*) + 80 
26 CoreFoundation     0x00074244 __CFRUNLOOP_IS_CALLING_OUT_TO_AN_OBSERVER_CALLBACK_FUNCTION__ + 12 
27 CoreFoundation     0x00075d9e __CFRunLoopDoObservers + 494 
28 CoreFoundation     0x000772f6 __CFRunLoopRun + 934 
29 CoreFoundation     0x0001e0bc CFRunLoopRunSpecific + 220 
30 CoreFoundation     0x0001dfca CFRunLoopRunInMode + 54 
31 GraphicsServices    0x00003f88 GSEventRunModal + 188 
32 UIKit       0x00007b40 -[UIApplication _run] + 564 
33 UIKit       0x00005fb8 UIApplicationMain + 964 
34 here_my_app      0x00002f52 0x1000 + 8018 
35 here_my_app      0x00002efc 0x1000 + 7932 

这里的代码为我“的cellForRowAtIndexPath”

- (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath { 

    static NSString *CellIdentifier = @"AbfahrtszeitResultTableCell"; 

    AbfahrtszeitResultTableCell *cell = (AbfahrtszeitResultTableCell *) [tableView dequeueReusableCellWithIdentifier:CellIdentifier]; 
    if (cell == nil) { 
     NSArray *topLevelObjects = [[NSBundle mainBundle] loadNibNamed:@"AbfahrtszeitResultTableCell" owner:nil options:nil]; 

     for (id currentObject in topLevelObjects) { 
      if ([currentObject isKindOfClass:[UITableViewCell class]]) { 
       cell = (AbfahrtszeitResultTableCell *) currentObject; 
       break; 
      } 
     } 

     // make cell not-selectable 
     cell.selectionStyle = UITableViewCellSelectionStyleNone; 

     // background color 
     BOOL day = [self isDayView]; 

     if (day) { 
      UIImageView *imageView = [[UIImageView alloc] initWithImage:[UIImage imageNamed:ABFAHRTSZEIT_RESULT_TABLE_CELL_BACKGROUND_IMAGE_RED]]; 
      cell.backgroundView = imageView; 
      [imageView release]; 
     } else { 
      UIImageView *imageView = [[UIImageView alloc] initWithImage:[UIImage imageNamed:ABFAHRTSZEIT_RESULT_TABLE_CELL_BACKGROUND_IMAGE_BLUE]]; 
      cell.backgroundView = imageView; 
      [imageView release]; 
     } 

     // text color 
     cell.textLabel.textColor = [UIColor whiteColor]; 
    } 

    // Set up the cell... 
    AbfahrtszeitResult *result = [abfahrten objectAtIndex:indexPath.row]; 
    cell.linienLabel.text = [TextUtil cleanUpString:result.linie]; 
    cell.zielLabel.text = [TextUtil cleanUpString:result.ziel]; 
    cell.zeitLabel.text = [TextUtil cleanUpString:result.zeit]; 

    return cell; 
} 

回答

1

你读从底部到顶部的堆栈。这里的关键领域:

12 Foundation      0x0002cbc6 -[NSPlaceholderMutableString initWithString:] + 78 
13 here_my_app      0x0002c35e 0x1000 + 176990 
14 here_my_app      0x00029a6c 0x1000 + 166508 
15 UIKit       0x000a9248 -[UITableView(UITableViewInternal) _createPreparedCellForGlobalRow:withIndexPath:] + 644 

它看起来像是UIKit中试图建立细胞一个UITableView。 和在您的代码中,可能是您的tableView:cellForRowAtIndexPath:方法。 是一个处理字符串的基础方法。

我会看看你的tableView:cellForRowAtIndexPath:方法,看看你可能做错了字符串初始化或发布你的方法供我们检查。

+0

我发布了检查的方法...我正在寻找这么长时间的错误,我想我只是无法找到解决方案:) – swalkner 2010-07-02 20:10:12

+1

错误可能发生在'TextUtil cleanUpString:'内部。运行一个测试来查看当你的'result'属性之一是'nil'时会发生什么。 – chrissr 2010-07-02 20:15:04

+0

这正是问题所在......非常感谢......现在我只“必须”了解何时该参数为零。 :) – swalkner 2010-07-02 20:19:29

1

没有足够的信息。你被卡住了。下一次:)

反正最好不要剥去符号,关键线

12 Foundation 0x0002cbc6 -[NSPlaceholderMutableString initWithString:] + 78 
13 here_my_app 0x0002c35e 0x1000 + 176990 
14 here_my_app 0x00029a6c 0x1000 + 166508 
15 UIKit   0x000a9248 -[UITableView(UITableViewInternal) _createPreparedCellForGlobalRow:withIndexPath:] + 644 

从#15,我们知道错误是在你的代表之一的-tableView:cellForRowAtIndexPath:方法,并从#12,我们知道该错误是由于初始化一个字符串。 -initWithString:将抛出的唯一方法是当输入参数是nil。检查从-tableView:cellForRowAtIndexPath:调用的自定义函数,并确保该字符串不是nil

+0

非常感谢您的回答......我没有去掉这些符号......我只是用“here_my_app”取代了我真正的应用程序名称......我现在怎么能在cellForRowAtIndexPath中使用哪个自定义函数? – swalkner 2010-07-02 20:09:36

+2

@swalkner:我怎么知道?也许你可以在“Find in Project”(Cmd + Shift + F)中找到'-initWithString:'。我想这是'+ [TextUtil cleanUpString:]'。 – kennytm 2010-07-02 20:11:26

+0

yeeeeees ...解决方案的近:)现在我只需要找出什么时候该参数是零...这只是不可重现...它可能与低内存有关吗? – swalkner 2010-07-02 20:18:23