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

RCTFont SIGABRT crash #13588

Closed
bitfused opened this issue Apr 19, 2017 · 21 comments
Closed

RCTFont SIGABRT crash #13588

bitfused opened this issue Apr 19, 2017 · 21 comments
Assignees
Labels
Bug Platform: iOS iOS applications. Resolution: Locked This issue was locked by the bot.

Comments

@bitfused
Copy link

Description

Experiencing following crash:
Crash log snippet
Exception Type: SIGABRT
Exception Codes: #0 at 0x186ac7014
Crashed Thread: 4
Thread 4 Crashed:
0 libsystem_kernel.dylib 0x0000000186ac7014 __pthread_kill + 8
1 libsystem_c.dylib 0x0000000186a3b400 abort + 140
2 libc++abi.dylib 0x00000001865052d4 __cxa_bad_cast + 0
3 libc++abi.dylib 0x0000000186522ca8 default_terminate_handler() + 280
4 libobjc.A.dylib 0x0000000186530860 _objc_terminate() + 152
5 libc++abi.dylib 0x000000018651f66c std::__terminate(void ()) + 16
6 libc++abi.dylib 0x000000018651ef84 __cxxabiv1::exception_cleanup_func(_Unwind_Reason_Code, _Unwind_Exception*) + 0
7 libc++.1.dylib 0x00000001864f578c std::_1::_throw_system_error(int, char const*) + 88
8 MyApp 0x00000001001adb24 +[RCTFont updateFont:withFamily:size:weight:style:variant:scaleMultiplier:] (RCTFont.mm:92)
9 MyApp 0x0000000100223d94 -[RCTShadowText _attributedStringWithFontFamily:fontSize:fontWeight:fontStyle:letterSpacing:useBackgroundColor:foregroundColor:backgroundColor:opacity:] (RCTShadowText.m:278)
10 MyApp 0x0000000100223b08 -[RCTShadowText attributedString] (RCTShadowText.m:235)
11 MyApp 0x0000000100223a14 -[RCTShadowText recomputeText] (RCTShadowText.m:228)
12 MyApp 0x000000010021a670 -[RCTTextManager uiBlockToAmendWithShadowViewRegistry:] (RCTTextManager.m:109)
13 MyApp 0x00000001001f9c9c -[RCTComponentData uiBlockToAmendWithShadowViewRegistry:] (RCTComponentData.m:459)
14 MyApp 0x00000001001f1c18 -[RCTUIManager _layoutAndMount] (RCTUIManager.m:1120)
15 MyApp 0x00000001001c511c __36-[RCTBatchedBridge batchDidComplete]_block_invoke (RCTBatchedBridge.m:1008)
16 libdispatch.dylib 0x00000001869821fc _dispatch_call_block_and_release + 24
17 libdispatch.dylib 0x00000001869821bc _dispatch_client_callout + 16
18 libdispatch.dylib 0x00000001869903dc _dispatch_queue_serial_drain + 928
19 libdispatch.dylib 0x00000001869859a4 _dispatch_queue_invoke + 652
20 libdispatch.dylib 0x000000018699234c _dispatch_root_queue_drain + 572
21 libdispatch.dylib 0x00000001869920ac _dispatch_worker_thread3 + 124
22 libsystem_pthread.dylib 0x0000000186b8b2a0 _pthread_wqthread + 1288
23 libsystem_pthread.dylib 0x0000000186b8ad8c start_wqthread + 4

Reproduction Steps

Cannot reproduce.

  • React Native version: 0.34
  • Platform: iOS
  • Development Operating System: Mac
  • Dev tools: Xcode
@nmhuang
Copy link

nmhuang commented Apr 20, 2017

oh! I have the same problem! help~

@nmhuang
Copy link

nmhuang commented Apr 20, 2017

Whether we can return directly to a fixed font without NSCache?

@shergin shergin added the Platform: iOS iOS applications. label Apr 20, 2017
@hramos
Copy link
Contributor

hramos commented Jul 25, 2017

Hi there! This issue is being closed because it has been inactive for a while. Maybe the issue has been fixed in a recent release, or perhaps it is not affecting a lot of people. Either way, we're automatically closing issues after a period of inactivity. Please do not take it personally!

If you think this issue should definitely remain open, please let us know. The following information is helpful when it comes to determining if the issue should be re-opened:

  • Does the issue still reproduce on the latest release candidate? Post a comment with the version you tested.
  • If so, is there any information missing from the bug report? Post a comment with all the information required by the issue template.
  • Is there a pull request that addresses this issue? Post a comment with the PR number so we can follow up.

If you would like to work on a patch to fix the issue, contributions are very welcome! Read through the contribution guide, and feel free to hop into #react-native if you need help planning your contribution.

@hramos hramos added the Icebox label Jul 25, 2017
@hramos hramos closed this as completed Jul 25, 2017
@shergin
Copy link
Contributor

shergin commented Jul 25, 2017

It is a known problem. 😢 (t16801791)

@shergin shergin reopened this Jul 25, 2017
@hramos hramos removed the Icebox label Jul 26, 2017
@nmhuang
Copy link

nmhuang commented Jul 26, 2017

So is this problem solved?

@shergin
Copy link
Contributor

shergin commented Jul 28, 2017

@nmhuang Not yet. 😢

@aethiss
Copy link

aethiss commented Sep 2, 2017

similar issue here...

