EXC_BAD_ACCESS folly::Expected<long long, folly::ConversionCode>
OS:
- [ ] Windows
- [x] MacOS
- [ ] Linux
Platform:
- [x] iOS
- [ ] Android
Output of node -v && npm -v && npm ls --prod --depth=0
v6.9.4
3.10.10
Config:
Sentry.config(Config.SENTRY_DSN, {deactivateStacktraceMerging: true}).install();
I get this error in production, both on iOS and Android. I have seen people reporting this in the past. I don't have anyway to reproduce this, it just shows up from time to time. I am using 0.31.0.
Attempted to dereference garbage pointer 0xa6a7beb8. Originated at or in a subcall of folly::Expected<long long, folly::ConversionCode> folly::detail::str_to_integral<long long>(folly::Range<char const*>*)
Hey, thank you for reporting. If I remember correctly you posted this in another issue before, right? Thank you for creating a separate issue. Still, without a repro case it's hard for us to fix it. I will still keep this issue open for some time to see if something changes.
Thanks @HazAT, this has become a daily routine and I really don't have anyway to reproduce this.
I had a look at the logs, since I keep seeing more events like this. It seems to be iOS 11+ only, I have included a Stacktrace below. I am not sure if this is a sentry issue at this point.
I have seen there are other people facing this issue with realm-js, code-push and sentry. However, we only use the latter.
OS Version: iOS 11.2.2 (15C202)
Report Version: 104
Exception Type: EXC_BAD_ACCESS (SIGBUS)
Exception Codes: BUS_NOOP at 0x0000000c1707beb8
Crashed Thread: 0
Application Specific Information:
Attempted to dereference garbage pointer 0xc1707beb8.
Originated at or in a subcall of folly::Expected<long long, folly::ConversionCode> folly::detail::str_to_integral<long long>(folly::Range<char const*>*)
Thread 0 Crashed:
0 libobjc.A.dylib 0x300d94430 objc_msgSend
1 UIKit 0x316024330 -[UIInputWindowController setInputViewSet:]
2 UIKit 0x31601c26c -[UIInputWindowController performOperations:withAnimationStyle:]
3 UIKit 0x31550dfdc -[UIPeripheralHost(UIKitInternal) setInputViews:animationStyle:]
4 UIKit 0x31547fa7c -[UIPeripheralHost(UIKitInternal) _reloadInputViewsForResponder:]
5 UIKit 0x31547f0a4 -[UIResponder(UIResponderInputViewAdditions) reloadInputViews]
6 UIKit 0x31554b6fc -[UITextField becomeFirstResponder]
7 emma 0x202b6750c folly::Expected<long long, folly::ConversionCode> folly::detail::str_to_integral<long long>(folly::Range<char const*>*)
8 emma 0x202b635c0 folly::Expected<long long, folly::ConversionCode> folly::detail::str_to_integral<long long>(folly::Range<char const*>*)
9 UIKit 0x315472670 -[UIViewController _setViewAppearState:isAnimating:]
10 UIKit 0x31551a64c -[UINavigationController viewDidAppear:]
11 emma 0x202b72a2c folly::Expected<long long, folly::ConversionCode> folly::detail::str_to_integral<long long>(folly::Range<char const*>*)
12 UIKit 0x315472670 -[UIViewController _setViewAppearState:isAnimating:]
13 UIKit 0x315472bdc -[UIViewController _endAppearanceTransition:]
14 UIKit 0x3157a254c -[UIPresentationController transitionDidFinish:]
15 UIKit 0x3159879b4 -[_UICurrentContextPresentationController transitionDidFinish:]
16 UIKit 0x3157a6428 __56-[UIPresentationController runTransitionForCurrentState]_block_invoke_2
17 UIKit 0x31556a910 -[_UIViewControllerTransitionContext completeTransition:]
18 UIKit 0x31556a700 -[UITransitionView notifyDidCompleteTransition:]
19 UIKit 0x31556a198 -[UITransitionView _didCompleteTransition:]
20 UIKit 0x315569d1c -[UITransitionView _transitionDidStop:finished:]
21 UIKit 0x315491bb4 -[UIViewAnimationState sendDelegateAnimationDidStop:finished:]
22 UIKit 0x3154918c0 -[UIViewAnimationState animationDidStop:finished:]
23 UIKit 0x315491960 -[UIViewAnimationState animationDidStop:finished:]
24 QuartzCore 0x30a86fe14 CA::Layer::run_animation_callbacks(void*)
25 libdispatch.dylib 0x301bf3a14 _dispatch_client_callout
26 libdispatch.dylib 0x301c34c80 _dispatch_main_queue_callback_4CF$VARIANT$armv81
27 CoreFoundation 0x30275e544 __CFRUNLOOP_IS_SERVICING_THE_MAIN_DISPATCH_QUEUE__
28 CoreFoundation 0x30275c120 __CFRunLoopRun
29 CoreFoundation 0x30267be58 CFRunLoopRunSpecific
30 GraphicsServices 0x3063d6f84 GSEventRunModal
31 UIKit 0x3154bd67c UIApplicationMain
32 emma 0x202a1baa8 <redacted>
33 libdyld.dylib 0x301cbf56c start
Thread 1
0 libsystem_kernel.dylib 0x301efed80 __workq_kernreturn
1 libsystem_pthread.dylib 0x302144eec _pthread_wqthread
Thread 2 name: com.apple.uikit.eventfetch-thread
0 libsystem_kernel.dylib 0x301edd568 mach_msg_trap
1 libsystem_kernel.dylib 0x301edd3e0 mach_msg
2 CoreFoundation 0x30275e308 __CFRunLoopServiceMachPort
3 CoreFoundation 0x30275bed4 __CFRunLoopRun
4 CoreFoundation 0x30267be58 CFRunLoopRunSpecific
5 Foundation 0x303ae6594 -[NSRunLoop(NSRunLoop) runMode:beforeDate:]
6 Foundation 0x303b059ac -[NSRunLoop(NSRunLoop) runUntilDate:]
7 UIKit 0x3160277b8 -[UIEventFetcher threadMain]
8 Foundation 0x303be80f4 __NSThread__start__
9 libsystem_pthread.dylib 0x3021462b4 _pthread_body
10 libsystem_pthread.dylib 0x302146180 _pthread_start
Thread 3
0 libsystem_kernel.dylib 0x301efed80 __workq_kernreturn
1 libsystem_pthread.dylib 0x302144eec _pthread_wqthread
Thread 4 name: com.facebook.react.JavaScript
0 libsystem_kernel.dylib 0x301edd568 mach_msg_trap
1 libsystem_kernel.dylib 0x301edd3e0 mach_msg
2 CoreFoundation 0x30275e308 __CFRunLoopServiceMachPort
3 CoreFoundation 0x30275bed4 __CFRunLoopRun
4 CoreFoundation 0x30267be58 CFRunLoopRunSpecific
5 emma 0x202a7d41c __cxa_throw
6 Foundation 0x303be80f4 __NSThread__start__
7 libsystem_pthread.dylib 0x3021462b4 _pthread_body
8 libsystem_pthread.dylib 0x302146180 _pthread_start
Thread 5
0 libsystem_kernel.dylib 0x301efe0f0 __psynch_cvwait
1 libsystem_pthread.dylib 0x30214cf74 _pthread_cond_wait$VARIANT$armv81
2 libc++.1.dylib 0x300c87f34 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<(long)1, (long)1000000000> > >)
3 JavaScriptCore 0x310626168 std::__1::cv_status std::__1::condition_variable::wait_until<std::__1::chrono::steady_clock, std::__1::chrono::duration<long long, std::__1::ratio<(long)1, (long)1000000000> > >(std::__1::unique_lock<std::__1::mutex>&, std::__1::chrono::time_point<std::...
4 JavaScriptCore 0x31062603c 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<(long)1, (long)1000000000> > >(std::__1::unique_lock<bmalloc::M...
5 JavaScriptCore 0x310625ec0 bmalloc::AsyncTask<bmalloc::Heap, void (bmalloc::Heap::*)()>::threadRunLoop()
6 JavaScriptCore 0x3106261b8 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::He...
7 libsystem_pthread.dylib 0x3021462b4 _pthread_body
8 libsystem_pthread.dylib 0x302146180 _pthread_start
Thread 6 name: WebThread
0 libsystem_kernel.dylib 0x301edd568 mach_msg_trap
1 libsystem_kernel.dylib 0x301edd3e0 mach_msg
2 CoreFoundation 0x30275e308 __CFRunLoopServiceMachPort
3 CoreFoundation 0x30275bed4 __CFRunLoopRun
4 CoreFoundation 0x30267be58 CFRunLoopRunSpecific
5 WebCore 0x312527a34 RunWebThread(void*)
6 libsystem_pthread.dylib 0x3021462b4 _pthread_body
7 libsystem_pthread.dylib 0x302146180 _pthread_start
Thread 7
0 libsystem_kernel.dylib 0x301efed80 __workq_kernreturn
1 libsystem_pthread.dylib 0x302145080 _pthread_wqthread
Thread 8 name: com.apple.NSURLConnectionLoader
0 libsystem_kernel.dylib 0x301edd568 mach_msg_trap
1 libsystem_kernel.dylib 0x301edd3e0 mach_msg
2 CoreFoundation 0x30275e308 __CFRunLoopServiceMachPort
3 CoreFoundation 0x30275bed4 __CFRunLoopRun
4 CoreFoundation 0x30267be58 CFRunLoopRunSpecific
5 CFNetwork 0x303632128 -[__CoreSchedulingSetRunnable runForever]
6 Foundation 0x303be80f4 __NSThread__start__
7 libsystem_pthread.dylib 0x3021462b4 _pthread_body
8 libsystem_pthread.dylib 0x302146180 _pthread_start
Thread 9
0 libsystem_kernel.dylib 0x301efe60c __semwait_signal
1 libsystem_c.dylib 0x301d44f70 nanosleep
2 libsystem_c.dylib 0x301dadf34 sleep
3 emma 0x202a527b4 __cxa_throw
4 libsystem_pthread.dylib 0x3021462b4 _pthread_body
5 libsystem_pthread.dylib 0x302146180 _pthread_start
Thread 10 name: KSCrash Exception Handler (Secondary)
0 libsystem_kernel.dylib 0x301edd568 mach_msg_trap
1 libsystem_kernel.dylib 0x301edd3e0 mach_msg
2 emma 0x202a2e9f4 __cxa_throw
3 libsystem_pthread.dylib 0x3021462b4 _pthread_body
4 libsystem_pthread.dylib 0x302146180 _pthread_start
Thread 12
0 libsystem_kernel.dylib 0x301efe0f0 __psynch_cvwait
1 libsystem_pthread.dylib 0x30214cf74 _pthread_cond_wait$VARIANT$armv81
2 JavaScriptCore 0x30fc8b340 WTF::ThreadCondition::timedWait(WTF::Mutex&, double)
3 JavaScriptCore 0x31060b33c WTF::ParkingLot::parkConditionallyImpl(void const*, WTF::ScopedLambda<bool ()> const&, WTF::ScopedLambda<void ()> const&, WTF::TimeWithDynamicClockType const&)
4 JavaScriptCore 0x310176170 bool WTF::ConditionBase::waitUntil<WTF::Lock>(WTF::Lock&, WTF::TimeWithDynamicClockType const&)
5 JavaScriptCore 0x3105f727c WTF::Function<void ()>::CallableWrapper<WTF::AutomaticThread::start(WTF::AbstractLocker const&)::$_0>::call()
6 JavaScriptCore 0x30fc8770c WTF::threadEntryPoint(void*)
7 JavaScriptCore 0x30fc8764c WTF::wtfThreadEntryPoint(void*)
8 libsystem_pthread.dylib 0x3021462b4 _pthread_body
9 libsystem_pthread.dylib 0x302146180 _pthread_start
Thread 13
0 libsystem_kernel.dylib 0x301efe0f0 __psynch_cvwait
1 libsystem_pthread.dylib 0x30214cf74 _pthread_cond_wait$VARIANT$armv81
2 JavaScriptCore 0x30fc8b340 WTF::ThreadCondition::timedWait(WTF::Mutex&, double)
3 JavaScriptCore 0x31060b33c WTF::ParkingLot::parkConditionallyImpl(void const*, WTF::ScopedLambda<bool ()> const&, WTF::ScopedLambda<void ()> const&, WTF::TimeWithDynamicClockType const&)
4 JavaScriptCore 0x310176170 bool WTF::ConditionBase::waitUntil<WTF::Lock>(WTF::Lock&, WTF::TimeWithDynamicClockType const&)
5 JavaScriptCore 0x3105f727c WTF::Function<void ()>::CallableWrapper<WTF::AutomaticThread::start(WTF::AbstractLocker const&)::$_0>::call()
6 JavaScriptCore 0x30fc8770c WTF::threadEntryPoint(void*)
7 JavaScriptCore 0x30fc8764c WTF::wtfThreadEntryPoint(void*)
8 libsystem_pthread.dylib 0x3021462b4 _pthread_body
9 libsystem_pthread.dylib 0x302146180 _pthread_start
Thread 14
0 libsystem_kernel.dylib 0x301efe0f0 __psynch_cvwait
1 libsystem_pthread.dylib 0x30214cf74 _pthread_cond_wait$VARIANT$armv81
2 JavaScriptCore 0x30fc8b340 WTF::ThreadCondition::timedWait(WTF::Mutex&, double)
3 JavaScriptCore 0x31060b33c WTF::ParkingLot::parkConditionallyImpl(void const*, WTF::ScopedLambda<bool ()> const&, WTF::ScopedLambda<void ()> const&, WTF::TimeWithDynamicClockType const&)
4 JavaScriptCore 0x310176170 bool WTF::ConditionBase::waitUntil<WTF::Lock>(WTF::Lock&, WTF::TimeWithDynamicClockType const&)
5 JavaScriptCore 0x3105f727c WTF::Function<void ()>::CallableWrapper<WTF::AutomaticThread::start(WTF::AbstractLocker const&)::$_0>::call()
6 JavaScriptCore 0x30fc8770c WTF::threadEntryPoint(void*)
7 JavaScriptCore 0x30fc8764c WTF::wtfThreadEntryPoint(void*)
8 libsystem_pthread.dylib 0x3021462b4 _pthread_body
9 libsystem_pthread.dylib 0x302146180 _pthread_start
Thread 15
0 libsystem_kernel.dylib 0x301efe0f0 __psynch_cvwait
1 libsystem_pthread.dylib 0x30214cf74 _pthread_cond_wait$VARIANT$armv81
2 JavaScriptCore 0x30fc8b340 WTF::ThreadCondition::timedWait(WTF::Mutex&, double)
3 JavaScriptCore 0x31060b33c WTF::ParkingLot::parkConditionallyImpl(void const*, WTF::ScopedLambda<bool ()> const&, WTF::ScopedLambda<void ()> const&, WTF::TimeWithDynamicClockType const&)
4 JavaScriptCore 0x310176170 bool WTF::ConditionBase::waitUntil<WTF::Lock>(WTF::Lock&, WTF::TimeWithDynamicClockType const&)
5 JavaScriptCore 0x3105f727c WTF::Function<void ()>::CallableWrapper<WTF::AutomaticThread::start(WTF::AbstractLocker const&)::$_0>::call()
6 JavaScriptCore 0x30fc8770c WTF::threadEntryPoint(void*)
7 JavaScriptCore 0x30fc8764c WTF::wtfThreadEntryPoint(void*)
8 libsystem_pthread.dylib 0x3021462b4 _pthread_body
9 libsystem_pthread.dylib 0x302146180 _pthread_start
Thread 16
0 libsystem_kernel.dylib 0x301efe0f0 __psynch_cvwait
1 libsystem_pthread.dylib 0x30214cf74 _pthread_cond_wait$VARIANT$armv81
2 JavaScriptCore 0x30fc8b340 WTF::ThreadCondition::timedWait(WTF::Mutex&, double)
3 JavaScriptCore 0x31060b33c WTF::ParkingLot::parkConditionallyImpl(void const*, WTF::ScopedLambda<bool ()> const&, WTF::ScopedLambda<void ()> const&, WTF::TimeWithDynamicClockType const&)
4 JavaScriptCore 0x310176170 bool WTF::ConditionBase::waitUntil<WTF::Lock>(WTF::Lock&, WTF::TimeWithDynamicClockType const&)
5 JavaScriptCore 0x3105f727c WTF::Function<void ()>::CallableWrapper<WTF::AutomaticThread::start(WTF::AbstractLocker const&)::$_0>::call()
6 JavaScriptCore 0x30fc8770c WTF::threadEntryPoint(void*)
7 JavaScriptCore 0x30fc8764c WTF::wtfThreadEntryPoint(void*)
8 libsystem_pthread.dylib 0x3021462b4 _pthread_body
9 libsystem_pthread.dylib 0x302146180 _pthread_start
Thread 17
0 libsystem_kernel.dylib 0x301efe0f0 __psynch_cvwait
1 libsystem_pthread.dylib 0x30214cf74 _pthread_cond_wait$VARIANT$armv81
2 JavaScriptCore 0x30fc8b340 WTF::ThreadCondition::timedWait(WTF::Mutex&, double)
3 JavaScriptCore 0x31060b33c WTF::ParkingLot::parkConditionallyImpl(void const*, WTF::ScopedLambda<bool ()> const&, WTF::ScopedLambda<void ()> const&, WTF::TimeWithDynamicClockType const&)
4 JavaScriptCore 0x310176170 bool WTF::ConditionBase::waitUntil<WTF::Lock>(WTF::Lock&, WTF::TimeWithDynamicClockType const&)
5 JavaScriptCore 0x3105f727c WTF::Function<void ()>::CallableWrapper<WTF::AutomaticThread::start(WTF::AbstractLocker const&)::$_0>::call()
6 JavaScriptCore 0x30fc8770c WTF::threadEntryPoint(void*)
7 JavaScriptCore 0x30fc8764c WTF::wtfThreadEntryPoint(void*)
8 libsystem_pthread.dylib 0x3021462b4 _pthread_body
9 libsystem_pthread.dylib 0x302146180 _pthread_start
Thread 18
0 libsystem_kernel.dylib 0x301efed80 __workq_kernreturn
1 libsystem_pthread.dylib 0x302145080 _pthread_wqthread
Thread 19
0 libsystem_kernel.dylib 0x301efed80 __workq_kernreturn
1 libsystem_pthread.dylib 0x302144eec _pthread_wqthread
Thread 20
0 libsystem_kernel.dylib 0x301efed80 __workq_kernreturn
1 libsystem_pthread.dylib 0x302145080 _pthread_wqthread
EOF
I am trying to figure out if this is related with AsyncStorage and has nothing to do with sentry. If you guys know more, please let me know. :)
Hey, @edo1493! Unfortunately, we're also dealing with the same problem. Were you able to identify a fix for this?
So my guess is that this is a react-native crash and only with Sentry you are able to see it ¯\_(ツ)_/¯
That's something that I'm also trying to figure out, @HazAT! The strange thing here is that these exceptions started to be thrown (not only on Sentry but also on iTunes Connect dashboard) after an update where we replaced raven-js by react-native-sentry.
I'll try to revert this change to check if we can get rid of new exceptions.
@diegocouto hmm well, this is a very strong indication that this crash comes from react-native itself because in raven-js we don't do anything on the native.
This crash is a native crash so it can't come from raven-js.
I keep seeing this every day, so it might be something on my side, which I haven't still figured out.
Are we saying that this is a bug on our side that only react-native-sentry can catch cause raven-js doesn't read native? Or that react-native-sentry introduces the bug. 😓
The other thing is that it's iOS11 only.
Thanks, @HazAT! I think you're right and the error was on our side. An update with a fix on our app went out yesterday and so far, so good.
@edo1493, We were experiencing the exact same thing. The same exception, iOS11 only and we started noticing it after we've migrated to react-native-sentry. There weren't many issues on our iTunes connect before this change, so I was inclined to believe that it was something with this package BUT, changing to react-native-sentry wasn't our only change!
Before sending an exception to Sentry we've added a Toast.show(error) (we are using react-native-simple-toast). This error was an Error object and not a string, which got us in trouble.
Same error here
EXC_BAD_ACCESS: Attempted to dereference garbage pointer 0x20.
Originated at or in a subcall of folly::Expected<long long, folly::ConversionCode> folly::detail::str_to_integral
Exactly the same as @amazinmoe here..
@amazinmoe @diegocouto @edo1493 have your issues been resolved? My app is throwing the same thing on react-native-sentry 0.33.0. I am curious if you upgraded and found a fix, or if the fix was on your end?
Thanks
folly::Expected<long long, folly::ConversionCode> folly::detail::str_to_integral
react-native-sentry: 0.35.3
EXC_BAD_ACCESS: Attempted to dereference garbage pointer 0x14.
and
Attempted to dereference garbage pointer 0x10. Originated at or in a subcall of __cxa_throw
Any updates on this? I'm seeing a lot of these issues as well.
So I still expect that Sentry is not the reason for this to occur, Sentry only shows you the crash. No one was able to reproduce this issue in a way so it can be fixed.
I will leave this issue open since this seems to be rather common, just so people find this more easily.
Oh. Thanks for the clarification, @HazAT :)
I'm seeing something that seems pretty similar to this. It can be reproduced consistently until Sentry is disabled (at which point no more error) - but it only happens on an iPhone X (real device, not simulator).
Relevant stacktrace in Sentry:
Report Version: 104
Exception Type: EXC_BAD_ACCESS (SIGBUS)
Exception Codes: BUS_NOOP at 0x5000000000000000
Crashed Thread: 24
Application Specific Information:
Attempted to dereference garbage pointer 0x5000000000000000.
Originated at or in a subcall of folly::Expected<long long, folly::ConversionCode> folly::detail::str_to_integral<long long>(folly::Range<char const*>*)
Thread 24 Crashed:
0 libobjc.A.dylib 0x302a757ec objc_object::release()
1 CoreFoundation 0x3045e4df8 [inlined] cow_cleanup
2 CoreFoundation 0x3045e4df8 cow_cleanup
3 CoreFoundation 0x3045d539c _cow_release
4 CoreFoundation 0x304477480 -[__NSDictionaryM dealloc]
5 App 0x2023e25bc folly::Expected<long long, folly::ConversionCode> folly::detail::str_to_integral<long long>(folly::Range<char const*>*)
Relevant stacktrace in Crashlytics:
Crashed: com.apple.main-thread .
EXC_BREAKPOINT 0x0000000183415e88
0 libsystem_platform.dylib _os_unfair_lock_corruption_abort + 36
2 CoreFoundation -[__NSDictionaryM setObject:forKey:] + 160
3 App __36-[RNSentry swizzleInvokeWithBridge:]_block_invoke_2 + 510676
4 App facebook::react::invokeInner(RCTBridge*, RCTModuleData*, unsigned int, folly::dynamic const&) + 108500
5 App invocation function for block in facebook::react::RCTNativeModule::invoke(unsigned int, folly::dynamic&&, int) + 107828
6 libdispatch.dylib _dispatch_call_block_and_release + 24
13 UIKit UIApplicationMain + 236
14 App main.m - Line 14 main
15 libdyld.dylib start + 4