iPhone:这个崩溃日志是什么意思?

发布于 2024-09-07 20:39:36 字数 4891 浏览 5 评论 0原文

我的应用程序崩溃了 - 不幸的是,它不可重现 - 这是我收到的崩溃日志,但我无法阅读任何对我有帮助的内容。也许你们中有人?真是太棒了...

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;
}

My app crashes - unfortunately, it's not reproducable - this is a crash log I got, but I cannot read anything that would help me. Perhaps someone of you? Would be reeeeeeeeally great...

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

here's the code for my "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;
}

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

梦在深巷 2024-09-14 20:39:36

您从底部到顶部读取堆栈。这是关键区域:

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 是 UIKit 试图为 UITableView 创建单元格。 1314 在您的代码中,可能是您的 tableView:cellForRowAtIndexPath: 方法。 12 是处理字符串的 Foundation 方法。

我会看一下您的 tableView:cellForRowAtIndexPath: 方法,看看您在字符串初始化方面可能做错了什么,或者发布您的方法供我们检查。

You read the stack from the bottom to the top. Here's the key area:

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

It looks like 15 is UIKit trying to create cells for a UITableView. 13 and 14 are in your code, likely your tableView:cellForRowAtIndexPath: method. 12 is a Foundation method dealing with strings.

I would take a look at your tableView:cellForRowAtIndexPath: method and see what you could be doing wrong with string initialization or post your method for us to examine.

司马昭之心 2024-09-14 20:39:36

信息不足。你被困住了。下次最好不要删除符号:)

无论如何,关键行是

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

Not enough information. You're stuck. Better not strip the symbols next time :)

Anyway, the key lines are

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

From #15 we know the error is in the -tableView:cellForRowAtIndexPath: method in one of your delegates, and from #12 we know the error is due to initializing a string. The only way -initWithString: will throw is when the input argument is nil. Check the custom function called from -tableView:cellForRowAtIndexPath: and ensure the string is not nil.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文