Xcode中的符号化崩溃文件

时间:2014-07-06 23:36:19

标签: ios xcode crash

我的应用中有一个错误导致它在iOS 7.1上随机崩溃。

我将相关的崩溃文件从iTunes Connect导入Xcode Organizer>库>设备日志,它给了我这个输出:

Exception Type:  EXC_CRASH (SIGSEGV)
    Exception Codes: 0x0000000000000000, 0x0000000000000000
    Triggered by Thread:  1

    Thread 0:
    0   libGPUSupportMercury.dylib      0x339da8f6 gpus_ReturnNotPermittedKillClient + 10
    1   libGPUSupportMercury.dylib      0x339db38c gpusSubmitDataBuffers + 100
    2   IMGSGX543GLDriver               0x2dc8886a SubmitPackets + 118
    3   GLEngine                        0x311959fe gliPresentViewES_Exec + 170
    4   GLEngine                        0x3119590a gliPresentViewES + 130
    5   OpenGLES                        0x311a00ca -[EAGLContext presentRenderbuffer:] + 62
    6   SpriteKit                       0x3161018c -[SKView _renderContent] + 1212
    7   libdispatch.dylib               0x39c5f81c _dispatch_client_callout + 20
    8   libdispatch.dylib               0x39c657c6 _dispatch_barrier_sync_f_invoke + 22
    9   SpriteKit                       0x3160fc9e -[SKView renderContent] + 78
    10  SpriteKit                       0x3160d62e __29-[SKView setUpRenderCallback]_block_invoke + 126
    11  SpriteKit                       0x316300e8 -[SKDisplayLink _callbackForNextFrame:] + 252
    12  QuartzCore                      0x313e6dee CA::Display::DisplayLinkItem::dispatch() + 94
    13  QuartzCore                      0x313e6b98 CA::Display::DisplayLink::dispatch_items(unsigned long long, unsigned long long,  


    Thread 1 Crashed:
    0   libsystem_kernel.dylib          0x39d27808 kevent64 + 24
    1   libdispatch.dylib               0x39c68d3a _dispatch_kq_update + 186
    2   libdispatch.dylib               0x39c6c636 _dispatch_timers_program + 246
    3   libdispatch.dylib               0x39c69022 _dispatch_mgr_invoke + 142
    4   libdispatch.dylib               0x39c68dfe _dispatch_mgr_thread$VARIANT$mp + 34

我不知道如何使用它。我怎么理解这个?

我的应用代表:

//
//  AppDelegate.m
//  Dot Magnet
//
//  Created by Max Hudson on 4/18/14.
//  Copyright (c) 2014 Max Hudson. All rights reserved.
//

#import "AppDelegate.h"
#import "ViewController.h"
#import "TestFlight.h"
#import "Flurry.h"
#import "MKiCloudSync.h"

@implementation AppDelegate

- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions
{
    //[TestFlight takeOff:@"myapikey"];

    [Flurry startSession:@"myapikey"];
    [Flurry setCrashReportingEnabled:YES];

    [MKiCloudSync start];

    return YES;
}

-(SKView*)getSKViewSubview{
    for (UIView* s in self.window.rootViewController.view.subviews) {
        if ([s isKindOfClass:[SKView class]]) {
            return (SKView*)s;
        }
    }
    return nil;
}

- (void)applicationWillResignActive:(UIApplication *)application {
    SKView* view = [self getSKViewSubview];

    if (view) {
        view.paused = YES;
    }
}

- (void)applicationDidBecomeActive:(UIApplication *)application
{
    SKView* view = [self getSKViewSubview];

    if (view) {
        view.paused = NO;
    }

}

@end

1 个答案:

答案 0 :(得分:0)

从外观上看,你似乎试图写入一个你不应该写入的内存空间。尝试打开异常断点,然后重新创建导致崩溃的事件。但是因为这是SIGSEGV而不是SIGABRT可能不起作用。实际上看一下线程0。它也试图提出异常,但不能及时做到。

在做了一些研究后,看起来好像你在后台进行Open GL绘图,很可能是在你不知情的情况下。确保在移动到后台之前停止所有动画。要停止Open GL动画,我认为您可以尝试调用

glFinish()[[CCDirector sharedDirector] pause]

停止动画并将这些动画放入applicationWillResignActive下的应用代理中,或将这些动画放入您自己的班级,并通过执行以下操作来监听辞职中的更改:

[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(appWillResignActive:) name:UIApplicationWillResignActiveNotification object:nil];