Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

iOS crash, EXC_BREAKPOINT, No clue with Xcode 6.1

I am usually able to solve the crashes but here I have not clue from where it comes from.

I use parse, and I am simply doing a request in background with a completion block. The app crashes at a simple if condition and I can barely identify anything, no way to print description, ... Do you have any idea ? A starting point ? anything ? Xcode 6.1 is really strange, it seems that the debugger is buggy.

Here is the log of the crash :

    Thread 0 name:  Dispatch queue: com.apple.main-thread
Thread 0 Crashed:
0   libsystem_kernel.dylib          0x000000019657a964 __kill + 8
1   MyAPP                           0x00000001001f2b70 0x10009c000 + 1403760
2   libsystem_platform.dylib        0x0000000196610958 _sigtramp + 64
3   MyAPP                           0x00000001001318cc 0x10009c000 + 612556
4   MyAPP                           0x000000010013797c 0x10009c000 + 637308
5   MyAPP                           0x0000000100135fc4 0x10009c000 + 630724
6   MyAPP                           0x00000001002e408c 0x10009c000 + 2392204
7   MyAPP                           0x00000001001dbf78 0x10009c000 + 1310584
8   libdispatch.dylib               0x00000001964393a8 _dispatch_call_block_and_release + 20
9   libdispatch.dylib               0x0000000196439368 _dispatch_client_callout + 12
10  libdispatch.dylib               0x000000019643d97c _dispatch_main_queue_callback_4CF + 928
11  CoreFoundation                  0x000000018566d69c __CFRUNLOOP_IS_SERVICING_THE_MAIN_DISPATCH_QUEUE__ + 8
12  CoreFoundation                  0x000000018566b744 __CFRunLoopRun + 1488
13  CoreFoundation                  0x00000001855991f0 CFRunLoopRunSpecific + 392
14  GraphicsServices                0x000000018e7275a0 GSEventRunModal + 164
15  UIKit                           0x0000000189eca780 UIApplicationMain + 1484
16  Shuff                           0x0000000100129474 0x10009c000 + 578676
17  libdyld.dylib                   0x0000000196462a04 start + 0

And here is a sample of the iOS code :

var query = PFQuery(className: "_User")
query.whereKey("facebookId", containedIn: ids)

query.findObjectsInBackgroundWithBlock(){
    results, error in
        if var resultsvar = results? {
              self.functionToCall(resultsvar)
         }
 }

and the functionToCall crashes.

Maybe this can help :

0 0x00000001001679c8 in specialization of Swift._ArrayBuffer._nonNative.getter : Swift.Optional [inlined] ()

like image 989
Devous Avatar asked Oct 26 '14 13:10

Devous


1 Answers

Yes !!! The debugger is not working well ! I was able to find the correct lines by doing the following : put a breakpoint at the start of where you think the app crashes, go step by step, remember the lowest line you've gone through. Even if the debugger crashes on another the line, the line you are looking for is probably the lowest one.

like image 94
Devous Avatar answered Sep 18 '22 20:09

Devous