99.9% of crash free users :)
Sometimes application crash.
Here is one of crashlogs that we download from developer.apple.com:
Thread 0 name:
Thread 0:
0 libsystem_kernel.dylib 0x0000000190b61188 mach_msg_trap + 8
1 libsystem_kernel.dylib 0x0000000190b60ff8 mach_msg + 72 (mach_msg.c:103)
2 CoreFoundation 0x0000000191b5e5d0 __CFRunLoopServiceMachPort + 192 (CFRunLoop.c:2527)
3 CoreFoundation 0x0000000191b5c1ec __CFRunLoopRun + 1132 (CFRunLoop.c:2870)
4 CoreFoundation 0x0000000191a8a2b8 CFRunLoopRunSpecific + 444 (CFRunLoop.c:3113)
5 GraphicsServices 0x000000019353e198 GSEventRunModal + 180 (GSEvent.c:2245)
6 UIKit 0x0000000197ad17fc -[UIApplication _run] + 684 (UIApplication.m:2650)
7 UIKit 0x0000000197acc534 UIApplicationMain + 208 (UIApplication.m:4092)
8 Galileo 0x000000010010fe20 main + 440 (main.mm:33)
9 libdyld.dylib 0x0000000190a6d5b8 start + 4
Thread 1 name:
Thread 1:
0 libsystem_kernel.dylib 0x0000000190b61188 mach_msg_trap + 8
1 libsystem_kernel.dylib 0x0000000190b60ff8 mach_msg + 72 (mach_msg.c:103)
2 CoreFoundation 0x0000000191b5e5d0 __CFRunLoopServiceMachPort + 192 (CFRunLoop.c:2527)
3 CoreFoundation 0x0000000191b5c1ec __CFRunLoopRun + 1132 (CFRunLoop.c:2870)
4 CoreFoundation 0x0000000191a8a2b8 CFRunLoopRunSpecific + 444 (CFRunLoop.c:3113)
5 Foundation 0x00000001925c726c -[NSRunLoop(NSRunLoop) runMode:beforeDate:] + 304 (NSRunLoop.m:367)
6 Foundation 0x00000001925e7dd0 -[NSRunLoop(NSRunLoop) runUntilDate:] + 96 (NSRunLoop.m:411)
7 UIKit 0x0000000198445c38 -[UIEventFetcher threadMain] + 136 (UIEventFetcher.m:279)
8 Foundation 0x00000001926c4e68 __NSThread__start__ + 1024 (NSThread.m:1163)
9 libsystem_pthread.dylib 0x0000000190c45850 _pthread_body + 240 (pthread.c:697)
10 libsystem_pthread.dylib 0x0000000190c45760 _pthread_start + 284 (pthread.c:744)
11 libsystem_pthread.dylib 0x0000000190c42d94 thread_start + 4
Thread 2 Crashed:
0 libsystem_kernel.dylib 0x0000000190b7f014 __pthread_kill + 8
1 libsystem_pthread.dylib 0x0000000190c47450 pthread_kill + 112 (pthread.c:1366)
2 libsystem_c.dylib 0x0000000190af349c __abort + 144 (abort.c:128)
3 libsystem_c.dylib 0x0000000190af340c abort + 152 (abort.c:99)
4 Galileo 0x000000010034bbec please_report_this_error_to_help_at_realm_dot_io + 12
5 Galileo 0x000000010034bea0 realm::util::terminate_internal(std::__1::basic_stringstream<char, std::__1::char_traits<char>, std::__1::allocator<char> >&) + 232
6 Galileo 0x000000010034c034 realm::util::terminate(char const*, char const*, long, std::initializer_list<realm::util::Printable>&&) + 388
7 Galileo 0x0000000100340568 realm::util::network::DeadlineTimer::WaitOper<(anonymous namespace)::Connection::schedule_ping(unsigned long long, unsigned long long)::'lambda'(std::__1::error_code)>::recycle_and_execute() + 776
8 Galileo 0x00000001002e8894 realm::util::network::Service::Impl::run() + 248
9 Galileo 0x000000010032c34c realm::sync::Client::run() + 364
10 Galileo 0x00000001002c9f68 std::__1::__thread_proxy<std::__1::tuple<realm::_impl::SyncClient::SyncClient(std::__1::unique_ptr<realm::util::Logger, std::__1::default_delete<realm::util::Logger> >, realm::sync::Client::ReconnectMode, bool)::'lambda'()> >(void*, void*) + 108 (sync_client.hpp:51)
11 libsystem_pthread.dylib 0x0000000190c45850 _pthread_body + 240 (pthread.c:697)
12 libsystem_pthread.dylib 0x0000000190c45760 _pthread_start + 284 (pthread.c:744)
13 libsystem_pthread.dylib 0x0000000190c42d94 thread_start + 4
Thread 3 name:
Thread 3:
0 libsystem_kernel.dylib 0x0000000190b6564c kevent + 8
1 Galileo 0x0000000100209c70 realm::_impl::ExternalCommitHelper::listen() + 212 (external_commit_helper.cpp:202)
2 Galileo 0x000000010020a218 std::__1::__async_func<realm::_impl::ExternalCommitHelper::ExternalCommitHelper(realm::_impl::RealmCoordinator&)::$_0>::operator()() + 28 (external_commit_helper.cpp:159)
3 Galileo 0x000000010020a1a0 std::__1::__async_assoc_state<void, std::__1::__async_func<realm::_impl::ExternalCommitHelper::ExternalCommitHelper(realm::_impl::RealmCoordinator&)::$_0> >::__execute() + 28 (future:1031)
4 Galileo 0x000000010020a364 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*) + 84 (__functional_base:383)
5 libsystem_pthread.dylib 0x0000000190c45850 _pthread_body + 240 (pthread.c:697)
6 libsystem_pthread.dylib 0x0000000190c45760 _pthread_start + 284 (pthread.c:744)
7 libsystem_pthread.dylib 0x0000000190c42d94 thread_start + 4
Thread 4 name:
Thread 4:
0 libsystem_kernel.dylib 0x0000000190b61188 mach_msg_trap + 8
1 libsystem_kernel.dylib 0x0000000190b60ff8 mach_msg + 72 (mach_msg.c:103)
2 CoreFoundation 0x0000000191b5e5d0 __CFRunLoopServiceMachPort + 192 (CFRunLoop.c:2527)
3 CoreFoundation 0x0000000191b5c1ec __CFRunLoopRun + 1132 (CFRunLoop.c:2870)
4 CoreFoundation 0x0000000191a8a2b8 CFRunLoopRunSpecific + 444 (CFRunLoop.c:3113)
5 CFNetwork 0x000000019228fa70 +[NSURLConnection(Loader) _resourceLoadLoop:] + 336 (NSURLConnection.mm:364)
6 Foundation 0x00000001926c4e68 __NSThread__start__ + 1024 (NSThread.m:1163)
7 libsystem_pthread.dylib 0x0000000190c45850 _pthread_body + 240 (pthread.c:697)
8 libsystem_pthread.dylib 0x0000000190c45760 _pthread_start + 284 (pthread.c:744)
9 libsystem_pthread.dylib 0x0000000190c42d94 thread_start + 4
Thread 5 name:
Thread 5:
0 libsystem_kernel.dylib 0x0000000190b61188 mach_msg_trap + 8
1 libsystem_kernel.dylib 0x0000000190b60ff8 mach_msg + 72 (mach_msg.c:103)
2 Galileo 0x0000000100650780 CLSMachExceptionServer + 100 (CLSMachException.c:179)
3 libsystem_pthread.dylib 0x0000000190c45850 _pthread_body + 240 (pthread.c:697)
4 libsystem_pthread.dylib 0x0000000190c45760 _pthread_start + 284 (pthread.c:744)
5 libsystem_pthread.dylib 0x0000000190c42d94 thread_start + 4
Thread 6 name:
Thread 6:
0 libsystem_kernel.dylib 0x0000000190b611c4 semaphore_wait_trap + 8
1 libdispatch.dylib 0x0000000190a4c7d8 _dispatch_semaphore_wait_slow + 216 (semaphore.c:335)
2 Galileo 0x00000001008a43a8 NetworkQueue::worker() + 988 (Semaphore.h:35)
3 Galileo 0x00000001008a448c NetworkQueue::_worker(void*) + 12 (NetworkQueue.cpp:159)
4 libsystem_pthread.dylib 0x0000000190c45850 _pthread_body + 240 (pthread.c:697)
5 libsystem_pthread.dylib 0x0000000190c45760 _pthread_start + 284 (pthread.c:744)
6 libsystem_pthread.dylib 0x0000000190c42d94 thread_start + 4
Thread 7 name:
Thread 7:
0 libsystem_kernel.dylib 0x0000000190b611c4 semaphore_wait_trap + 8
1 libdispatch.dylib 0x0000000190a4c7d8 _dispatch_semaphore_wait_slow + 216 (semaphore.c:335)
2 Galileo 0x00000001008ea88c OperationQueue::worker(unsigned long) + 184 (Semaphore.h:35)
3 Galileo 0x00000001008eaaa8 OperationQueue::_worker(void*) + 32 (OperationQueue.cpp:186)
4 libsystem_pthread.dylib 0x0000000190c45850 _pthread_body + 240 (pthread.c:697)
5 libsystem_pthread.dylib 0x0000000190c45760 _pthread_start + 284 (pthread.c:744)
6 libsystem_pthread.dylib 0x0000000190c42d94 thread_start + 4
Thread 8 name:
Thread 8:
0 libsystem_kernel.dylib 0x0000000190b611c4 semaphore_wait_trap + 8
1 libdispatch.dylib 0x0000000190a4c7d8 _dispatch_semaphore_wait_slow + 216 (semaphore.c:335)
2 Galileo 0x00000001008ea88c OperationQueue::worker(unsigned long) + 184 (Semaphore.h:35)
3 Galileo 0x00000001008eaaa8 OperationQueue::_worker(void*) + 32 (OperationQueue.cpp:186)
4 libsystem_pthread.dylib 0x0000000190c45850 _pthread_body + 240 (pthread.c:697)
5 libsystem_pthread.dylib 0x0000000190c45760 _pthread_start + 284 (pthread.c:744)
6 libsystem_pthread.dylib 0x0000000190c42d94 thread_start + 4
Thread 9 name:
Thread 9:
0 libsystem_kernel.dylib 0x0000000190b61188 mach_msg_trap + 8
1 libsystem_kernel.dylib 0x0000000190b60ff8 mach_msg + 72 (mach_msg.c:103)
2 CoreFoundation 0x0000000191b5e5d0 __CFRunLoopServiceMachPort + 192 (CFRunLoop.c:2527)
3 CoreFoundation 0x0000000191b5c1ec __CFRunLoopRun + 1132 (CFRunLoop.c:2870)
4 CoreFoundation 0x0000000191a8a2b8 CFRunLoopRunSpecific + 444 (CFRunLoop.c:3113)
5 AVFAudio 0x00000001ab72bd24 GenericRunLoopThread::Entry(void*) + 164 (GenericRunLoopThread.h:106)
6 AVFAudio 0x00000001ab751d9c CAPThread::Entry(CAPThread*) + 84
7 libsystem_pthread.dylib 0x0000000190c45850 _pthread_body + 240 (pthread.c:697)
8 libsystem_pthread.dylib 0x0000000190c45760 _pthread_start + 284 (pthread.c:744)
9 libsystem_pthread.dylib 0x0000000190c42d94 thread_start + 4
Thread 10:
0 libsystem_kernel.dylib 0x0000000190b7ee1c __psynch_cvwait + 8
1 libsystem_pthread.dylib 0x0000000190c449c0 _pthread_cond_wait + 640 (pthread_cond.c:536)
2 libc++.1.dylib 0x000000019056d3ec std::__1::condition_variable::wait(std::__1::unique_lock<std::__1::mutex>&) + 56 (condition_variable.cpp:44)
3 JavaScriptCore 0x000000019638e5d0 void std::__1::condition_variable_any::wait<std::__1::unique_lock<bmalloc::Mutex> >(std::__1::unique_lock<bmalloc::Mutex>&) + 112 (condition_variable:202)
4 JavaScriptCore 0x000000019638e544 bmalloc::AsyncTask<bmalloc::Heap, void (bmalloc::Heap::*)()>::threadRunLoop() + 168 (condition_variable:211)
5 JavaScriptCore 0x000000019638e424 bmalloc::AsyncTask<bmalloc::Heap, void (bmalloc::Heap::*)()>::threadEntryPoint(bmalloc::AsyncTask<bmalloc::Heap, void (bmalloc::Heap::*)()>*) + 12 (AsyncTask.h:106)
6 JavaScriptCore 0x000000019638e6d4 void* std::__1::__thread_proxy<std::__1::tuple<void (*)(bmalloc::AsyncTask<bmalloc::Heap, void (bmalloc::Heap::*)()>*), bmalloc::AsyncTask<bmalloc::Heap, void (bmalloc::Heap::*)()>*> >(void*) + 92 (__functional_base:416)
7 libsystem_pthread.dylib 0x0000000190c45850 _pthread_body + 240 (pthread.c:697)
8 libsystem_pthread.dylib 0x0000000190c45760 _pthread_start + 284 (pthread.c:744)
9 libsystem_pthread.dylib 0x0000000190c42d94 thread_start + 4
Thread 11 name:
Thread 11:
0 libsystem_kernel.dylib 0x0000000190b61188 mach_msg_trap + 8
1 libsystem_kernel.dylib 0x0000000190b60ff8 mach_msg + 72 (mach_msg.c:103)
2 CoreFoundation 0x0000000191b5e5d0 __CFRunLoopServiceMachPort + 192 (CFRunLoop.c:2527)
3 CoreFoundation 0x0000000191b5c1ec __CFRunLoopRun + 1132 (CFRunLoop.c:2870)
4 CoreFoundation 0x0000000191a8a2b8 CFRunLoopRunSpecific + 444 (CFRunLoop.c:3113)
5 WebCore 0x0000000196690490 RunWebThread(void*) + 456 (WebCoreThread.mm:692)
6 libsystem_pthread.dylib 0x0000000190c45850 _pthread_body + 240 (pthread.c:697)
7 libsystem_pthread.dylib 0x0000000190c45760 _pthread_start + 284 (pthread.c:744)
8 libsystem_pthread.dylib 0x0000000190c42d94 thread_start + 4
Thread 12 name:
Thread 12:
0 libsystem_kernel.dylib 0x0000000190b7ee1c __psynch_cvwait + 8
1 libsystem_pthread.dylib 0x0000000190c449c0 _pthread_cond_wait + 640 (pthread_cond.c:536)
2 libc++.1.dylib 0x000000019056d3ec std::__1::condition_variable::wait(std::__1::unique_lock<std::__1::mutex>&) + 56 (condition_variable.cpp:44)
3 JavaScriptCore 0x0000000196376d64 WTF::ParkingLot::parkConditionallyImpl(void const*, WTF::ScopedLambda<bool ()> const&, WTF::ScopedLambda<void ()> const&, std::__1::chrono::time_point<std::__1::chrono::steady_clock, std::__1::chrono::duration<long long, std::__1::ratio<1l, 1000000000l> > >) + 2132 (ParkingLot.cpp:575)
4 JavaScriptCore 0x000000019614ea5c JSC::JITWorklist::runThread() + 192 (ParkingLot.h:62)
5 JavaScriptCore 0x000000019614eeac std::__1::__function::__func<JSC::JITWorklist::JITWorklist()::$_0, std::__1::allocator<JSC::JITWorklist::JITWorklist()::$_0>, void ()>::operator()() + 16 (JITWorklist.cpp:102)
6 JavaScriptCore 0x0000000195abf00c WTF::threadEntryPoint(void*) + 212 (functional:1817)
7 JavaScriptCore 0x0000000195abef1c WTF::wtfThreadEntryPoint(void*) + 24 (ThreadingPthreads.cpp:164)
8 libsystem_pthread.dylib 0x0000000190c45850 _pthread_body + 240 (pthread.c:697)
9 libsystem_pthread.dylib 0x0000000190c45760 _pthread_start + 284 (pthread.c:744)
10 libsystem_pthread.dylib 0x0000000190c42d94 thread_start + 4
Thread 13 name:
Thread 13:
0 libsystem_kernel.dylib 0x0000000190b7ee1c __psynch_cvwait + 8
1 libsystem_pthread.dylib 0x0000000190c449c0 _pthread_cond_wait + 640 (pthread_cond.c:536)
2 libc++.1.dylib 0x000000019056d3ec std::__1::condition_variable::wait(std::__1::unique_lock<std::__1::mutex>&) + 56 (condition_variable.cpp:44)
3 JavaScriptCore 0x0000000196376d64 WTF::ParkingLot::parkConditionallyImpl(void const*, WTF::ScopedLambda<bool ()> const&, WTF::ScopedLambda<void ()> const&, std::__1::chrono::time_point<std::__1::chrono::steady_clock, std::__1::chrono::duration<long long, std::__1::ratio<1l, 1000000000l> > >) + 2132 (ParkingLot.cpp:575)
4 JavaScriptCore 0x00000001963762e8 WTF::ParallelHelperPool::waitForClientWithTask(WTF::Locker<WTF::LockBase> const&) + 288 (ParkingLot.h:62)
5 JavaScriptCore 0x0000000196376088 WTF::ParallelHelperPool::helperThreadBody() + 76 (ParallelHelperPool.cpp:189)
6 JavaScriptCore 0x0000000195abf00c WTF::threadEntryPoint(void*) + 212 (functional:1817)
7 JavaScriptCore 0x0000000195abef1c WTF::wtfThreadEntryPoint(void*) + 24 (ThreadingPthreads.cpp:164)
8 libsystem_pthread.dylib 0x0000000190c45850 _pthread_body + 240 (pthread.c:697)
9 libsystem_pthread.dylib 0x0000000190c45760 _pthread_start + 284 (pthread.c:744)
10 libsystem_pthread.dylib 0x0000000190c42d94 thread_start + 4
Thread 14:
0 libsystem_pthread.dylib 0x0000000190c42d88 start_wqthread + 0
Thread 15:
0 libsystem_pthread.dylib 0x0000000190c42d88 start_wqthread + 0
Thread 16:
0 libsystem_pthread.dylib 0x0000000190c42d88 start_wqthread + 0
Thread 17:
0 libsystem_pthread.dylib 0x0000000190c42d88 start_wqthread + 0
Realm framework version: 2.5.0
Realm Object Server version: 1.4.1
Xcode version: 8.3.1
iOS version: 10.2.1
Dependency manager + version: cocoapods(1.2.0)
Hi @destman. Thanks for filing this issue. Would you be able to provide us any more information? Are you able to reproduce this in-house? Have you only been seeing this issue on versions of the app that run Realm 2.5.0 or other versions (please list those versions)? As well as please provide us with as much details as possible. Thanks!
@destman I'd appreciate if you could provide more information, as @istx25 has asked, or if you could trigger this with debug versions of our frameworks and share the resulting stack traces and logs. I've built a debug version of Realm Objective-C and Realm Swift 2.6 for you, available here: https://static.realm.io/debug/realm_objc_swift_2.6_debug.zip
Unfortunately i can not reproduce the problem at my devices. Not sure but looks like this crash appears after we add synchronisation. One more strange thing is that this crash is not logged by fabric...
Got another report from a different user with a bit more information, such as logs and the assertion failure message:
Sync: Connection[1]: Session[1]: Sending: REFRESH(signed_user_token_size=605)
sync/client.cpp:1937: [realm-core-2.5.1] Assertion failed: !m_awaiting_pong
0 Realm 0x0000000100ce8618 _ZN5realm4utilL18terminate_internalERNSt3__118basic_stringstreamIcNS1_11char_traitsIcEENS1_9allocatorIcEEEE + 40
1 Realm 0x0000000100ce8915 _ZN5realm4util9terminateEPKcS2_lOSt16initializer_listINS0_9PrintableEE + 517
2 Realm 0x0000000100cd99ec _ZN5realm4util7network13DeadlineTimer8WaitOperIZN12_GLOBAL__N_110Connection13schedule_pingEyyEUlNSt3__110error_codeEE_E19recycle_and_executeEv + 844
3 Realm 0x0000000100c71b75 _ZN5realm4util7network7Service4Impl3runEv + 277
4 Realm 0x0000000100cc0c2c _ZN5realm4sync6Client3runEv + 396
5 Realm 0x0000000100c56b66 _ZNSt3__114__thread_proxyINS_5tupleIJZN5realm5_impl10SyncClientC1ENS_10unique_ptrINS2_4util6LoggerENS_14default_deleteIS7_EEEENS2_4sync6Client13ReconnectModeEbEUlvE_EEEEEPvSG_ + 91
6 libsystem_pthread.dylib 0x0000000101bb3bc8 _pthread_body + 180
7 libsystem_pthread.dylib 0x0000000101bb3b14 _pthread_body + 0
8 libsystem_pthread.dylib 0x0000000101bb32fd thread_start + 13
In my case, this occurred without doing anything. :) I have an iOS app running in the Simulator and a Mac app running on my desktop, and both have been sitting unused for a while (an hour maybe). No queries or transactions have occurred, so maybe this issue is related to some kind of timeout or dormancy. Just a thought.
Thanks for the info, that helps.
The stack trace may have already led you to the offending line of code in sync_client.hpp, but here is where Xcode says the exception occurs:

