I have a test to get the column name and other metadata info from SQLite3 db. When I call sqlite3_column_database_name(pStmt, 0); my app crashes. This only happens when using it in conjunction with SQLCipher. The crash log isn't so helpful (as almost always with libs and ios).
Incident Identifier: 445465AF-AE38-40BE-9FEF-875DD439197C
CrashReporter Key: 5108d3729725a56f2cc6f3faeb9a08313e134acf
Hardware Model: iPhone11,8
Process: MyTestApp [3910]
Path: /private/var/containers/Bundle/Application/457CA529-5F45-4B79-A1A7-71AF527F805D/MyTestApp.app/MyTestApp
Identifier: (myidentifer)
Version: 1 (1.0)
Code Type: ARM-64 (Native)
Role: Foreground
Parent Process: launchd [1]
Coalition: (myidentifier) [1234]
Date/Time: 2020-05-27 15:28:15.7582 -0300
Launch Time: 2020-05-27 15:28:09.4374 -0300
OS Version: iPhone OS 13.4.1 (17E262)
Release Type: User
Baseband Version: 2.05.13
Report Version: 104
Exception Type: EXC_BAD_ACCESS (SIGSEGV)
Exception Subtype: KERN_INVALID_ADDRESS at 0x000020a800000008 -> 0x0000002800000008 (possible pointer authentication failure)
VM Region Info: 0x2800000008 is not in any region. Bytes after previous region: 160524402697
REGION TYPE START - END [ VSIZE] PRT/MAX SHRMOD REGION DETAIL
MALLOC_NANO 0000000283b80000-00000002a0000000 [452.5M] rw-/rwx SM=ZER
--->
UNUSED SPACE AT END
I have problems with the device (iPhone XR 13.4.1) and simulator (iOS 13.4). I don't have older devices, but with simulator 11.4 and 12.9 I don't have the crash problem (although the method returns NULL, which is an expected result, according to sqlite3 docs, I do handle the null results appropriately).
My SQL statement is SELECT * FROM 'empInfo'. which has a working table with valid items.
Has anyone had any problem with SQLite3, SQLCipher, and ios13? Didn't found anything in SO or google...
If any more info help, just ask and I can add it.
Edit: I was able to reproduce the error in this project https://github.com/CarlinhaCamargo/SQLite3_crash_problem