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

EXC_BAD_ACCESS folly::Expected<long long, folly::ConversionCode> #328

Closed
2 of 5 tasks
edo1493 opened this issue Jan 15, 2018 · 42 comments
Closed
2 of 5 tasks

EXC_BAD_ACCESS folly::Expected<long long, folly::ConversionCode> #328

edo1493 opened this issue Jan 15, 2018 · 42 comments
Assignees

Comments

@edo1493
Copy link

edo1493 commented Jan 15, 2018

OS:

  • Windows
  • MacOS
  • Linux

Platform:

  • 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*>*)

@HazAT
Copy link
Member

HazAT commented Jan 17, 2018

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.

@HazAT HazAT self-assigned this Jan 17, 2018
@edo1493
Copy link
Author

edo1493 commented Jan 17, 2018

Thanks @HazAT, this has become a daily routine and I really don't have anyway to reproduce this.

@edo1493
Copy link
Author

edo1493 commented Jan 24, 2018

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

@edo1493
Copy link
Author

edo1493 commented Jan 25, 2018

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. :)

@diegocouto
Copy link

Hey, @edo1493! Unfortunately, we're also dealing with the same problem. Were you able to identify a fix for this?

@HazAT
Copy link
Member

HazAT commented Mar 2, 2018

So my guess is that this is a react-native crash and only with Sentry you are able to see it ¯\_(ツ)_/¯

@diegocouto
Copy link

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.

@HazAT
Copy link
Member

HazAT commented Mar 2, 2018

@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.

@edo1493
Copy link
Author

edo1493 commented Mar 4, 2018

I keep seeing this every day, so it might be something on my side, which I haven't still figured out.

@edo1493
Copy link
Author

edo1493 commented Mar 4, 2018

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.

@diegocouto
Copy link

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.

@amazinmoe
Copy link

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(folly::Range<char const*>*)

@dswbx
Copy link

dswbx commented Apr 20, 2018

Exactly the same as @amazinmoe here..

@JAStanton
Copy link

@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

@girginsoft
Copy link

folly::Expected<long long, folly::ConversionCode> folly::detail::str_to_integral
same here

@sapjax
Copy link

sapjax commented Apr 30, 2018

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

@pranjaltech
Copy link

Any updates on this? I'm seeing a lot of these issues as well.

@HazAT
Copy link
Member

HazAT commented May 7, 2018

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.

@pranjaltech
Copy link

Oh. Thanks for the clarification, @HazAT :)

@jcicale
Copy link

jcicale commented May 16, 2018

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

@HazAT
Copy link
Member

HazAT commented May 16, 2018

@jcicale Please try to disable stack trace merging:

Sentry.config("__DSN__", {
  deactivateStacktraceMerging: true,
}).install();

@lefloh
Copy link

lefloh commented May 23, 2018

@HazAT we were seeing EXC_BAD_ACCESS and EXC_BREAKPOINT errors almost every day. Didn't see a single one since setting deactivateStacktraceMerging: true. Thanks for the hint.

@phillbaker
Copy link

@HazAT as per the docs and changelog, deactivateStacktraceMerging: true has been the default since v0.27.0.

If we're using a version >= 0.27.0, how would explicitly setting deactivateStacktraceMerging: true impact this bug?

@HazAT
Copy link
Member

HazAT commented Jun 4, 2018

@phillbaker good question, will take a look.

@HazAT
Copy link
Member

HazAT commented Jun 5, 2018

@phillbaker Just tried it and it is disabled by default, so not really sure what went wrong for you.

Also, I will close this issue for now, please disable stack trace merging if you are running into this
#328 (comment)

Edit: If you are running a version after v0.27.0 you don't have to set deactivateStacktraceMerging: true since it off by default.

@HazAT HazAT closed this as completed Jun 5, 2018
@phillbaker
Copy link

@lefloh just curious, what version of react-native-sentry are you running? Did setting deactivateStacktraceMerging: true have an impact even though its default value is true?

@lefloh
Copy link

lefloh commented Jun 9, 2018

@phillbaker we're currently on 0.36.0. We started with 0.11.8. I'm not sure what the default was back then but we've set deactivateStacktraceMerging: false explicitly on our own.

@M-Jas
Copy link

M-Jas commented Jun 17, 2018

@HazAT since deactivateStacktraceMerging: true is defaulted, why would we need to add this additionally/again?

@HazAT
Copy link
Member

HazAT commented Jun 18, 2018

@M-Jas You don't have to if you run on the latest version.

@n1ru4l
Copy link

n1ru4l commented Jun 18, 2018

I am experiencing this issue with react-native-sentry@0.36.0 with iOS version 11.3.1 (15E302).

My configuration looks like this:

import { SENTRY_DSN } from 'react-native-dotenv'
import { Sentry } from 'react-native-sentry'
import VersionNumber from 'react-native-version-number'

if (SENTRY_DSN) {
  Sentry.config(SENTRY_DSN, {
    // prettier-ignore
    release: `${VersionNumber.bundleIdentifier}_${VersionNumber.appVersion}_${VersionNumber.buildVersion}`
  }).install()
}

@HazAT It does not seem like the new default value resolved the issue.

@edo1493 Could you please reopen this issue, since it does not seem to be resolved yet?

@brunocascio
Copy link

brunocascio commented Jun 18, 2018

I am facing the same issue here, @HazAT @edo1493 :

EXC_BAD_ACCESS folly::Expected<long long, folly::ConversionCode> folly::detail::str_to_integral<long long>(folly::Range<char const*>*)
fatalAttempted to dereference garbage pointer 0x7e8. Originated at or in a subcall of folly::Expected<long long, folly::ConversionCode> folly::detail::str_to_integral<long long>(folly::Range<char const*>*)

and also I got this error:

EXC_BREAKPOINT folly::Expected<long long, folly::ConversionCode> folly::detail::str_to_integral<long long>(folly::Range<char const*>*)

Real Device throwing the error:

iPhone Model: X
OS version: 11.4

Versions:

react-native: 0.47.2
react-native-sentry: 0.29.0
react-native-code-push: 5.1.1-beta

Sentry install code:

if (!__DEV__) Sentry.config(Config.SENTRY_DSN).install();

Is there a way to avoid this issue? :/

@M-Jas
Copy link

M-Jas commented Jul 8, 2018

@HazAT We are running the most recent, but still an issue. In fact seems like it happening more and more.

@xufeipyxis
Copy link

I received a similar issue report today:

EXC_BAD_ACCESS
Attempted to dereference garbage pointer 0x16e2ab180.
Originated at or in a subcall of __cxa_throw

folly::Expected<long long, folly::ConversionCode> folly::detail::str_to_integral<long long>(folly::Range<char const*>*)

sentry-react-native: 0.35.3
iphone 6: 10.3.3

I found a similar issue in react-native: facebook/react-native#12159 but it's closed.

@pedrobertao
Copy link

Any updates on this issue ?
I'm having this error popping up in Sentry quite a lot.

@bkostrowiecki
Copy link

Any updates on this?

@sundbry
Copy link

sundbry commented Oct 26, 2018

Having the same problem. "react-native-sentry": "0.39.0"

NSInvalidArgumentException

Application threw exception NSInvalidArgumentException: *** -[__NSPlaceholderDictionary initWithObjects:forKeys:count:]: attempt to insert nil object from objects[0]
Originated at or in a subcall of folly::Expected<long long, folly::ConversionCode> folly::detail::str_to_integral<long long>(folly::Range<char const*>*)

Stack trace doesn't really have a useful thread context

    CoreFoundation 0x1afc3aef8 __exceptionPreprocess
    libobjc.A 0x1aee08a40 objc_exception_throw
    CoreFoundation 0x1afbb085c _CFThrowFormattedException
    CoreFoundation 0x1afb36eb0 -[__NSPlaceholderDictionary initWithObjects:forKeys:count:]
    CoreFoundation 0x1afb279f4 +[NSDictionary dictionaryWithObjects:forKeys:count:]
    App 0x100155194folly::Expected<long long, folly::ConversionCode> folly::detail::str_to_integral<long long>(folly::Range<char const*>*)
    libdispatch 0x1af6726c8 _dispatch_call_block_and_release
    libdispatch 0x1af673484 _dispatch_client_callout
    libdispatch 0x1af622b94 _dispatch_root_queue_drain
    libdispatch 0x1af623308 _dispatch_worker_thread2
    libsystem_pthread 0x1af855190 _pthread_wqthread
    libsystem_pthread 0x1af857d00 start_wqthread 

@hugomosh
Copy link

Anyone have an update on this?
Is there any other error reporter that reports the same error?

@dbuarque
Copy link

dbuarque commented Nov 6, 2018

Same here!

@jamesholcomb
Copy link

Also getting this regularly on my test device:

EXC_BAD_ACCESS: Exception 1, Code 4026663424, Subcode 8 > Attempted to dereference garbage pointer 0xcf0020200.

  • iPhone 6
  • iOS 12.1.1
  • react-native-sentry 0.39.1
  • react-native 0.57.5

@jordoh
Copy link

jordoh commented Jan 11, 2019

Is there any other error reporter that reports the same error?

@hugomosh I'm seeing the same error in production, with a call-stack matching #244 (while there are a few different ones listed in this issue), but using bugsnag instead of Sentry.

Has anyone seen this on react-native 0.58? In particular, RCTFBQuickPerformanceLoggerConfigureHooks is always included in the (not very useful) call-stack. The file including this call was removed by facebook/react-native@e8cbc4f#diff-bf65daf096c58b7b676bfb6c02c80ed8 (following-up from facebook/react-native@c49d365#diff-bf65daf096c58b7b676bfb6c02c80ed8) and that change was included in 0.58. I'm seeing this on react-native 0.57.7.

@sryze
Copy link

sryze commented Jan 22, 2019

I received a few errors similar to this issue with RN 0.57.2, all of them have ZN5folly6detail15str_to_integralIxEENS_8ExpectedIT_NS_14ConversionCodeEEEPNS_5RangeIPKcEE in the stack trace.

@hugomosh
Copy link

If any one gets this errors and have a image-cache. The outdated react-native-fetch-blob could be the problem
More info: https://github.com/fungilation/react-native-cached-image

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests