Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Crash when opening Realm DB table on debug #621

Open
nathandud opened this issue Aug 31, 2022 · 0 comments
Open

Crash when opening Realm DB table on debug #621

nathandud opened this issue Aug 31, 2022 · 0 comments
Labels

Comments

@nathandud
Copy link

nathandud commented Aug 31, 2022

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant