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

Realm v0.98.4 crashes with an alignment exception when opening a Realm on 32-bit iOS devices #3321

Closed
andrew-skrypnyk opened this issue Mar 12, 2016 · 21 comments · Fixed by #3330
Assignees
Milestone

Comments

@andrew-skrypnyk
Copy link

Goals

just want to init Realm.

Expected Results

Realm must be initialized and ready to use.

Actual Results

without any errors to xcode console, app is crashed at this line:

group_shared.hpp

inline void SharedGroup::open(Replication& repl, DurabilityLevel durability,
                              const char* encryption_key, bool allow_file_format_upgrade)
810 line: 
do_open(file, no_create, durability, is_backend, encryption_key,
            allow_file_format_upgrade); // Throws

Steps

delete app from iphone.
clear cache.
build and run project to device.

Code Sample

let realm = try! Realm()

Version of Realm and Tooling

Xcode 7.2
Swift
iOS 8.0
Cocoapods with Realm 0.98.4

Also i trying build this project at iOS 9.2 and it builded without any errors.

realm

@andrew-skrypnyk
Copy link
Author

Cocoapods with Realm 0.98.3 - all build okey. It reproduced only at 0.98.4 and ios 8

@toriaezunama
Copy link

I also have the same issue since upgrading to 0.98.4
screen shot 2016-03-12 at 09 22 43

@bdash
Copy link
Contributor

bdash commented Mar 13, 2016

Am I correct in understanding that this issue appears to be specific to iOS 8.x, and doesn't occur with the same build of your app on an iOS 9.x device?

It'd be great if someone experiencing this could share a full backtrace as those shared so far have had frames omitted for libraries without symbol information. The output of running bt all in the debugger console after the crash would be ideal.

@bdash bdash added T-Bug-Crash and removed T-Help labels Mar 13, 2016
@n3d1117
Copy link

n3d1117 commented Mar 13, 2016

@bdash Yes it's correct, the issue is specific to iOS 8.x and the same build runs fine on iOS 9.x.
Here's my output of bt all in the debugger console right after the crash:

