Crash when opening Realm DB table on debug
nathandud opened this issue · comments
Environment
- Platform+version: iOS 15.5
- FLEX version: 7.4.0
Bug Report
Opening a Realm database on a debug build causes a crash due to an NSParameterAssert
failure in FLEXTableContentViewController
seen here and copied below.
- (instancetype)initWithColumns:(NSArray<NSString *> *)columnNames
rows:(NSArray<NSArray<NSString *> *> *)rowData
rowIDs:(nullable NSArray<NSString *> *)rowIDs
tableName:(nullable NSString *)tableName
database:(nullable id<FLEXDatabaseManager>)databaseManager {
// Must supply all optional parameters as one, or none
BOOL all = rowIDs && tableName && databaseManager;
BOOL none = !rowIDs && !tableName && !databaseManager;
NSParameterAssert(all || none);
//....
}
When opening up a SQLLite database table, the databaseManager
points to null (and so do rowIDs
and tableName
) and the none
condition is satisfied. However when trying to open a Realm database table, the databaseManager
object pointer is not null and the assert fails. When I remove that assert, the code works as expected and I can view a Realm database.
I've tried to triage this issue myself to provide more a detailed report, but I'm getting some really unexpected behavior with the debugger.