Closed georgbachmann closed 3 years ago
Hello @georgbachmann. Remember to provide all the information that was requested when you opened this issue (see https://github.com/groue/GRDB.swift/issues/new). This may help someone telling you how to symbolicate crash logs. Also please provide the crash message(s). It can also ring a bell to someone.
Oh... sorry... of course... forgot about that
Crash reason is: EXC_BAD_ACCESS KERN_INVALID_ADDRESS 0x000000000000005c
GRDB flavor(s): GRDB GRDB version: 4.14.0 Installation method: SPM Xcode version: Xcode 12.1 Swift version: 5.3 Platform(s) running GRDB: iOS macOS version running Xcode: macOS Catalina 10.15. 7
I might have a hint, that in my prepareDatabase statement I had a boolean column that I initialized with a default of "FALSE" which seems to work on newer iOS devices, but older iOS9&10?!? didn't like that ... not sure if that is the cause of my problem, but it might be...
Hmmm. I wonder if FALSE
is a literal that was accepted in older SQLite versions. Check with a simulator. Use 0
(zero) instead if you witness any error.
Yes, I think it didn't. Seems to work fine with iOS 11 and above (at least I don't have crashes on those devices...) Still having to fight a bit with the latest xcode to compile onto my super old iPad2 Test-Device to know for sure if this was the problem.
Ok... at least locally that doesn't make any change... no crash no matter if it's TRUE or 1, or FALSE or 0... @groue do you maybe have any other idea what might cause that issue? Do you know any other sqlite specific differences those oder iOS 9 & 10 versions might have? Or might it be some kind of slicing? Cause I need to explicitly add armv7 to my build architectures in order to be able to run on my test iPad...
It's also strange that my crashlogs say HIDDEN... any idea why that might be?
I'd love to upgrade the minimum version of my app to something like 11 or 12... but before I'd love to leave all others with a functioning app...
It's difficult to say. You can compare the SQLite versions your app has to support with the release notes:
I can say that GRDB does not generate SQL that is known to create problems with old SQLite versions. GRDB 4.14 claims to support iOS 9.0+. Actually, Xcode has long removed any way to run tests against iOS 9, but GRDB 4.14 was tested with Xcode 10.3 and iOS 10.3.1.
Of course, SQL run by apps themselves can not be controlled by GRDB. Take the FALSE
literal, for example, that lives in your app code: it was introduced in SQLite 3.23.0: http://sqlite.org/releaselog/3_23_0.html and iOS... 12.
Thanks for your help @groue and for the links! Quite useful! About the HIDDEN inside my crashlogs. Do you have any idea on those? Maybe those would bring me further...
It's also strange that my crashlogs say HIDDEN... any idea why that might be?
Nope. Solving this dsym issue looks like a priority - it could help solving this issue, but other crashes as well. Remember to tell the crash message as well. A stack trace rarely comes back alone.
Ah... shit... forgot that :)
It's EXC_BAD_ACCESS KERN_INVALID_ADDRESS 0x000000000000005c
I'll update my reply up there as well
And maybe one more question @groue if I may... I have one of the devices here that are crashing according to my logs. 100% of the time... But when I compile the app with Xcode onto the device, it's not happening. Also not in release mode. And also not when launching it then without debugger... Do you maybe have any idea on why that might be the case?
No! Focus on your dsyms so that you have as much information as possible when you try to solve those crashes!
But there's no setting to somehow get those SPM dsyms as well, right? I just also don't know why they aren't included... Anyway... thanks for your help and I'll keep you posted once I got to the bottom of this!
Bonjour @groue. I guess I "found" the problem. It was Apples Bitcoding. I now turned that off, and with no other change it's now working like it should... So i guess we can close this issue! Thanks for your fast help though 👍
Just in case someone else is reading this issue, I hit the same as @georgbachmann and the same solution worked. The GDRB database opening would cause a crash on iOS 9, when the app installed via TestFlight, but not if the app is installed directly. Switching the Enable Bitcode
build option to No
resolved the problem.
I am using GRDB via SwiftPackageManager and it seems as if I missed on how to get Xcode to properly generate dsym files for GRDB. Anyway... since I am using GRDB, I am seeing some crashes and they only seem to affect older devices running iOS 9 & 10. The crash seems to happen in
DatabaseQueue.init
.All I can see are logs that look like the following:
I know it's super hard for anybody to get any clue on what that could be. But maybe somebody has any idea on how I could get the whole thing to symbolicate properly (It's only readable until line 22 -> DatabaseQueue.init)? I don't have a devices that old to play with and reproduce it myself. But it seems to affect every old device all the time...