warning: could not load any Objective-C class information. This will significantly reduce the quality of type information available.
* thread #1: tid = 0x15f283, 0x340381a0 libsystem_platform.dylib`OSAtomicCompareAndSwap64Barrier + 8, queue = 'com.apple.main-thread', stop reason = EXC_BAD_ACCESS (code=EXC_ARM_DA_ALIGN, address=0x776c09c)
    frame #0: 0x340381a0 libsystem_platform.dylib`OSAtomicCompareAndSwap64Barrier + 8
    frame #1: 0x3403bf1e libsystem_pthread.dylib`_pthread_mutex_lock + 210
    frame #2: 0x007cb5ec Realm`realm::util::RobustMutex::is_valid() + 84
    frame #3: 0x0088144c Realm`realm::SharedGroup::do_open(std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&, bool, realm::SharedGroup::DurabilityLevel, bool, char const*, bool) + 900
  * frame #4: 0x007b2834 Realm`realm::SharedGroup::open(this=0x163b3c00, repl=0x15dbe080, durability=durability_Full, encryption_key=0x00000000, allow_file_format_upgrade=true) + 284 at group_shared.hpp:810
    frame #5: 0x007b25ba Realm`realm::SharedGroup::SharedGroup(this=0x163b3c00, repl=0x15dbe080, durability=durability_Full, encryption_key=0x00000000, allow_file_format_upgrade=true) + 514 at group_shared.hpp:779
    frame #6: 0x007b23ae Realm`realm::SharedGroup::SharedGroup(this=0x163b3c00, repl=0x15dbe080, durability=durability_Full, encryption_key=0x00000000, allow_file_format_upgrade=true) + 62 at group_shared.hpp:778
    frame #7: 0x007acdee Realm`realm::Realm::open_with_config(realm::Realm::Config const&, std::__1::unique_ptr<realm::Replication, std::__1::default_delete<realm::Replication> >&, std::__1::unique_ptr<realm::SharedGroup, std::__1::default_delete<realm::SharedGroup> >&, std::__1::unique_ptr<realm::Group, std::__1::default_delete<realm::Group> >&) [inlined] std::__1::__unique_if<realm::SharedGroup>::__unique_single std::__1::make_unique<realm::SharedGroup, realm::Replication&, realm::SharedGroup::DurabilityLevel&, char const*, bool>(__args=0x15dbe080, __args=0x003fc4ac, __args=0x003fc4a4, __args=0x003fc4a3) + 100 at memory:3075
    frame #8: 0x007acd8a Realm`realm::Realm::open_with_config(config=0x15dbdfd8, history=0x15dbe020, shared_group=0x15dbe024, read_only_group=0x15dbe028) + 4034 at shared_realm.cpp:86
    frame #9: 0x007abba2 Realm`realm::Realm::Realm(this=0x15dbdfd0) + 470 at shared_realm.cpp:66
    frame #10: 0x007ad424 Realm`realm::Realm::Realm(this=0x15dbdfd0, config=<unavailable>) + 16 at shared_realm.cpp:65
    frame #11: 0x006a8a66 Realm`std::__1::shared_ptr<realm::Realm> std::__1::shared_ptr<realm::Realm>::make_shared<realm::Realm::Config>(realm::Realm::Config&&) [inlined] std::__1::__libcpp_compressed_pair_imp<std::__1::allocator<realm::Realm>, realm::Realm, 1u>::__libcpp_compressed_pair_imp<std::__1::allocator<realm::Realm>&, realm::Realm::Config&&, 0ul, 0ul>(this=0x15dbdfd0, __pc=piecewise_construct_t @ 0x003fd080, __first_args=tuple<std::__1::allocator<realm::Realm> &> @ 0x003fd07c, __second_args=tuple<realm::Realm::Config &&> @ 0x003fd078, (null)=__tuple_indices<0> @ 0x003fd074, (null)=__tuple_indices<0> @ 0x003fd070) + 144 at memory:2128
    frame #12: 0x006a89d6 Realm`std::__1::shared_ptr<realm::Realm> std::__1::shared_ptr<realm::Realm>::make_shared<realm::Realm::Config>(realm::Realm::Config&&) [inlined] std::__1::__compressed_pair<std::__1::allocator<realm::Realm>, realm::Realm>::__compressed_pair<std::__1::allocator<realm::Realm>&, realm::Realm::Config&&>(this=0x15dbdfd0, __pc=piecewise_construct_t @ 0x003fd05c, __first_args=tuple<std::__1::allocator<realm::Realm> &> @ 0x003fd058, __second_args=tuple<realm::Realm::Config &&> @ 0x003fd054) + 48 at memory:2391
    frame #13: 0x006a89a6 Realm`std::__1::shared_ptr<realm::Realm> std::__1::shared_ptr<realm::Realm>::make_shared<realm::Realm::Config>(realm::Realm::Config&&) [inlined] std::__1::__compressed_pair<std::__1::allocator<realm::Realm>, realm::Realm>::__compressed_pair<std::__1::allocator<realm::Realm>&, realm::Realm::Config&&>(this=0x15dbdfd0, __pc=piecewise_construct_t @ 0x003fd038, __first_args=tuple<std::__1::allocator<realm::Realm> &> @ 0x003fd034, __second_args=tuple<realm::Realm::Config &&> @ 0x003fd030) + 24 at memory:2394
    frame #14: 0x006a898e Realm`std::__1::shared_ptr<realm::Realm> std::__1::shared_ptr<realm::Realm>::make_shared<realm::Realm::Config>(realm::Realm::Config&&) [inlined] std::__1::__shared_ptr_emplace<realm::Realm, std::__1::allocator<realm::Realm> >::__shared_ptr_emplace<realm::Realm::Config>(this=0x15dbdfc0, __a=allocator<realm::Realm> @ 0x003fd018, __args=0x003fd8d8) + 330 at memory:3732
    frame #15: 0x006a8844 Realm`std::__1::shared_ptr<realm::Realm> std::__1::shared_ptr<realm::Realm>::make_shared<realm::Realm::Config>(realm::Realm::Config&&) [inlined] std::__1::__shared_ptr_emplace<realm::Realm, std::__1::allocator<realm::Realm> >::__shared_ptr_emplace<realm::Realm::Config>(this=0x15dbdfc0, __a=allocator<realm::Realm> @ 0x003fcff8, __args=0x003fd8d8) + 16 at memory:3733
    frame #16: 0x006a8834 Realm`std::__1::shared_ptr<realm::Realm> std::__1::shared_ptr<realm::Realm>::make_shared<realm::Realm::Config>(__args=0x003fd8d8) + 348 at memory:4308
    frame #17: 0x0069ca58 Realm`realm::_impl::RealmCoordinator::get_realm(realm::Realm::Config) [inlined] std::__1::enable_if<!(is_array<realm::Realm>::value), std::__1::shared_ptr<realm::Realm> >::type std::__1::make_shared<realm::Realm, realm::Realm::Config>(__args=0x003fd8d8) + 22 at memory:4672
    frame #18: 0x0069ca42 Realm`realm::_impl::RealmCoordinator::get_realm(this=0x15e98df0, config=<unavailable>) + 2550 at realm_coordinator.cpp:116
    frame #19: 0x007aebe8 Realm`realm::Realm::get_shared_realm(realm::Realm::Config) + 172 at shared_realm.cpp:183
    frame #20: 0x0078ae9a Realm`+[RLMRealm openSharedRealm:error:](self=0x00956104, _cmd="openSharedRealm:error:", config=0x15e98a88, outError=domain: nil - code: 4186848) + 154 at RLMRealm.mm:279
    frame #21: 0x0078b7a8 Realm`+[RLMRealm realmWithConfiguration:error:](self=0x00956104, _cmd="realmWithConfiguration:error:", configuration=0x15e98a80, error=domain: nil - code: 4186848) + 2096 at RLMRealm.mm:350
    frame #22: 0x00bacbb0 RealmSwift`@nonobjc __ObjC.RLMRealm.__allocating_init (__ObjC.RLMRealm.Type)(configuration : __ObjC.RLMRealmConfiguration) throws -> __ObjC.RLMRealm + 140 at Realm.swift:0
    frame #23: 0x00ba8728 RealmSwift`RealmSwift.Realm.init (configuration=RealmSwift.Realm.Configuration @ 0x003fe284, self=0x15dbd060, $error=ErrorType @ 0x003fe474)(configuration : RealmSwift.Realm.Configuration) throws -> RealmSwift.Realm + 488 at Realm.swift:75
    frame #24: 0x00ba8ba8 RealmSwift`RealmSwift.Realm.__allocating_init (configuration=RealmSwift.Realm.Configuration @ 0x003fe3a0, $metatype=0x0000000000bc7fb8, $error=ErrorType @ 0x003fe474)(configuration : RealmSwift.Realm.Configuration) throws -> RealmSwift.Realm + 492 at Realm.swift:0
    frame #25: 0x0022be84 appdb`globalinit_33_3245E08DA67DA540B44D59F2EBCEB272_func0 + 252 at Constants.swift:15
    frame #26: 0x01ce215e libdispatch.dylib`_dispatch_client_callout + 22
    frame #27: 0x01ce2dc8 libdispatch.dylib`dispatch_once_f + 100
    frame #28: 0x0022bf14 appdb`appdb.realm.unsafeMutableAddressor : RealmSwift.Realm + 60 at Constants.swift:15
    frame #29: 0x00141ef0 appdb`appdb.AppDelegate.application (application=0x15d8f780, launchOptions=nil, self=0x15da3340)(__ObjC.UIApplication, didFinishLaunchingWithOptions : Swift.Optional<Swift.Dictionary<__ObjC.NSObject, Swift.AnyObject>>) -> Swift.Bool + 952 at AppDelegate.swift:30
    frame #30: 0x00142274 appdb`@objc appdb.AppDelegate.application (appdb.AppDelegate)(__ObjC.UIApplication, didFinishLaunchingWithOptions : Swift.Optional<Swift.Dictionary<__ObjC.NSObject, Swift.AnyObject>>) -> Swift.Bool + 276 at AppDelegate.swift:0
    frame #31: 0x28988242 UIKit`-[UIApplication _handleDelegateCallbacksWithOptions:isSuspended:restoreState:] + 374
    frame #32: 0x28b7ead8 UIKit`-[UIApplication _callInitializationDelegatesForMainScene:transitionContext:] + 2444
    frame #33: 0x28b81198 UIKit`-[UIApplication _runWithMainScene:transitionContext:completion:] + 1412
    frame #34: 0x28b8be18 UIKit`__84-[UIApplication _handleApplicationActivationWithScene:transitionContext:completion:]_block_invoke + 36
    frame #35: 0x28b7f93a UIKit`-[UIApplication workspaceDidEndTransaction:] + 130
    frame #36: 0x2be7eec8 FrontBoardServices`__31-[FBSSerialQueue performAsync:]_block_invoke_2 + 16
    frame #37: 0x25265fd4 CoreFoundation`__CFRUNLOOP_IS_CALLING_OUT_TO_A_BLOCK__ + 12
    frame #38: 0x25265298 CoreFoundation`__CFRunLoopDoBlocks + 216
    frame #39: 0x25263dd2 CoreFoundation`__CFRunLoopRun + 1714
    frame #40: 0x251b0200 CoreFoundation`CFRunLoopRunSpecific + 476
    frame #41: 0x251b0012 CoreFoundation`CFRunLoopRunInMode + 106
    frame #42: 0x28981e16 UIKit`-[UIApplication _run] + 558
    frame #43: 0x2897ca08 UIKit`UIApplicationMain + 1440
    frame #44: 0x00142594 appdb`main + 164 at AppDelegate.swift:13

  thread #2: tid = 0x15f2a0, 0x33fac224 libsystem_kernel.dylib`kevent64 + 24, queue = 'com.apple.libdispatch-manager'
    frame #0: 0x33fac224 libsystem_kernel.dylib`kevent64 + 24
    frame #1: 0x01cefc00 libdispatch.dylib`_dispatch_mgr_invoke + 280
    frame #2: 0x01ce3c32 libdispatch.dylib`_dispatch_mgr_thread + 38

  thread #3: tid = 0x15f2a1, 0x33fac4c4 libsystem_kernel.dylib`semaphore_wait_trap + 8, queue = 'FBSSerialQueue'
    frame #0: 0x33fac4c4 libsystem_kernel.dylib`semaphore_wait_trap + 8
    frame #1: 0x01cee036 libdispatch.dylib`_dispatch_semaphore_wait_slow + 190
    frame #2: 0x2be7eeaa FrontBoardServices`__31-[FBSSerialQueue performAsync:]_block_invoke + 146
    frame #3: 0x01ce2172 libdispatch.dylib`_dispatch_call_block_and_release + 10
    frame #4: 0x01cead66 libdispatch.dylib`_dispatch_queue_drain + 1718
    frame #5: 0x01ce4a60 libdispatch.dylib`_dispatch_queue_invoke + 88
    frame #6: 0x01cecb08 libdispatch.dylib`_dispatch_root_queue_drain + 1308
    frame #7: 0x01cede18 libdispatch.dylib`_dispatch_worker_thread3 + 100
    frame #8: 0x3403bdc0 libsystem_pthread.dylib`_pthread_wqthread + 668
    frame #9: 0x3403bb14 libsystem_pthread.dylib`start_wqthread + 8

  thread #4: tid = 0x15f2a3, 0x33fc09c0 libsystem_kernel.dylib`__workq_kernreturn + 8
    frame #0: 0x33fc09c0 libsystem_kernel.dylib`__workq_kernreturn + 8
    frame #1: 0x3403be3c libsystem_pthread.dylib`_pthread_wqthread + 792
    frame #2: 0x3403bb14 libsystem_pthread.dylib`start_wqthread + 8

  thread #5: tid = 0x15f2a4, 0x1fee1dcc dyld`ImageLoaderMachOCompressed::trieWalk(unsigned char const*, unsigned char const*, char const*) + 180, queue = 'com.apple.NSURLSession-work'
    frame #0: 0x1fee1dcc dyld`ImageLoaderMachOCompressed::trieWalk(unsigned char const*, unsigned char const*, char const*) + 180
    frame #1: 0x1fee1ed8 dyld`ImageLoaderMachOCompressed::findExportedSymbol(char const*, ImageLoader const**) const + 68
    frame #2: 0x1fee42f8 dyld`ImageLoaderMachOCompressed::getAddressCoalIterator(ImageLoader::CoalIterator&, ImageLoader::LinkContext const&) + 32
    frame #3: 0x1fedabcc dyld`ImageLoader::weakBind(ImageLoader::LinkContext const&) + 552
    frame #4: 0x1fed9e08 dyld`ImageLoader::link(ImageLoader::LinkContext const&, bool, bool, bool, ImageLoader::RPathChain const&) + 248
    frame #5: 0x1fed3300 dyld`dyld::link(ImageLoader*, bool, bool, ImageLoader::RPathChain const&) + 208
    frame #6: 0x1fed821e dyld`dlopen + 934
    frame #7: 0x33ef5724 libdyld.dylib`dlopen + 48
    frame #8: 0x25289780 CoreFoundation`__CFLookupCoreServicesInternalFunction + 36
    frame #9: 0x251fee40 CoreFoundation`CFURLCopyResourcePropertyForKey + 224
    frame #10: 0x24cf6330 CFNetwork`HSTSCache::createDataFromFileURL(__CFAllocator const*, __CFURL const*, __CFError**) + 40
    frame #11: 0x24cf622e CFNetwork`HSTSCache::createKnownHSTSHostsDictionary() + 70
    frame #12: 0x24cf616c CFNetwork`HSTSCache::initialize(__CFDictionary const*) + 68
    frame #13: 0x01ce2dc8 libdispatch.dylib`dispatch_once_f + 100
    frame #14: 0x24cf600e CFNetwork`HSTSPolicy::createDefaultPolicy() + 54
    frame #15: 0x24cdea34 CFNetwork`_CFHSTSPolicyCreateWithProperties + 72
    frame #16: 0x24cde9ce CFNetwork`___ZNK14StorageSession15copyHSTSStorageEv_block_invoke + 222
    frame #17: 0x01ce215e libdispatch.dylib`_dispatch_client_callout + 22
    frame #18: 0x01ce2dc8 libdispatch.dylib`dispatch_once_f + 100
    frame #19: 0x24cde8ee CFNetwork`StorageSession::copyHSTSStorage() const + 94
    frame #20: 0x24de0714 CFNetwork`-[NSURLSessionConfiguration copyHSTSPolicy] + 68
    frame #21: 0x24d707c0 CFNetwork`HTTPProtocol::_createMutableCanonicalRequest(__CFAllocator const*, _CFURLRequest const*, NSURLSession const*, void const*) + 44
    frame #22: 0x24d703fc CFNetwork`HTTPProtocol::_createCanonicalRequest(__CFAllocator const*, _CFURLRequest const*, NSURLSession const*, void const*) + 44
    frame #23: 0x24d41b7a CFNetwork`+[_NSCFURLProtocol canonicalRequestForRequest:task:] + 86
    frame #24: 0x24cfea8a CFNetwork`-[__NSURLSessionLocal _createCanonicalRequestForTask:] + 102
    frame #25: 0x24d4372a CFNetwork`-[__NSCFURLSessionConnection initWithTask:delegate:delegateQueue:] + 570
    frame #26: 0x24cfc912 CFNetwork`-[__NSURLSessionLocal _onqueue_connectUploadTask:strippedRequest:bodyStream:bodyParts:] + 470
    frame #27: 0x24cfce4e CFNetwork`__75-[__NSURLSessionLocal taskForClass:request:uploadFile:bodyData:completion:]_block_invoke + 142
    frame #28: 0x24d0a7aa CFNetwork`-[__NSCFLocalSessionTask _onqueue_completeInitialization] + 58
    frame #29: 0x01ce2172 libdispatch.dylib`_dispatch_call_block_and_release + 10
    frame #30: 0x01cead66 libdispatch.dylib`_dispatch_queue_drain + 1718
    frame #31: 0x01ce4a60 libdispatch.dylib`_dispatch_queue_invoke + 88
    frame #32: 0x01cecb08 libdispatch.dylib`_dispatch_root_queue_drain + 1308
    frame #33: 0x01cede18 libdispatch.dylib`_dispatch_worker_thread3 + 100
    frame #34: 0x3403bdc0 libsystem_pthread.dylib`_pthread_wqthread + 668
    frame #35: 0x3403bb14 libsystem_pthread.dylib`start_wqthread + 8

  thread #6: tid = 0x15f2a5, 0x33fc09c0 libsystem_kernel.dylib`__workq_kernreturn + 8
    frame #0: 0x33fc09c0 libsystem_kernel.dylib`__workq_kernreturn + 8
    frame #1: 0x3403be3c libsystem_pthread.dylib`_pthread_wqthread + 792
    frame #2: 0x3403bb14 libsystem_pthread.dylib`start_wqthread + 8

  thread #7: tid = 0x15f2c5, 0x33fc09c0 libsystem_kernel.dylib`__workq_kernreturn + 8
    frame #0: 0x33fc09c0 libsystem_kernel.dylib`__workq_kernreturn + 8
    frame #1: 0x3403be3c libsystem_pthread.dylib`_pthread_wqthread + 792
    frame #2: 0x3403bb14 libsystem_pthread.dylib`start_wqthread + 8

  thread #8: tid = 0x15f2c6, 0x33faf99c libsystem_kernel.dylib`kevent + 24, name = 'RLMRealm notification listener'
    frame #0: 0x33faf99c libsystem_kernel.dylib`kevent + 24
    frame #1: 0x00685ba2 Realm`realm::_impl::ExternalCommitHelper::listen(this=0x15e98620) + 286 at external_commit_helper.cpp:199
    frame #2: 0x006865e8 Realm`realm::_impl::ExternalCommitHelper::ExternalCommitHelper(this=0x15dbdfb8)::$_0::operator()() const + 100 at external_commit_helper.cpp:159
    frame #3: 0x0068657e Realm`_ZNSt3__112__async_funcIZN5realm5_impl20ExternalCommitHelperC1ERNS2_16RealmCoordinatorEE3$_0JEE9__executeIJEEEvNS_15__tuple_indicesIJXspT_EEEE [inlined] std::__1::__invoke<realm::_impl::ExternalCommitHelper::ExternalCommitHelper(realm::_impl::RealmCoordinator&)::$_0>(__f=0x15dbdfb8)::$_0>(fp)(std::__1::forward<>(fp0))), realm::_impl::ExternalCommitHelper::ExternalCommitHelper(realm::_impl::RealmCoordinator&)::$_0&&) + 34 at __functional_base:415
    frame #4: 0x00686574 Realm`_ZNSt3__112__async_funcIZN5realm5_impl20ExternalCommitHelperC1ERNS2_16RealmCoordinatorEE3$_0JEE9__executeIJEEEvNS_15__tuple_indicesIJXspT_EEEE(this=0x15dbdfb8, (null)=__tuple_indices<> @ 0x0826ccf0) + 24 at future:2342
    frame #5: 0x00686556 Realm`std::__1::__async_func<realm::_impl::ExternalCommitHelper::ExternalCommitHelper(realm::_impl::RealmCoordinator&)::$_0>::operator(this=0x15dbdfb8)() + 14 at future:2335
    frame #6: 0x0068646c Realm`std::__1::__async_assoc_state<void, std::__1::__async_func<realm::_impl::ExternalCommitHelper::ExternalCommitHelper(realm::_impl::RealmCoordinator&)::$_0> >::__execute(this=0x15dbdf60) + 104 at future:1029
    frame #7: 0x00686b8e Realm`std::__1::__thread_proxy<std::__1::tuple<void (std::__1::__async_assoc_state<void, std::__1::__async_func<realm::_impl::ExternalCommitHelper::ExternalCommitHelper(realm::_impl::RealmCoordinator&)::$_0> >::*)(), std::__1::__async_assoc_state<void, std::__1::__async_func<realm::_impl::ExternalCommitHelper::ExternalCommitHelper(realm::_impl::RealmCoordinator&)::$_0> >*> >(void*, void*) [inlined] std::__1::__invoke<void (std::__1::__async_assoc_state<void, std::__1::__async_func<realm::_impl::ExternalCommitHelper::ExternalCommitHelper(realm::_impl::RealmCoordinator&)::$_0> >::*)(), std::__1::__async_assoc_state<void, std::__1::__async_func<realm::_impl::ExternalCommitHelper::ExternalCommitHelper(realm::_impl::RealmCoordinator&)::$_0> >*, void>(__f=0x15dbdd40, __a0=0x15dbdd48)::$_0> >*>(fp0)).*fp(std::__1::forward<>(fp1))), void (std::__1::__async_assoc_state<void, std::__1::__async_func<realm::_impl::ExternalCommitHelper::ExternalCommitHelper(realm::_impl::RealmCoordinator&)::$_0> >::*&&)(), std::__1::__async_assoc_state<void, std::__1::__async_func<realm::_impl::ExternalCommitHelper::ExternalCommitHelper(realm::_impl::RealmCoordinator&)::$_0> >*&&) + 74 at __functional_base:382
    frame #8: 0x00686b44 Realm`std::__1::__thread_proxy<std::__1::tuple<void (std::__1::__async_assoc_state<void, std::__1::__async_func<realm::_impl::ExternalCommitHelper::ExternalCommitHelper(realm::_impl::RealmCoordinator&)::$_0> >::*)(), std::__1::__async_assoc_state<void, std::__1::__async_func<realm::_impl::ExternalCommitHelper::ExternalCommitHelper(realm::_impl::RealmCoordinator&)::$_0> >*> >(void*, void*) [inlined] _ZNSt3__116__thread_executeIMNS_19__async_assoc_stateIvNS_12__async_funcIZN5realm5_impl20ExternalCommitHelperC1ERNS4_16RealmCoordinatorEE3$_0JEEEEEFvvEJPSA_EJLm1EEEEvRNS_5tupleIJT_DpT0_EEENS_15__tuple_indicesIJXspT1_EEEE(__t=0x15dbdd40, (null)=__tuple_indices<1> @ 0x0826cef0) + 20 at thread:337
    frame #9: 0x00686b30 Realm`std::__1::__thread_proxy<std::__1::tuple<void (std::__1::__async_assoc_state<void, std::__1::__async_func<realm::_impl::ExternalCommitHelper::ExternalCommitHelper(realm::_impl::RealmCoordinator&)::$_0> >::*)(), std::__1::__async_assoc_state<void, std::__1::__async_func<realm::_impl::ExternalCommitHelper::ExternalCommitHelper(realm::_impl::RealmCoordinator&)::$_0> >*> >(__vp=0x15dbdd40) + 236 at thread:347
    frame #10: 0x3403de22 libsystem_pthread.dylib`_pthread_body + 138
    frame #11: 0x3403dd96 libsystem_pthread.dylib`_pthread_start + 118
    frame #12: 0x3403bb20 libsystem_pthread.dylib`thread_start + 8