2017-09-02 20:15:38.468 test5[41349:240675] *** Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '-[NSTaggedPointerString unsignedIntValue]: unrecognized selector sent to instance 0xa313730303930327' *** First throw call stack: ( 0 CoreFoundation 0x0000000109034b0b __exceptionPreprocess + 171 1 libobjc.A.dylib 0x0000000107eea141 objc_exception_throw + 48 2 CoreFoundation 0x00000001090a4134 -[NSObject(NSObject) doesNotRecognizeSelector:] + 132 3 CoreFoundation 0x0000000108fbb840 ___forwarding___ + 1024 4 CoreFoundation 0x0000000108fbb3b8 _CF_forwarding_prep_0 + 120 5 test5 0x000000010729fb14 -[RCTMultipartStreamReader emitProgress:contentLength:final:callback:] + 244 6 test5 0x00000001072a030a -[RCTMultipartStreamReader readAllPartsWithCompletionCallback:progressCallback:] + 1610 7 test5 0x00000001072efc3c -[RCTMultipartDataTask URLSession:streamTask:didBecomeInputStream:outputStream:] + 444 8 CFNetwork 0x0000000108a94c51 __88-[NSURLSession delegate_streamTask:didBecomeInputStream:outputStream:completionHandler:]_block_invoke + 51 9 Foundation 0x00000001079f43b7 __NSBLOCKOPERATION_IS_CALLING_OUT_TO_A_BLOCK__ + 7 10 Foundation 0x00000001079f40bb -[NSBlockOperation main] + 101 11 Foundation 0x00000001079f2877 -[__NSOperationInternal _start:] + 627 12 Foundation 0x00000001079ee5fc __NSOQSchedule_f + 198 13 libdispatch.dylib 0x000000010cd1605c _dispatch_client_callout + 8 14 libdispatch.dylib 0x000000010ccf494f _dispatch_queue_serial_drain + 221 15 libdispatch.dylib 0x000000010ccf5669 _dispatch_queue_invoke + 1084 16 libdispatch.dylib 0x000000010ccf7ec4 _dispatch_root_queue_drain + 634 17 libdispatch.dylib 0x000000010ccf7bef _dispatch_worker_thread3 + 123 18 libsystem_pthread.dylib 0x000000010d0ad5a2 _pthread_wqthread + 1299 19 libsystem_pthread.dylib 0x000000010d0ad07d start_wqthread + 13 ) libc++abi.dylib: terminating with uncaught exception of type NSException

@shergin
Copy link
Contributor

shergin commented Sep 3, 2017

@aethiss Your crash looks like #15755, actually.

But... If anyone has similar problems (crash related to UIFont, UILabel and so on), please feel free to share your crashes here, it can be extremely helpful for solving this problem.

@raspasov
Copy link

raspasov commented Dec 3, 2017

Possibly related crash in:

**RCTFont.mm line 106
+[RCTFont updateFont:withFamily:size:weight:style:variant:scaleMultiplier:]**

React Native version: 0.50.3

It happens not very often but consistently a few times per week to different users. I haven't been able to reproduce it myself.

# Date: 2017-12-02T23:19:00Z
# OS Version: 11.1.2 (15B202)
# Device: iPhone 6
# RAM Free: 8.9%
# Disk Free: 7.7%

#10. Crashed: com.twitter.crashlytics.ios.exception
0  MyAppName                    0x100e73fd8 CLSProcessRecordAllThreads (CLSProcess.c:376)
1  MyAppName                    0x100e73fd8 CLSProcessRecordAllThreads (CLSProcess.c:376)
2  MyAppName                    0x100e73e88 CLSProcessRecordAllThreads (CLSProcess.c:407)
3  MyAppName                    0x100e64154 CLSHandler (CLSHandler.m:26)
4  MyAppName                    0x100e71fc0 __CLSExceptionRecord_block_invoke (CLSException.mm:199)
5  libdispatch.dylib              0x186579048 _dispatch_client_callout + 16
6  libdispatch.dylib              0x186581ae8 _dispatch_queue_barrier_sync_invoke_and_complete + 56
7  MyAppName                    0x100e71a6c CLSExceptionRecord (CLSException.mm:206)
8  MyAppName                    0x100e7157c CLSTerminateHandler() (CLSException.mm:265)
9  libc++abi.dylib                0x185e3454c std::__terminate(void (*)()) + 16
10 libc++abi.dylib                0x185e33ea8 __cxxabiv1::exception_cleanup_func(_Unwind_Reason_Code, _Unwind_Exception*) + 134
11 libc++.1.dylib                 0x185e0a7c8 std::__1::__throw_system_error(int, char const*) + 88
12 libc++.1.dylib                 0x185dfc238 std::__1::mutex::try_lock() + 34
13 MyAppName                    0x100de21fc +[RCTFont updateFont:withFamily:size:weight:style:variant:scaleMultiplier:] (RCTFont.mm:106)
14 MyAppName                    0x100ec4690 -[RCTShadowText _attributedStringWithFontFamily:fontSize:fontWeight:fontStyle:letterSpacing:useBackgroundColor:foregroundColor:backgroundColor:opacity:] (RCTShadowText.m:300)
15 MyAppName                    0x100ec43c8 -[RCTShadowText attributedString] (RCTShadowText.m:251)
16 MyAppName                    0x100ec42d4 -[RCTShadowText recomputeText] (RCTShadowText.m:244)
17 MyAppName                    0x100eb8960 -[RCTTextManager uiBlockToAmendWithShadowViewRegistry:] (RCTTextManager.m:106)
18 MyAppName                    0x100e21e00 -[RCTComponentData uiBlockToAmendWithShadowViewRegistry:] (RCTComponentData.m:440)
19 MyAppName                    0x100e19514 -[RCTUIManager _layoutAndMount] (RCTUIManager.m:1078)
20 MyAppName                    0x100dbaea4 __32-[RCTCxxBridge batchDidComplete]_block_invoke (RCTCxxBridge.mm:1274)
21 libdispatch.dylib              0x186579088 _dispatch_call_block_and_release + 24
22 libdispatch.dylib              0x186579048 _dispatch_client_callout + 16
23 libdispatch.dylib              0x186582e48 _dispatch_queue_serial_drain$VARIANT$mp + 528
24 libdispatch.dylib              0x1865837d8 _dispatch_queue_invoke$VARIANT$mp + 340
25 libdispatch.dylib              0x186584200 _dispatch_root_queue_drain_deferred_wlh$VARIANT$mp + 400
26 libdispatch.dylib              0x18658c4a0 _dispatch_workloop_worker_thread$VARIANT$mp + 644
27 libsystem_pthread.dylib        0x18681efd0 _pthread_wqthread + 932
28 libsystem_pthread.dylib        0x18681ec20 start_wqthread + 4

