So I've been developing my app (Gridle) on iOS and I always used to crash from time to time (only crashes on iOS, works perfectly in the IDE).
I'm pretty sure this is because of the database call in my code (no crashes when it's all commented out).
In the beginning I had direct mysql calls to my distant server, now I work with a SQLite cache database and URL calls for a php API running the MySQL queries and returning JSONs.
The crash logs were all looking like:
So I told myself, well, that's probably because the connexion to the SQLite DB isn't working well or something.. So I'll make try / catch statements around every single DB call, and write down the error in some debug field within the app.Exception Type: EXC_BAD_ACCESS (SIGSEGV)
Exception Subtype: KERN_INVALID_ADDRESS at 0x0000000000000006
Triggered by Thread: 0
Thread 0 name: Dispatch queue: com.apple.main-thread
Thread 0 Crashed:
0 CoreFoundation 0x29ca3dc9 CFRelease + 21
1 CoreFoundation 0x29d38de1 __CFArrayReleaseValues + 181
2 CoreFoundation 0x29ca3fa1 CFRelease + 493
3 CoreFoundation 0x29d61a6d __CFRunLoopRun + 1445
4 CoreFoundation 0x29caf3bd CFRunLoopRunSpecific + 473
5 CoreFoundation 0x29caf1cf CFRunLoopRunInMode + 103
6 GraphicsServices 0x310670a5 GSEventRunModal + 133
7 UIKit 0x2d2bd7ad UIApplicationMain + 1437
8 Gridle 0x0027199d 0xdd000 + 1657245
9 Gridle 0x000e43a4 0xdd000 + 29604
....
Well, unfortunately, it keeps crashing, but now the crash reports look like this (I added the colors):
I feel really lost.Exception Type: EXC_BAD_ACCESS (SIGBUS)
Exception Subtype: KERN_PROTECTION_FAILURE at 0x000000019b28cec8
Triggered by Thread: 3
...
Thread 3 Crashed:
0 ??? 0x000000019b28cec8 0 + 6898110152
1 Gridle 0x00000001001cf580 0x10003c000 + 1652096
2 Gridle 0x00000001004431e8 0x10003c000 + 4223464
....
Anyone has a clue?
I can't have an app that keeps crashing on a regular basis..
Thanks!