@miff
Copy link

miff commented Mar 13, 2016

Having the exact same problem since I updated to 0.98.4.
XCode 7.2.1,
iOS 9 (iPad3,4) not working
iOS 9 (iPhone6 / iPhone6s) working

@bdash
Copy link
Contributor

bdash commented Mar 13, 2016

iPad3,4 is an iPad 4, which has only a 32-bit CPU. The crash log that @n3d1117 shared is from a 32-bit device as well. This may be a 32-bit-specific issue rather than an iOS 8 issue.

@bdash
Copy link
Contributor

bdash commented Mar 13, 2016

@n3d1117, do I understand correctly that you're seeing this with the iPad 2 simulator?

@bdash
Copy link
Contributor

bdash commented Mar 13, 2016

Also, are you seeing this crash on a device that has an existing Realm file for your application, or do you see it when starting without any existing Realm file?

@bdash
Copy link
Contributor

bdash commented Mar 13, 2016

Thanks for the extra detail, @n3d1117.

I've been able to reproduce this crash by forcing one of our examples apps to build for armv7 only and running it on my iPhone 6 running iOS 9.3. That confirms this is a 32-bit issue rather than being related to the version of iOS.

@bdash
Copy link
Contributor

bdash commented Mar 13, 2016

I've filed an issue for our core database engine team to look at with information on how to reproduce. We'll update here when we have further information to report.

@bdash bdash added the Blocked This issue is blocked by another issue label Mar 13, 2016
@bangnl152
Copy link

I have the same issue on iOS 7.

@marcelogfsouza
Copy link

Hi, I am an issue that I think it's related to this issue. on iOS 9.2.1, on all devices with 32 bits.
I am receiving an EXC_BAD_ACCESS 0x0000000006243114 on an writing method.
Works fine on Realm 0.98.3.

@ppamorim
Copy link

Same here, Crashing on Iphone 4s, 9.1

This was referenced Mar 14, 2016
@bdash bdash changed the title Realm is crashing when init Realm v0.98.4 crashes with an alignment exception when opening a Realm on 32-bit iOS devices Mar 14, 2016
@TheHmmka
Copy link

Confirm! 32-bit system crash :-(

bdash added a commit that referenced this issue Mar 14, 2016
@bdash bdash added S:In Progress and removed Blocked This issue is blocked by another issue labels Mar 14, 2016
@bdash
Copy link
Contributor

bdash commented Mar 14, 2016

We have an updated version of our core database engine that addresses this crash on 32-bit devices. It will be integrated via #3330. We should have new releases of Realm Objective-C and Swift available in a few hours once that change has worked through our release testing pipeline.

@bdash
Copy link
Contributor

bdash commented Mar 15, 2016

We released the fix for this issue in v0.98.5 a few moments ago. Many thanks to the prompt feedback that helped us to track this down, and for your patience while we worked to release the fix.

@bdash bdash added this to the 0.98.5 milestone Mar 15, 2016
@TheHmmka
Copy link

Thanks!

kishikawakatsumi pushed a commit that referenced this issue Mar 15, 2016
kishikawakatsumi pushed a commit that referenced this issue Mar 15, 2016
kishikawakatsumi pushed a commit that referenced this issue Mar 18, 2016
kishikawakatsumi pushed a commit that referenced this issue Sep 20, 2016
@maail
Copy link

maail commented Dec 9, 2016

I'm having this exact issue on version 2.1.1. Any fix for this? Works the first couple of times and then I'm getting this error.

@bdash
Copy link
Contributor

bdash commented Dec 9, 2016

Please file a new issue, providing all of the details requested in the new issue template. What you're seeing is very unlikely to be related to an issue that we fixed 9 months ago.

@sassiwalid
Copy link

I have the same issue with realm swift 3.0.1 and iphone 5S IOS 10. I would like to know the reason of this problem please ???

@bdash
Copy link
Contributor

bdash commented Nov 14, 2017

Please file a new issue, providing all of the details requested in the new issue template. What you're seeing is very unlikely to be related to an issue that we fixed 18 months ago.

@realm realm locked and limited conversation to collaborators Nov 14, 2017
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging a pull request may close this issue.