--

Fatal Exception: std::__1::system_error: mutex lock failed: Invalid argument


#0. com.apple.main-thread
0  libFosl_dynamic.dylib          0x18bb1d700 (null) + 390564
1  libsystem_c.dylib              0x18667dbb8 __cxa_finalize_ranges + 384
2  libsystem_c.dylib              0x1866270a0 exit + 24
3  UIKit                          0x1900b4670 -[UIApplication applicationWillTerminate] + 474
4  UIKit                          0x19052bd58 __98-[__UICanvasLifecycleMonitor_Compatability deactivateEventsOnly:withContext:forceExit:completion:]_block_invoke.271 + 344
5  UIKit                          0x19029cf68 _runAfterCACommitDeferredBlocks + 292
6  UIKit                          0x19029030c _cleanUpAfterCAFlushAndRunDeferredBlocks + 288
7  UIKit                          0x19001fabc _afterCACommitHandler + 132
8  CoreFoundation                 0x186b9d848 __CFRUNLOOP_IS_CALLING_OUT_TO_AN_OBSERVER_CALLBACK_FUNCTION__ + 32
9  CoreFoundation                 0x186b9b200 __CFRunLoopDoObservers + 412
10 CoreFoundation                 0x186b9b7bc __CFRunLoopRun + 1292
11 CoreFoundation                 0x186abbfb8 CFRunLoopRunSpecific + 436
12 GraphicsServices               0x188953f84 GSEventRunModal + 100
13 UIKit                          0x1900902e8 UIApplicationMain + 208
14 MyAppName                    0x100d16a94 main (main.m:16)
15 libdyld.dylib                  0x1865de56c start + 4

#1. com.apple.uikit.eventfetch-thread
0  libsystem_kernel.dylib         0x1866ecbc4 mach_msg_trap + 8
1  libsystem_kernel.dylib         0x1866eca3c mach_msg + 72
2  CoreFoundation                 0x186b9dc74 __CFRunLoopServiceMachPort + 196
3  CoreFoundation                 0x186b9b840 __CFRunLoopRun + 1424
4  CoreFoundation                 0x186abbfb8 CFRunLoopRunSpecific + 436
5  Foundation                     0x1874e56e4 -[NSRunLoop(NSRunLoop) runMode:beforeDate:] + 304
6  Foundation                     0x187504afc -[NSRunLoop(NSRunLoop) runUntilDate:] + 96
7  UIKit                          0x190bef2f4 -[UIEventFetcher threadMain] + 136
8  Foundation                     0x1875e6860 __NSThread__start__ + 996
9  libsystem_pthread.dylib        0x18682031c _pthread_body + 308
10 libsystem_pthread.dylib        0x1868201e8 _pthread_body + 310
11 libsystem_pthread.dylib        0x18681ec28 thread_start + 4

#2. com.twitter.crashlytics.ios.MachExceptionServer
0  libsystem_kernel.dylib         0x1866ecbc4 mach_msg_trap + 8
1  libsystem_kernel.dylib         0x1866eca3c mach_msg + 72
2  MyAppName                    0x100e5efd4 CLSMachExceptionServer (CLSMachException.c:180)
3  libsystem_pthread.dylib        0x18682031c _pthread_body + 308
4  libsystem_pthread.dylib        0x1868201e8 _pthread_body + 310
5  libsystem_pthread.dylib        0x18681ec28 thread_start + 4

#3. com.apple.NSURLConnectionLoader
0  libsystem_kernel.dylib         0x1866ecbc4 mach_msg_trap + 8
1  libsystem_kernel.dylib         0x1866eca3c mach_msg + 72
2  CoreFoundation                 0x186b9dc74 __CFRunLoopServiceMachPort + 196
3  CoreFoundation                 0x186b9b840 __CFRunLoopRun + 1424
4  CoreFoundation                 0x186abbfb8 CFRunLoopRunSpecific + 436
5  CFNetwork                      0x187226264 +[NSURLConnection(Loader) _resourceLoadLoop:] + 404
6  Foundation                     0x1875e6860 __NSThread__start__ + 996
7  libsystem_pthread.dylib        0x18682031c _pthread_body + 308
8  libsystem_pthread.dylib        0x1868201e8 _pthread_body + 310
9  libsystem_pthread.dylib        0x18681ec28 thread_start + 4

#4. Thread
0  libsystem_kernel.dylib         0x18670d150 __psynch_cvwait + 8
1  libsystem_pthread.dylib        0x186822d30 _pthread_cond_wait$VARIANT$mp + 640
2  libc++.1.dylib                 0x185dc7f34 std::__1::condition_variable::__do_timed_wait(std::__1::unique_lock<std::__1::mutex>&, std::__1::chrono::time_point<std::__1::chrono::system_clock, std::__1::chrono::duration<long long, std::__1::ratio<1l, 1000000000l> > >) + 96
3  JavaScriptCore                 0x18de69dd0 std::__1::cv_status std::__1::condition_variable::wait_until<std::__1::chrono::steady_clock, std::__1::chrono::duration<long long, std::__1::ratio<1l, 1000000000l> > >(std::__1::unique_lock<std::__1::mutex>&, std::__1::chrono::time_point<std::__1::chrono::steady_clock, std::__1::chrono::duration<long long, std::__1::ratio<1l, 1000000000l> > > const&) + 124
4  JavaScriptCore                 0x18de69ca4 std::__1::cv_status std::__1::condition_variable_any::wait_until<std::__1::unique_lock<bmalloc::Mutex>, std::__1::chrono::steady_clock, std::__1::chrono::duration<long long, std::__1::ratio<1l, 1000000000l> > >(std::__1::unique_lock<bmalloc::Mutex>&, std::__1::chrono::time_point<std::__1::chrono::steady_clock, std::__1::chrono::duration<long long, std::__1::ratio<1l, 1000000000l> > > const&) + 108
5  JavaScriptCore                 0x18de69b28 bmalloc::AsyncTask<bmalloc::Heap, void (bmalloc::Heap::*)()>::threadRunLoop() + 280
6  JavaScriptCore                 0x18de69e20 void* std::__1::__thread_proxy<std::__1::tuple<std::__1::unique_ptr<std::__1::__thread_struct, std::__1::default_delete<std::__1::__thread_struct> >, void (*)(bmalloc::AsyncTask<bmalloc::Heap, void (bmalloc::Heap::*)()>*), bmalloc::AsyncTask<bmalloc::Heap, void (bmalloc::Heap::*)()>*> >(void*) + 44
7  libsystem_pthread.dylib        0x18682031c _pthread_body + 308
8  libsystem_pthread.dylib        0x1868201e8 _pthread_body + 310
9  libsystem_pthread.dylib        0x18681ec28 thread_start + 4

#5. WebThread
0  libsystem_kernel.dylib         0x1866ecbc4 mach_msg_trap + 8
1  libsystem_kernel.dylib         0x1866eca3c mach_msg + 72
2  CoreFoundation                 0x186b9dc74 __CFRunLoopServiceMachPort + 196
3  CoreFoundation                 0x186b9b840 __CFRunLoopRun + 1424
4  CoreFoundation                 0x186abbfb8 CFRunLoopRunSpecific + 436
5  WebCore                        0x18e92fe04 RunWebThread(void*) + 456
6  libsystem_pthread.dylib        0x18682031c _pthread_body + 308
7  libsystem_pthread.dylib        0x1868201e8 _pthread_body + 310
8  libsystem_pthread.dylib        0x18681ec28 thread_start + 4

#6. com.apple.CoreMotion.MotionThread
0  libsystem_kernel.dylib         0x1866ecbc4 mach_msg_trap + 8
1  libsystem_kernel.dylib         0x1866eca3c mach_msg + 72
2  CoreFoundation                 0x186b9dc74 __CFRunLoopServiceMachPort + 196
3  CoreFoundation                 0x186b9b840 __CFRunLoopRun + 1424
4  CoreFoundation                 0x186abbfb8 CFRunLoopRunSpecific + 436
5  CoreFoundation                 0x186b0b098 CFRunLoopRun + 116
6  CoreMotion                     0x18beb6298 (null) + 226408
7  libsystem_pthread.dylib        0x18682031c _pthread_body + 308
8  libsystem_pthread.dylib        0x1868201e8 _pthread_body + 310
9  libsystem_pthread.dylib        0x18681ec28 thread_start + 4

