简体   繁体   中英

Symbolicating crash file in Xcode

I have a bug in my app that causes it to crash seemingly randomly on iOS 7.1.

I imported a related crash file from iTunes Connect into the Xcode Organizer > library > device logs and it gave me this output:

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

I have no idea how to use this though. How do I make sense of this?

My app delegate:

//
//  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

Well from the looks it looks like you were trying to write into a memory space that you shouldn't write to. Try turning on exception breakpoints, and re-create the events that caused the crash. But because this is a SIGSEGV and not a SIGABRT that may not work. Actually look at thread 0 . It was trying to raise an exception as well but couldn't do it in time.

After doing some research, it appears as though you're doing Open GL drawing while in the background, most likely without your knowledge. Make sure to stop all animations before moving to the background. To stop Open GL animations I think you can try invoking

glFinish() or [[CCDirector sharedDirector] pause]

to stop the animations and put these in your app delegate under applicationWillResignActive or put these in your own class and listen for changes in resign active by doing:

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

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM