当我尝试使用游戏中心创建重赛时,EXC_BREAKPOINT崩溃

时间:2015-08-28 13:04:53

标签: ios swift game-center

我从我的用户那里收到此崩溃报告。我无法重现它,因此只有少数设备出现此问题。


    Thread : Crashed: com.apple.main-thread
    0  MY_PROJECT                     0x00089fb8 static MY_PROJECT.GCHelper.rematch (MY_PROJECT.GCHelper.Type)(Swift.ImplicitlyUnwrappedOptional) -> () (GCHelper.swift:156)
    1  libobjc.A.dylib                0x37624a37 objc_object::sidetable_retain() + 82
    2  MY_PROJECT                     0x000403f0 MY_PROJECT.GameScene.ButtonFunction (MY_PROJECT.GameScene)() -> () (GameScene.swift:727)
    3  MY_PROJECT                     0x00052ae0 function signature specialization  of MY_PROJECT.GameScene.touchesEnded (MY_PROJECT.GameScene)(Swift.Set, withEvent : ObjectiveC.UIEvent) -> () (GameScene.swift:355)
    4  MY_PROJECT                     0x0003d7ac @objc MY_PROJECT.GameScene.touchesEnded (MY_PROJECT.GameScene)(Swift.Set, withEvent : ObjectiveC.UIEvent) -> () (GameScene.swift)
    5  SpriteKit                      0x2c668755 -[SKView touchesEnded:withEvent:] + 896
    6  UIKit                          0x2c7fc133 -[UIWindow _sendTouchesForEvent:] + 522
    7  UIKit                          0x2c7f5a41 -[UIWindow sendEvent:] + 540
    8  UIKit                          0x2c7cbc05 -[UIApplication sendEvent:] + 196
    9  UIKit                          0x2ca4231f _UIApplicationHandleEventFromQueueEvent + 14538
    10 UIKit                          0x2c7ca607 _UIApplicationHandleEventQueue + 1350
    11 CoreFoundation                 0x2915722f __CFRUNLOOP_IS_CALLING_OUT_TO_A_SOURCE0_PERFORM_FUNCTION__ + 14
    12 CoreFoundation                 0x29156643 __CFRunLoopDoSources0 + 222
    13 CoreFoundation                 0x29154cc1 __CFRunLoopRun + 768
    14 CoreFoundation                 0x290a09a1 CFRunLoopRunSpecific + 476
    15 CoreFoundation                 0x290a07b3 CFRunLoopRunInMode + 106
    16 GraphicsServices               0x3085f1a9 GSEventRunModal + 136
    17 UIKit                          0x2c82b695 UIApplicationMain + 1440
    18 MY_PROJECT                     0x00086790 main (AppDelegate.swift:16)
    19 libdyld.dylib                  0x37bb2aaf start + 2

以下是我在GCHelper课程中的复赛功能。

"application/soap+xml"

这就是我在GameScene课程中调用rematch的方式。

private MimeHeaders parseMimeHeaders(InputStream inputStream) throws IOException {
    MimeHeaders mimeHeaders = new MimeHeaders();
    if (inputStream instanceof TransportInputStream) {
        TransportInputStream transportInputStream = (TransportInputStream) inputStream;
        for (Iterator<String> headerNames = transportInputStream.getHeaderNames(); headerNames.hasNext();) {
            String headerName = headerNames.next();
            for (Iterator<String> headerValues = transportInputStream.getHeaders(headerName); headerValues.hasNext();) {
                String headerValue = headerValues.next();
                StringTokenizer tokenizer = new StringTokenizer(headerValue, ",");
                while (tokenizer.hasMoreTokens()) {
                    if(headerName.equalsIgnoreCase(TransportConstants.HEADER_CONTENT_TYPE)) {
                        mimeHeaders.addHeader(headerName, "application/soap+xml");
                        tokenizer.nextToken();
                    } else {
                        mimeHeaders.addHeader(headerName, tokenizer.nextToken().trim());
                    }
                }
            }
        }
    }       

    return mimeHeaders;
}

我甚至不知道崩溃发生在哪一行。有人有什么想法吗?

0 个答案:

没有答案