#7. com.facebook.react.JavaScript
0  JavaScriptCore                 0x18dc5b8d8 llint_entry + 10440
1  JavaScriptCore                 0x18dc5a168 llint_entry + 4440
2  JavaScriptCore                 0x18dc5f984 llint_entry + 26996
3  JavaScriptCore                 0x18dc5f920 llint_entry + 26896
4  JavaScriptCore                 0x18dc5f920 llint_entry + 26896
5  JavaScriptCore                 0x18dc5f920 llint_entry + 26896
6  JavaScriptCore                 0x18dc5f920 llint_entry + 26896
7  JavaScriptCore                 0x18dc5f984 llint_entry + 26996
8  JavaScriptCore                 0x18dc5f920 llint_entry + 26896
9  JavaScriptCore                 0x18dc5f920 llint_entry + 26896
10 JavaScriptCore                 0x18dc5f920 llint_entry + 26896
11 JavaScriptCore                 0x18dc5f984 llint_entry + 26996
12 JavaScriptCore                 0x18dc5f984 llint_entry + 26996
13 JavaScriptCore                 0x18dc5f920 llint_entry + 26896
14 JavaScriptCore                 0x18dc5f920 llint_entry + 26896
15 JavaScriptCore                 0x18dc5f920 llint_entry + 26896
16 JavaScriptCore                 0x18dc5f920 llint_entry + 26896
17 JavaScriptCore                 0x18dc5f920 llint_entry + 26896
18 JavaScriptCore                 0x18dc5f920 llint_entry + 26896
19 JavaScriptCore                 0x18dc5f920 llint_entry + 26896
20 JavaScriptCore                 0x18dc5f920 llint_entry + 26896
21 JavaScriptCore                 0x18dc5f920 llint_entry + 26896
22 JavaScriptCore                 0x18dc5f920 llint_entry + 26896
23 JavaScriptCore                 0x18dc5fdd0 llint_entry + 28096
24 JavaScriptCore                 0x18dc5fdd0 llint_entry + 28096
25 JavaScriptCore                 0x18dc5f984 llint_entry + 26996
26 JavaScriptCore                 0x18dc58e40 vmEntryToJavaScript + 272
27 JavaScriptCore                 0x18db3e948 JSC::JITCode::execute(JSC::VM*, JSC::ProtoCallFrame*) + 136
28 JavaScriptCore                 0x18d563948 JSC::Interpreter::executeCall(JSC::ExecState*, JSC::JSObject*, JSC::CallType, JSC::CallData const&, JSC::JSValue, JSC::ArgList const&) + 400
29 JavaScriptCore                 0x18db739f0 JSC::boundThisNoArgsFunctionCall(JSC::ExecState*) + 452
30 JavaScriptCore                 0x18dc58f88 vmEntryToNative + 280
31 JavaScriptCore                 0x18d563990 JSC::Interpreter::executeCall(JSC::ExecState*, JSC::JSObject*, JSC::CallType, JSC::CallData const&, JSC::JSValue, JSC::ArgList const&) + 472
32 JavaScriptCore                 0x18d7b6d04 JSC::profiledCall(JSC::ExecState*, JSC::ProfilingReason, JSC::JSValue, JSC::CallType, JSC::CallData const&, JSC::JSValue, JSC::ArgList const&) + 168
33 JavaScriptCore                 0x18d5636f8 JSObjectCallAsFunction + 368
34 MyAppName                    0x100e2a3cc facebook::react::Object::callAsFunction(OpaqueJSValue*, int, OpaqueJSValue const* const*) const (Value.cpp:217)
35 MyAppName                    0x100e49ce0 facebook::react::JSCExecutor::callFunction(std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&, folly::dynamic const&) (Value.h:48)
36 MyAppName                    0x100e4915c std::__1::function<void (facebook::react::JSExecutor*)>::operator()(facebook::react::JSExecutor*) const (functional:1911)
37 MyAppName                    0x100dd8924 facebook::react::tryAndReturnError(std::__1::function<void ()> const&) (RCTCxxUtils.mm:97)
38 MyAppName                    0x100dd1844 facebook::react::RCTMessageThread::tryFunc(std::__1::function<void ()> const&) (RCTMessageThread.mm:62)
39 CoreFoundation                 0x186b9e0fc __CFRUNLOOP_IS_CALLING_OUT_TO_A_BLOCK__ + 20
40 CoreFoundation                 0x186b9d9cc __CFRunLoopDoBlocks + 288
41 CoreFoundation                 0x186b9b6b8 __CFRunLoopRun + 1032
42 CoreFoundation                 0x186abbfb8 CFRunLoopRunSpecific + 436
43 MyAppName                    0x100db3d1c +[RCTCxxBridge runRunLoop] (RCTCxxBridge.mm:249)
44 Foundation                     0x1875e6860 __NSThread__start__ + 996
45 libsystem_pthread.dylib        0x18682031c _pthread_body + 308
46 libsystem_pthread.dylib        0x1868201e8 _pthread_body + 310
47 libsystem_pthread.dylib        0x18681ec28 thread_start + 4

#8. Thread
0  libsystem_kernel.dylib         0x18670ddbc __workq_kernreturn + 8
1  libsystem_pthread.dylib        0x18681f134 _pthread_wqthread + 1288
2  libsystem_pthread.dylib        0x18681ec20 start_wqthread + 4

#9. Thread
0  libsystem_kernel.dylib         0x18670ddbc __workq_kernreturn + 8
1  libsystem_pthread.dylib        0x18681efa0 _pthread_wqthread + 884
2  libsystem_pthread.dylib        0x18681ec20 start_wqthread + 4

#10. Crashed: com.twitter.crashlytics.ios.exception
0  MyAppName                    0x100e73fd8 CLSProcessRecordAllThreads (CLSProcess.c:376)
1  MyAppName                    0x100e73fd8 CLSProcessRecordAllThreads (CLSProcess.c:376)
2  MyAppName                    0x100e73e88 CLSProcessRecordAllThreads (CLSProcess.c:407)
3  MyAppName                    0x100e64154 CLSHandler (CLSHandler.m:26)
4  MyAppName                    0x100e71fc0 __CLSExceptionRecord_block_invoke (CLSException.mm:199)
5  libdispatch.dylib              0x186579048 _dispatch_client_callout + 16
6  libdispatch.dylib              0x186581ae8 _dispatch_queue_barrier_sync_invoke_and_complete + 56
7  MyAppName                    0x100e71a6c CLSExceptionRecord (CLSException.mm:206)
8  MyAppName                    0x100e7157c CLSTerminateHandler() (CLSException.mm:265)
9  libc++abi.dylib                0x185e3454c std::__terminate(void (*)()) + 16
10 libc++abi.dylib                0x185e33ea8 __cxxabiv1::exception_cleanup_func(_Unwind_Reason_Code, _Unwind_Exception*) + 134
11 libc++.1.dylib                 0x185e0a7c8 std::__1::__throw_system_error(int, char const*) + 88
12 libc++.1.dylib                 0x185dfc238 std::__1::mutex::try_lock() + 34
13 MyAppName                    0x100de21fc +[RCTFont updateFont:withFamily:size:weight:style:variant:scaleMultiplier:] (RCTFont.mm:106)
14 MyAppName                    0x100ec4690 -[RCTShadowText _attributedStringWithFontFamily:fontSize:fontWeight:fontStyle:letterSpacing:useBackgroundColor:foregroundColor:backgroundColor:opacity:] (RCTShadowText.m:300)
15 MyAppName                    0x100ec43c8 -[RCTShadowText attributedString] (RCTShadowText.m:251)
16 MyAppName                    0x100ec42d4 -[RCTShadowText recomputeText] (RCTShadowText.m:244)
17 MyAppName                    0x100eb8960 -[RCTTextManager uiBlockToAmendWithShadowViewRegistry:] (RCTTextManager.m:106)
18 MyAppName                    0x100e21e00 -[RCTComponentData uiBlockToAmendWithShadowViewRegistry:] (RCTComponentData.m:440)
19 MyAppName                    0x100e19514 -[RCTUIManager _layoutAndMount] (RCTUIManager.m:1078)
20 MyAppName                    0x100dbaea4 __32-[RCTCxxBridge batchDidComplete]_block_invoke (RCTCxxBridge.mm:1274)
21 libdispatch.dylib              0x186579088 _dispatch_call_block_and_release + 24
22 libdispatch.dylib              0x186579048 _dispatch_client_callout + 16
23 libdispatch.dylib              0x186582e48 _dispatch_queue_serial_drain$VARIANT$mp + 528
24 libdispatch.dylib              0x1865837d8 _dispatch_queue_invoke$VARIANT$mp + 340
25 libdispatch.dylib              0x186584200 _dispatch_root_queue_drain_deferred_wlh$VARIANT$mp + 400
26 libdispatch.dylib              0x18658c4a0 _dispatch_workloop_worker_thread$VARIANT$mp + 644
27 libsystem_pthread.dylib        0x18681efd0 _pthread_wqthread + 932
28 libsystem_pthread.dylib        0x18681ec20 start_wqthread + 4

