ccgus / fmdb

A Cocoa / Objective-C wrapper around SQLite
Other
13.85k stars 2.77k forks source link

Crashing in xcode 12.3 + versions #814

Open nuwanga88 opened 3 years ago

nuwanga88 commented 3 years ago

App always getting crash in 12.3+ ipa. This is working on debug mode. But when I create a ipa or run as Release (ipa) version app always getting crash in below bold code line.

- (void)closeOpenResultSets {

    //Copy the set so we don't get mutation errors
    NSSet *openSetCopy = FMDBReturnAutoreleased([_openResultSets copy]);
    for (NSValue *rsInWrappedInATastyValueMeal in openSetCopy) {
        **FMResultSet *rs = (FMResultSet *)[rsInWrappedInATastyValueMeal pointerValue];**

        [rs setParentDB:nil];
        [rs close];

        [_openResultSets removeObject:rsInWrappedInATastyValueMeal];
    }

This is the result and I noticed openSetCopy has only NSObject only, but the element object is missing. (elements coming when run in debug mode) image

Anyone has faced this issue?

ccgus commented 3 years ago

Do you have a stack trace of where the crash happens, with all threads visible?