0
領域0.95.0在遷移後加載默認領域時有時會崩潰。這種情況很少發生,我們還沒有能夠在調試環境中重現它。我們使用Realm-Cocoa,但是從Swift端點調用。應用程序在遷移後加載默認領域時崩潰
var config = RLMRealmConfiguration.defaultConfiguration()
config.schemaVersion = 3
config.migrationBlock = { (migration, oldVersion) -> Void in
...
}
RLMRealmConfiguration.setDefaultConfiguration(config)
RLMRealm.defaultRealm()
這裏是回溯
0x100313ae0 [void realm::util terminate<unsigned long, unsigned long>(char const*, char const*, long, unsigned long, unsigned long) ] (terminate.hpp:45)
...
...
0x10030c44c [realm::SharedGroup SharedGroup(realm::Replication&, realm::SharedGroup::DurabilityLevel, char const*) ] (group_shared.hpp:975)
0x1003073a0 [RLMRealm initWithPath:key:readOnly:inMemory:dynamic:error:] (RLMRealm.mm:235)
0x10030821c [RLMRealm realmWithConfiguration:error:] (RLMRealm.mm:400)
0x100307a98 [RLMRealm defaultRealm] (RLMRealm.mm:302)
...
有什麼我們可以做,以防止此崩潰?是否需要按照問題#1589將遷移函數包裝在autoreleasepool塊中?