#11. Thread
0  libsystem_pthread.dylib        0x18681ec1c start_wqthread + 122

#12. Thread
0  libsystem_kernel.dylib         0x18670ddbc __workq_kernreturn + 8
1  libsystem_pthread.dylib        0x18681efa0 _pthread_wqthread + 884
2  libsystem_pthread.dylib        0x18681ec20 start_wqthread + 4

#13. Thread
0  libsystem_pthread.dylib        0x18681ec1c start_wqthread + 122


@prithsharma
Copy link

Facing crashes with similar reports -

RCTFont.mm line 92
+[RCTFont updateFont:withFamily:size:weight:style:variant:scaleMultiplier:]
Fatal Exception: std::__1::system_error: mutex lock failed: Invalid argument
Crashed: com.twitter.crashlytics.ios.exception
0  qplum                          0x1010a31f8 CLSProcessRecordAllThreads (CLSProcess.c:376)
1  qplum                          0x1010a31f8 CLSProcessRecordAllThreads (CLSProcess.c:376)
2  qplum                          0x1010a30a8 CLSProcessRecordAllThreads (CLSProcess.c:407)
3  qplum                          0x10109399c CLSHandler (CLSHandler.m:26)
4  qplum                          0x1010a129c __CLSExceptionRecord_block_invoke (CLSException.mm:199)
5  libdispatch.dylib              0x184746a14 _dispatch_client_callout + 16
6  libdispatch.dylib              0x18474f618 _dispatch_queue_barrier_sync_invoke_and_complete + 56
7  qplum                          0x1010a0d48 CLSExceptionRecord (CLSException.mm:206)
8  qplum                          0x1010a0858 CLSTerminateHandler() (CLSException.mm:265)
9  libc++abi.dylib                0x18400054c std::__terminate(void (*)()) + 16
10 libc++abi.dylib                0x183fffea8 __cxxabiv1::exception_cleanup_func(_Unwind_Reason_Code, _Unwind_Exception*) + 134
11 libc++.1.dylib                 0x183fd67c8 std::__1::__throw_system_error(int, char const*) + 88
12 libc++.1.dylib                 0x183fc8238 std::__1::mutex::try_lock() + 34
13 qplum                          0x1010fbba4 +[RCTFont updateFont:withFamily:size:weight:style:variant:scaleMultiplier:] (RCTFont.mm:92)
14 qplum                          0x10117e690 -[RCTShadowText _attributedStringWithFontFamily:fontSize:fontWeight:fontStyle:letterSpacing:useBackgroundColor:foregroundColor:backgroundColor:opacity:] (RCTShadowText.m:298)
15 qplum                          0x10117e3c8 -[RCTShadowText attributedString] (RCTShadowText.m:249)
16 qplum                          0x10117e2d4 -[RCTShadowText recomputeText] (RCTShadowText.m:242)
17 qplum                          0x101173ad0 -[RCTTextManager uiBlockToAmendWithShadowViewRegistry:] (RCTTextManager.m:105)
18 qplum                          0x1011420a8 -[RCTComponentData uiBlockToAmendWithShadowViewRegistry:] (RCTComponentData.m:453)
19 qplum                          0x1011391c8 -[RCTUIManager _layoutAndMount] (RCTUIManager.m:1151)
20 qplum                          0x101112774 __36-[RCTBatchedBridge batchDidComplete]_block_invoke (RCTBatchedBridge.m:1034)
21 libdispatch.dylib              0x184746a54 _dispatch_call_block_and_release + 24
22 libdispatch.dylib              0x184746a14 _dispatch_client_callout + 16
23 libdispatch.dylib              0x18475096c _dispatch_queue_serial_drain$VARIANT$mp + 528
24 libdispatch.dylib              0x1847512fc _dispatch_queue_invoke$VARIANT$mp + 340
25 libdispatch.dylib              0x184751d20 _dispatch_root_queue_drain_deferred_wlh$VARIANT$mp + 404
26 libdispatch.dylib              0x18475a03c _dispatch_workloop_worker_thread$VARIANT$mp + 644
27 libsystem_pthread.dylib        0x1849eef1c _pthread_wqthread + 932
28 libsystem_pthread.dylib        0x1849eeb6c start_wqthread + 4

@brunolemos
Copy link
Contributor

I have this too, on a very small portion of the users:

image

React Native 0.49.5

@ClayChristmas
Copy link

ClayChristmas commented Mar 21, 2018

@shergin do you need more logs/examples of this? I'm seeing this and Crashlytics is reporting 100% of the time it happens the app is in the background. Seeing the same exception occur but getting it in two different lines of RCTFont.mm. If you need more examples/crash logs please let me know and I'll post some. *Edit - also we are on React Native 0.51.0 when seeing this.

@yeatse
Copy link

yeatse commented Mar 22, 2018

It occurs when user forces quit the app while the executor still executing. To get rid of this you can invalidate the bridge manually in -[YourAppDelegate applicationWillTerminate:] and wait for the invalidation to finish:

#import <React/RCTBridge+Private.h>

- (void)applicationWillTerminate:(UIApplication *)application {
    RCTBridge *batchedBridge = self.rctBridge.batchedBridge;
    [self.rctBridge invalidate];

    NSRunLoop *runLoop = [NSRunLoop currentRunLoop];
    NSArray<NSRunLoopMode> *allModes = CFBridgingRelease(CFRunLoopCopyAllModes(runLoop.getCFRunLoop));
    while (batchedBridge.moduleClasses) {
        for (NSRunLoopMode mode in allModes) {
            [runLoop runMode:mode beforeDate:[NSDate dateWithTimeIntervalSinceNow:0.1]];
        }
    }
}

We are using RCTBatchedBridge and the lines above solved this problem. Maybe it also works with CxxBridge.

@BorisMisnik
Copy link

Hello @yeatse! I have a question, can u help me please... with code below
RCTBridge *batchedBridge = self.batchedBridge;
How I can create RCTBridge and attach it to property batchedBridge? I guess property wll be stored in AppDelegate interface?!
To create this property there some needs to provide RCTBridgeDelegate, where I can find it?
Could you provide please examples??

@yeatse
Copy link

yeatse commented Mar 27, 2018

@BorisMisnik If you create your app with command create-react-native-app, you can modify your AppDelegate.m like this:
https://gist.github.com/Yeatse/7259d37ab730659065fb734bda3aeae5

@brunolemos
Copy link
Contributor

I don't know if this is related or not, but:

I just found out some of our users had names like جمال, with non english special characters. It was causing big issues, like basically all app breaking (all screens would stop rendering), an on debug mode I would get this error: ExceptionsManager.js:71 Timed out waiting for modules to be invalidated.

For me, the solution was to remove the letterSpacing style property that I was using. Then everything works.

The weird thing is that I'm not able to reproduce this on a new react-native project, only on this existing one. Both uses latest rn version.

@EricPKerr
Copy link

Has there been a solution to this? I'm still on react-native 0.53.3 but this happens as described by everyone else (seemingly randomly to a very small group of users, 100% in the background).

@TeruyaHaroldo
Copy link

+1

@chuganzy
Copy link
Contributor

Opened a PR for this issue.
#22607

@DimitryDushkin
Copy link

DimitryDushkin commented Jan 16, 2019

Thread 34 name:
Thread 34 Crashed:
0   libsystem_kernel.dylib        	0x2356ac5c __pthread_kill + 8
1   libsystem_pthread.dylib       	0x23614732 pthread_kill + 62 (pthread.c:1247)
2   libsystem_c.dylib             	0x234ff0ac abort + 108 (abort.c:91)
3   libc++abi.dylib               	0x23056ae4 abort_message + 108 (abort_message.cpp:47)
4   libc++abi.dylib               	0x2306f668 default_terminate_handler() + 212 (cxa_default_handlers.cpp:62)
5   libobjc.A.dylib               	0x2307b0d4 _objc_terminate() + 228 (objc-exception.mm:681)
6   housing_app                    	0x02913a60 0x92000 + 42474080
7   libc++abi.dylib               	0x2306ce16 std::__terminate(void (*)()) + 78 (cxa_handlers.cpp:67)
8   libc++abi.dylib               	0x2306c5f4 __cxa_throw + 112 (cxa_exception.cpp:147)
9   libc++.1.dylib                	0x2304f528 std::__1::__throw_system_error(int, char const*) + 180 (system_error.cpp:197)
10  rn_app                       	0x05264a56 +[RCTFont updateFont:withFamily:size:weight:style:variant:scaleMultiplier:] + 666198 (RCTFont.mm:135)
11  rn_app                       	0x052b7210 -[RCTTextAttributes effectiveFont] + 1004048 (RCTTextAttributes.m:183)
12  rn_app                       	0x052b8d8a -[RCTTextShadowView textStorageAndLayoutManagerThatFitsSize:exclusiveOwnership:] + 1011082 (RCTTextShadowView.m:226)
13  rn_app                       	0x052b8ff4 -[RCTTextShadowView layoutSubviewsWithContext:] + 1011700 (RCTTextShadowView.m:0)
14  rn_app                       	0x052a4cd8 -[RCTShadowView layoutSubviewsWithContext:] + 928984 (RCTShadowView.m:339)
15  rn_app                       	0x052a4cd8 -[RCTShadowView layoutSubviewsWithContext:] + 928984 (RCTShadowView.m:339)
16  rn_app                       	0x052a4cd8 -[RCTShadowView layoutSubviewsWithContext:] + 928984 (RCTShadowView.m:339)
17  rn_app                       	0x052a4cd8 -[RCTShadowView layoutSubviewsWithContext:] + 928984 (RCTShadowView.m:339)
18  rn_app                       	0x052a4cd8 -[RCTShadowView layoutSubviewsWithContext:] + 928984 (RCTShadowView.m:339)
19  rn_app                       	0x052a4cd8 -[RCTShadowView layoutSubviewsWithContext:] + 928984 (RCTShadowView.m:339)
20  rn_app                       	0x052a4cd8 -[RCTShadowView layoutSubviewsWithContext:] + 928984 (RCTShadowView.m:339)
21  rn_app                       	0x052a4cd8 -[RCTShadowView layoutSubviewsWithContext:] + 928984 (RCTShadowView.m:339)
22  rn_app                       	0x052a4cd8 -[RCTShadowView layoutSubviewsWithContext:] + 928984 (RCTShadowView.m:339)
23  rn_app                       	0x052a4cd8 -[RCTShadowView layoutSubviewsWithContext:] + 928984 (RCTShadowView.m:339)
24  rn_app                       	0x052a4cd8 -[RCTShadowView layoutSubviewsWithContext:] + 928984 (RCTShadowView.m:339)
25  rn_app                       	0x052a4cd8 -[RCTShadowView layoutSubviewsWithContext:] + 928984 (RCTShadowView.m:339)
26  rn_app                       	0x052a4cd8 -[RCTShadowView layoutSubviewsWithContext:] + 928984 (RCTShadowView.m:339)
27  rn_app                       	0x052a4cd8 -[RCTShadowView layoutSubviewsWithContext:] + 928984 (RCTShadowView.m:339)
28  rn_app                       	0x052a4cd8 -[RCTShadowView layoutSubviewsWithContext:] + 928984 (RCTShadowView.m:339)
29  rn_app                       	0x052a4cd8 -[RCTShadowView layoutSubviewsWithContext:] + 928984 (RCTShadowView.m:339)
30  rn_app                       	0x052a4cd8 -[RCTShadowView layoutSubviewsWithContext:] + 928984 (RCTShadowView.m:339)
31  rn_app                       	0x052a49cc -[RCTShadowView layoutWithMinimumSize:maximumSize:layoutDirection:layoutContext:] + 928204 (RCTShadowView.m:299)
32  rn_app                       	0x0529af2c -[RCTRootShadowView layoutWithAffectedShadowViews:] + 888620 (RCTRootShadowView.m:34)
33  rn_app                       	0x052c0672 -[RCTUIManager uiBlockWithLayoutUpdateForRootView:] + 1042034 (RCTUIManager.m:481)
34  rn_app                       	0x052c41ce -[RCTUIManager _layoutAndMount] + 1057230 (RCTUIManager.m:1076)
35  rn_app                       	0x05257f2e __32-[RCTCxxBridge batchDidComplete]_block_invoke + 614190 (RCTCxxBridge.mm:0)
36  libdispatch.dylib             	0x2344d822 _dispatch_call_block_and_release + 10 (init.c:760)
37  libdispatch.dylib             	0x2345a422 _dispatch_queue_drain$VARIANT$mp + 1758 (inline_internal.h:1063)
38  libdispatch.dylib             	0x23459a60 _dispatch_queue_invoke$VARIANT$mp + 284 (queue.c:3644)
39  libdispatch.dylib             	0x2345c15c _dispatch_root_queue_drain + 396 (inline_internal.h:1043)
40  libdispatch.dylib             	0x2345bfcc _dispatch_worker_thread3 + 96 (queue.c:4249)
41  libsystem_pthread.dylib       	0x23611b28 _pthread_wqthread + 1024 (pthread.c:1990)
42  libsystem_pthread.dylib       	0x23611718 start_wqthread + 8 (pthread_asm.s:147)

facebook-github-bot pushed a commit that referenced this issue Feb 14, 2019
Summary:
Try to solve #13588
ref: facebook/componentkit#906
Pull Request resolved: #22607

Differential Revision: D14084056

Pulled By: shergin

fbshipit-source-id: 585aef758e1a215e825ae12914c5011d790a69b0
JAStanton pushed a commit to convoyinc/react-native that referenced this issue Feb 19, 2019
Summary:
Try to solve facebook#13588
ref: facebook/componentkit#906
Pull Request resolved: facebook#22607

Differential Revision: D14084056

Pulled By: shergin

fbshipit-source-id: 585aef758e1a215e825ae12914c5011d790a69b0
JAStanton pushed a commit to convoyinc/react-native that referenced this issue Feb 19, 2019
Summary:
Try to solve facebook#13588
ref: facebook/componentkit#906
Pull Request resolved: facebook#22607

Differential Revision: D14084056

Pulled By: shergin

fbshipit-source-id: 585aef758e1a215e825ae12914c5011d790a69b0
JAStanton pushed a commit to convoyinc/react-native that referenced this issue Feb 19, 2019
Summary:
Try to solve facebook#13588
ref: facebook/componentkit#906
Pull Request resolved: facebook#22607

Differential Revision: D14084056

Pulled By: shergin

fbshipit-source-id: 585aef758e1a215e825ae12914c5011d790a69b0
JAStanton pushed a commit to convoyinc/react-native that referenced this issue Feb 19, 2019
Summary:
Try to solve facebook#13588
ref: facebook/componentkit#906
Pull Request resolved: facebook#22607

Differential Revision: D14084056

Pulled By: shergin

fbshipit-source-id: 585aef758e1a215e825ae12914c5011d790a69b0
paullinator added a commit to EdgeApp/edge-react-gui that referenced this issue Mar 4, 2019
This commit implements the following PR as a patch to RCTFont.mm.
facebook/react-native#22607

This is an attempt at fixing a high count Bugsnag reported crash which has a profile similar to
facebook/react-native#13588
paullinator added a commit to EdgeApp/edge-react-gui that referenced this issue Mar 4, 2019
This commit implements the following PR as a patch to RCTFont.mm.
facebook/react-native#22607

This is an attempt at fixing a high count Bugsnag reported crash which has a profile similar to
facebook/react-native#13588
@grabbou grabbou closed this as completed Mar 19, 2019
@grabbou
Copy link
Contributor

grabbou commented Mar 19, 2019

This issue has been fixed in the PR, but the PR didn't have "fixes XYZ".

@facebook facebook locked as resolved and limited conversation to collaborators Mar 20, 2020
@react-native-bot react-native-bot added the Resolution: Locked This issue was locked by the bot. label Mar 20, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Bug Platform: iOS iOS applications. Resolution: Locked This issue was locked by the bot.
Projects
None yet
Development

No branches or pull requests