@jpsim says an error I experienced with the Node SDK is the same as this one, so I'm adding my error trace here as well. Not sure how to reproduce, but let me know the prio of this and I can try to spend some time on it:
ERROR: Connection[1]: Reading failed: Operation timed out
ERROR: Connection[2]: Reading failed: Operation timed out
ERROR: Connection[1]: Failed to connect to endpoint '192.168.178.172:9080': Operation timed out
ERROR: Connection[1]: Failed to connect to '192.168.178.172:9080': All endpoints failed
ERROR: Connection[2]: Failed to connect to endpoint '192.168.178.172:9080': Operation timed out
ERROR: Connection[2]: Failed to connect to '192.168.178.172:9080': All endpoints failed
ERROR: Connection[1]: Failed to connect to endpoint '192.168.178.172:9080': Operation timed out
ERROR: Connection[1]: Failed to connect to '192.168.178.172:9080': All endpoints failed
ERROR: Connection[2]: Failed to connect to endpoint '192.168.178.172:9080': Operation timed out
ERROR: Connection[2]: Failed to connect to '192.168.178.172:9080': All endpoints failed
sync/client.cpp:1944: [realm-core-2.6.1] Assertion failed: !m_awaiting_pong
0 realm-node.node 0x000000010310b9a8 _ZN5realm4utilL18terminate_internalERNSt3__118basic_stringstreamIcNS1_11char_traitsIcEENS1_9allocatorIcEEEE + 40
1 realm-node.node 0x000000010310bd20 _ZN5realm4util9terminateEPKcS2_lOSt16initializer_listINS0_9PrintableEE + 528
2 realm-node.node 0x000000010334258c _ZN5realm4util7network13DeadlineTimer8WaitOperIZN12_GLOBAL__N_110Connection13schedule_pingEyyEUlNSt3__110error_codeEE_E19recycle_and_executeEv + 844
3 realm-node.node 0x00000001032da945 _ZN5realm4util7network7Service4Impl3runEv + 277
4 realm-node.node 0x00000001033296ec _ZN5realm4sync6Client3runEv + 396
5 realm-node.node 0x00000001030f52d2 _ZNSt3__114__thread_proxyINS_5tupleIJZN5realm5_impl10SyncClientC1ENS_10unique_ptrINS2_4util6LoggerENS_14default_deleteIS7_EEEENS2_4sync6Client13ReconnectModeEbEUlvE_EEEEEPvSG_ + 91
6 libsystem_pthread.dylib 0x00007fffc66d69af _pthread_body + 180
7 libsystem_pthread.dylib 0x00007fffc66d68fb _pthread_body + 0
8 libsystem_pthread.dylib 0x00007fffc66d6101 thread_start + 13