-
Type: Bug
-
Resolution: Done
-
Priority: Major - P3
-
None
-
Affects Version/s: None
-
Component/s: None
Goals
Remove objects without crash
Expected Results
Remove objects without crash
Actual Results
Crash happened.
Crash Info
malloc: Heap corruption detected, free list is damaged at 0x280170540 *** Incorrect guard value: 0
Crashed: com.apple.root.default-qos SIGABRT ABORT 0x00000001beef695c Crashed: com.apple.root.default-qos 0 libsystem_kernel.dylib 0x1beef695c __pthread_kill + 8 1 libsystem_pthread.dylib 0x1da0c69e8 pthread_kill + 212 2 libsystem_c.dylib 0x19cfd3934 abort + 100 3 libsystem_malloc.dylib 0x1a2ca5030 _malloc_put + 554 4 libsystem_malloc.dylib 0x1a2ca52a4 malloc_zone_error + 100 5 libsystem_malloc.dylib 0x1a2ca52e0 nanov2_allocate_from_block$VARIANT$mp.cold.1 + 36 6 libsystem_malloc.dylib 0x1a2c8a428 nanov2_find_block_and_allocate$VARIANT$mp + 510 7 libsystem_malloc.dylib 0x1a2c896a0 nanov2_allocate$VARIANT$mp + 124 8 libsystem_malloc.dylib 0x1a2c895d4 nanov2_malloc$VARIANT$mp + 60 9 libsystem_malloc.dylib 0x1a2c9a9ac _malloc_zone_malloc + 144 10 libc++abi.dylib 0x1a7cf38b0 operator new(unsigned long) + 28 11 Realm 0x101ea6aec realm::GroupWriter::FreeList::move_free_in_file_to_size_map(std::__1::multimap<unsigned long, unsigned long, std::__1::less<unsigned long>, std::__1::allocator<std::__1::pair<unsigned long const, unsigned long> > >&) + 76 12 Realm 0x101ea5bfc realm::GroupWriter::read_in_freelist() + 1076 13 Realm 0x101ea4d28 realm::GroupWriter::write_group() + 64 14 Realm 0x101e9d458 realm::DB::low_level_commit(unsigned long long, realm::Transaction&) + 380 15 Realm 0x101e9d26c realm::DB::do_commit(realm::Transaction&) + 112 16 Realm 0x101e9d83c realm::Transaction::commit_and_continue_as_read() + 68 17 Realm 0x101bb9ab0 realm::_impl::RealmCoordinator::commit_write(realm::Realm&) + 1510 (vector:1510) 18 Realm 0x101c8f150 realm::Realm::commit_transaction() + 675 (shared_realm.cpp:675) 19 Realm 0x101c5d3a8 -[RLMRealm commitWriteTransactionWithoutNotifying:error:] + 698 (RLMRealm.mm:698) 20 APP 0x100f88b58 -[FakeClass deleteObjects] + 212 25 libdispatch.dylib 0x193f91298 _dispatch_call_block_and_release + 24 26 libdispatch.dylib 0x193f92280 _dispatch_client_callout + 16 27 libdispatch.dylib 0x193f44254 _dispatch_root_queue_drain + 688 28 libdispatch.dylib 0x193f448e4 _dispatch_worker_thread2 + 124 29 libsystem_pthread.dylib 0x1da0c7568 _pthread_wqthread + 212 30 libsystem_pthread.dylib 0x1da0ca874 start_wqthread + 8
Steps for others to Reproduce
<!--- What are steps OTHERS can follow to reproduce this issue? -->
Code Sample
// realmObject -> RLMObject casted to Class object // realm -> RLMRealm RLMResults *results = [realmObject objectsInRealm:realm withPredicate:predicate]; if (results != nil) { [realm beginWriteTransaction]; [realm deleteObjects:results]; [realm commitWriteTransaction]; }
Version of Realm and Tooling
Realm framework version: 5.5.0 , 5.3.6, 5.3.0
Xcode version: Xcode 11.7
iOS/OSX version: 13.6, 13.7, 14.0.1, 14.1.0
Dependency manager + version: Carthage 0.36