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 Attempted to dereference garbage pointer 0x167f4beb8. #12159

Closed
dwilt opened this issue Feb 1, 2017 · 17 comments
Closed

EXC_BAD_ACCESS Attempted to dereference garbage pointer 0x167f4beb8. #12159

dwilt opened this issue Feb 1, 2017 · 17 comments
Labels
Resolution: Locked This issue was locked by the bot.

Comments

@dwilt
Copy link

dwilt commented Feb 1, 2017

Description

So, this is going to be tough because I don't have exact reproduction steps for this error. We're getting reports into our Bugsnag application of crashes, which we've experienced ourselves, but as I said, are unable to reproduce.

I've tried going through the stacktraces of the bugs, and a lot of them are consistent amongst themselves but there are also different once as well.

Here are the stracktraces:

Error 1:

EXC_BAD_ACCESS Attempted to dereference garbage pointer 0x18. 
    /usr/lib/libobjc.A.dylib objc_msgSend
    Frameworks/CoreFoundation.framework/CoreFoundation -[__NSDictionaryM objectForKey:]
    Frameworks/UIKit.framework/UIKit -[UIKBTree objectForProperty:]
    Frameworks/UIKit.framework/UIKit -[UIKBTree intForProperty:]
    Frameworks/UIKit.framework/UIKit -[UIKBTree displayType]
    Frameworks/UIKit.framework/UIKit -[UIKeyboardLayoutStar setKeyplaneName:]
    AccessibilityBundles/UIKit.axbundle/UIKit -[UIKeyboardLayoutStarAccessibility setKeyplaneName:]
    Frameworks/UIKit.framework/UIKit -[UIKeyboardLayoutStar showKeyboardWithInputTraits:screenTraits:splitTraits:]
    Frameworks/UIKit.framework/UIKit -[UIKeyboardImpl finishLayoutChangeWithArguments:]
    Frameworks/UIKit.framework/UIKit -[UIKeyboardImpl updateLayout]
    Frameworks/UIKit.framework/UIKit -[UIKeyboardImpl updateLayoutIfNecessary]
    Frameworks/UIKit.framework/UIKit -[UIKeyboardImpl setFrame:]
    Frameworks/UIKit.framework/UIKit -[UIKeyboard activate]
    AccessibilityBundles/UIKit.axbundle/UIKit -[UIKeyboardAccessibility activate]
    Frameworks/UIKit.framework/UIKit -[UIKeyboardAutomatic activate]
    Frameworks/UIKit.framework/UIKit -[UIKeyboard setFrame:]
    Frameworks/UIKit.framework/UIKit -[UIKeyboard _didChangeKeyplaneWithContext:]
    Frameworks/UIKit.framework/UIKit -[UIKeyboardImpl didMoveToSuperview]
    Frameworks/UIKit.framework/UIKit ___45-[UIView(Hierarchy) _postMovedFromSuperview:]_block_invoke
    Frameworks/UIKit.framework/UIKit -[UIView(Hierarchy) _postMovedFromSuperview:]
    Frameworks/UIKit.framework/UIKit -[UIView(Internal) _addSubview:positioned:relativeTo:]
    Frameworks/UIKit.framework/UIKit -[UIView(Hierarchy) addSubview:]
    Frameworks/UIKit.framework/UIKit -[UIKeyboard activate]
    AccessibilityBundles/UIKit.axbundle/UIKit -[UIKeyboardAccessibility activate]
    Frameworks/UIKit.framework/UIKit -[UIKeyboardAutomatic activate]
    Frameworks/UIKit.framework/UIKit -[UIPeripheralHost(UIKitInternal) _reloadInputViewsForResponder:]
    Frameworks/UIKit.framework/UIKit -[UIResponder(UIResponderInputViewAdditions) reloadInputViews]
    Frameworks/UIKit.framework/UIKit -[UIResponder becomeFirstResponder]
    Frameworks/UIKit.framework/UIKit -[UIView(Hierarchy) becomeFirstResponder]
    Frameworks/UIKit.framework/UIKit -[UITextField becomeFirstResponder]
    GreatJonesStreet-Prod mh_execute_header
    GreatJonesStreet-Prod mh_execute_header
    /usr/lib/system/libdispatch.dylib __dispatch_call_block_and_release
    /usr/lib/system/libdispatch.dylib __dispatch_client_callout
    /usr/lib/system/libdispatch.dylib __dispatch_main_queue_callback_4CF
    Frameworks/CoreFoundation.framework/CoreFoundation ___CFRUNLOOP_IS_SERVICING_THE_MAIN_DISPATCH_QUEUE__
    Frameworks/CoreFoundation.framework/CoreFoundation ___CFRunLoopRun
    Frameworks/CoreFoundation.framework/CoreFoundation CFRunLoopRunSpecific
    PrivateFrameworks/GraphicsServices.framework/GraphicsServices GSEventRunModal
    Frameworks/UIKit.framework/UIKit -[UIApplication _run]
    Frameworks/UIKit.framework/UIKit UIApplicationMain
    GreatJonesStreet-Prod mh_execute_header
    /usr/lib/system/libdyld.dylib start

Error 2:

EXC_BAD_ACCESS Attempted to dereference garbage pointer 0x41cf9beb8. 
    /usr/lib/libobjc.A.dylib objc_msgSend
    Frameworks/Foundation.framework/Foundation -[NSObject(NSKeyValueObservingPrivate) _changeValueForKeys:count:maybeOldValuesDict:usingBlock:]
    Frameworks/Foundation.framework/Foundation -[NSObject(NSKeyValueObservingPrivate) _changeValueForKey:key:key:usingBlock:]
    Frameworks/Foundation.framework/Foundation -[NSOperationQueue setMaxConcurrentOperationCount:]
    GreatJonesStreet-Prod mh_execute_header
    GreatJonesStreet-Prod mh_execute_header
    GreatJonesStreet-Prod mh_execute_header
    /usr/lib/system/libdispatch.dylib __dispatch_call_block_and_release
    /usr/lib/system/libdispatch.dylib __dispatch_client_callout
    /usr/lib/system/libdispatch.dylib __dispatch_queue_override_invoke
    /usr/lib/system/libdispatch.dylib __dispatch_root_queue_drain
    /usr/lib/system/libdispatch.dylib __dispatch_worker_thread3
    /usr/lib/system/libsystem_pthread.dylib __pthread_wqthread

Error 3:

EXC_BAD_ACCESS Attempted to dereference garbage pointer 0xae928beb8. 
    main.jsbundle:931:489 y
    [native code] y
    main.jsbundle:145:7008 _renderValidatedComponentWithoutOwnerOrContext
    main.jsbundle:145:7175 _renderValidatedComponent
    main.jsbundle:145:6454 _updateRenderedComponent
    main.jsbundle:145:6254 _performComponentUpdate
    main.jsbundle:145:5531 updateComponent
    main.jsbundle:145:4634 receiveComponent
    main.jsbundle:135:578 receiveComponent
    main.jsbundle:143:475 updateChildren
    main.jsbundle:140:988 _reconcilerUpdateChildren
    main.jsbundle:140:1764 _updateChildren
    main.jsbundle:140:1652 updateChildren
    main.jsbundle:120:830 receiveComponent
    main.jsbundle:135:578 receiveComponent
    main.jsbundle:143:475 updateChildren
    main.jsbundle:140:988 _reconcilerUpdateChildren
    main.jsbundle:140:1764 _updateChildren
    main.jsbundle:140:1652 updateChildren
    main.jsbundle:120:830 receiveComponent
    main.jsbundle:135:578 receiveComponent
    main.jsbundle:145:6489 _updateRenderedComponent
    main.jsbundle:145:6254 _performComponentUpdate
    main.jsbundle:145:5531 updateComponent
    main.jsbundle:145:4634 receiveComponent
    main.jsbundle:135:578 receiveComponent
    main.jsbundle:145:6489 _updateRenderedComponent
    main.jsbundle:145:6254 _performComponentUpdate
    main.jsbundle:145:5531 updateComponent
    main.jsbundle:145:4634 receiveComponent
    main.jsbundle:135:578 receiveComponent
    main.jsbundle:145:6489 _updateRenderedComponent
    main.jsbundle:145:6254 _performComponentUpdate
    main.jsbundle:145:5531 updateComponent
    main.jsbundle:145:4634 receiveComponent
    main.jsbundle:135:578 receiveComponent
    main.jsbundle:145:6489 _updateRenderedComponent
    main.jsbundle:145:6254 _performComponentUpdate
    main.jsbundle:145:5531 updateComponent
    main.jsbundle:145:4634 receiveComponent
    main.jsbundle:135:578 receiveComponent
    main.jsbundle:143:475 updateChildren
    main.jsbundle:140:988 _reconcilerUpdateChildren
    main.jsbundle:140:1764 _updateChildren
    main.jsbundle:140:1652 updateChildren
    main.jsbundle:120:830 receiveComponent
    main.jsbundle:135:578 receiveComponent
    main.jsbundle:145:6489 _updateRenderedComponent
    main.jsbundle:145:6254 _performComponentUpdate
    main.jsbundle:145:5531 updateComponent
    main.jsbundle:145:4634 receiveComponent
    main.jsbundle:135:578 receiveComponent
    main.jsbundle:145:6489 _updateRenderedComponent
    main.jsbundle:145:6254 _performComponentUpdate
    main.jsbundle:145:5531 updateComponent
    main.jsbundle:145:4634 receiveComponent
    main.jsbundle:135:578 receiveComponent
    main.jsbundle:145:6489 _updateRenderedComponent
    main.jsbundle:145:6254 _performComponentUpdate
    main.jsbundle:145:5531 updateComponent
    main.jsbundle:145:4850 performUpdateIfNecessary
    main.jsbundle:135:768 performUpdateIfNecessary
    main.jsbundle:132:767 l
    main.jsbundle:139:503 perform
    main.jsbundle:139:503 perform
    main.jsbundle:132:2005 B
    [native code] B
    main.jsbundle:139:1142 closeAll
    main.jsbundle:139:590 perform
    main.jsbundle:232:456 batchedUpdates
    main.jsbundle:132:1039 s
    main.jsbundle:239:69 u
    main.jsbundle:239:1050 enqueueSetState
    main.jsbundle:29:323 setState
    main.jsbundle:422:4370 handleChange
    [native code] 
    main.jsbundle:426:734 d
    main.jsbundle:689:1406 
    main.jsbundle:214:236 n
    main.jsbundle:214:1653 
    main.jsbundle:214:236 n
    main.jsbundle:214:493 r
    main.jsbundle:214:610 
    main.jsbundle:212:137 u
    main.jsbundle:212:891 
    main.jsbundle:62:629 callTimer
    main.jsbundle:62:1731 callImmediatesPass
    main.jsbundle:62:1847 callImmediates
    main.jsbundle:60:130 d
    main.jsbundle:60:2249 value
    main.jsbundle:60:1234 
    main.jsbundle:60:130 d
    main.jsbundle:60:1180 value
    [native code] value

Error 4:

EXC_BAD_ACCESS Attempted to dereference garbage pointer 0x12. 
    /usr/lib/libobjc.A.dylib std::__1::__hash_iterator<std::__1::__hash_node<std::__1::__hash_value_type<unsigned long, objc_references_support::ObjectAssociationMap*>, void*>*> std::__1::__hash_table<std::__1::__hash_value_type<unsigned long, objc_references_support::ObjectAssociationMap*>, std::__1::__unordered_map_hasher<unsigned long, std::__1::__hash_value_type<unsigned long, objc_references_support::ObjectAssociationMap*>, objc_references_support::DisguisedPointerHash, true>, std::__1::__unordered_map_equal<unsigned long, std::__1::__hash_value_type<unsigned long, objc_references_support::ObjectAssociationMap*>, objc_references_support::DisguisedPointerEqual, true>, objc_references_support::ObjcAllocator<std::__1::__hash_value_type<unsigned long, objc_references_support::ObjectAssociationMap*> > >::find<unsigned long>(unsigned long const&)
    /usr/lib/libobjc.A.dylib __object_remove_assocations
    /usr/lib/libobjc.A.dylib objc_destructInstance
    /usr/lib/libobjc.A.dylib object_dispose
    /usr/lib/system/libxpc.dylib __xpc_dictionary_node_free
    /usr/lib/system/libxpc.dylib __xpc_dictionary_dispose
    /usr/lib/system/libxpc.dylib __xpc_dispose
    Frameworks/Foundation.framework/Foundation -[NSXPCConnection _sendInvocation:withProxy:remoteInterface:withErrorHandler:timeout:userInfo:]
    Frameworks/CoreFoundation.framework/CoreFoundation ____forwarding___
    Frameworks/CoreFoundation.framework/CoreFoundation ___forwarding_prep_0___
    Frameworks/CFNetwork.framework/CFNetwork ___30-[__NSCFURLSessionTask resume]_block_invoke
    /usr/lib/system/libdispatch.dylib __dispatch_call_block_and_release
    /usr/lib/system/libdispatch.dylib __dispatch_client_callout
    /usr/lib/system/libdispatch.dylib __dispatch_queue_serial_drain
    /usr/lib/system/libdispatch.dylib __dispatch_queue_invoke
    /usr/lib/system/libdispatch.dylib __dispatch_queue_override_invoke
    /usr/lib/system/libdispatch.dylib __dispatch_root_queue_drain
    /usr/lib/system/libdispatch.dylib __dispatch_worker_thread3
    /usr/lib/system/libsystem_pthread.dylib __pthread_wqthread

Error 5:

EXC_BAD_ACCESS Attempted to dereference garbage pointer 0x12. 
    /usr/lib/libobjc.A.dylib std::__1::__hash_iterator<std::__1::__hash_node<std::__1::__hash_value_type<unsigned long, objc_references_support::ObjectAssociationMap*>, void*>*> std::__1::__hash_table<std::__1::__hash_value_type<unsigned long, objc_references_support::ObjectAssociationMap*>, std::__1::__unordered_map_hasher<unsigned long, std::__1::__hash_value_type<unsigned long, objc_references_support::ObjectAssociationMap*>, objc_references_support::DisguisedPointerHash, true>, std::__1::__unordered_map_equal<unsigned long, std::__1::__hash_value_type<unsigned long, objc_references_support::ObjectAssociationMap*>, objc_references_support::DisguisedPointerEqual, true>, objc_references_support::ObjcAllocator<std::__1::__hash_value_type<unsigned long, objc_references_support::ObjectAssociationMap*> > >::find<unsigned long>(unsigned long const&)
    /usr/lib/libobjc.A.dylib __object_remove_assocations
    /usr/lib/libobjc.A.dylib objc_destructInstance
    /usr/lib/libobjc.A.dylib object_dispose
    /usr/lib/system/libxpc.dylib __xpc_dictionary_dispose
    /usr/lib/system/libxpc.dylib __xpc_dispose
    /usr/lib/system/libxpc.dylib __xpc_connection_mach_event
    /usr/lib/system/libdispatch.dylib __dispatch_client_callout4
    /usr/lib/system/libdispatch.dylib __dispatch_mach_msg_invoke
    /usr/lib/system/libdispatch.dylib __dispatch_queue_serial_drain
    /usr/lib/system/libdispatch.dylib __dispatch_mach_invoke
    /usr/lib/system/libdispatch.dylib __dispatch_queue_serial_drain
    /usr/lib/system/libdispatch.dylib __dispatch_queue_invoke
    /usr/lib/system/libdispatch.dylib __dispatch_root_queue_drain_deferred_item
    /usr/lib/system/libdispatch.dylib __dispatch_kevent_worker_thread
    /usr/lib/system/libsystem_pthread.dylib __pthread_wqthread

Reproduction

No exact reproduction steps that I can explain.

Solution

Figure out where the issues are coming from as the errors don't explain much. Error 3 came from somewhere in main.bundle.js which sounds like a JS related issue but the variable name y doesn't tell me much either and the line numbers are so early on it looks like the react native base code.

Additional Information

  • React Native version: 0.39.0
  • Platform: iOS (
  • Operating System: MacOS
@SudoPlz
Copy link
Contributor

SudoPlz commented Feb 1, 2017

I get the same error: EXC_BAD_ACCESS Attempted to dereference garbage pointer with similar stack traces:

EXC_BAD_ACCESS RCTShadowView
Attempted to dereference garbage pointer 0x10.

EXC_BAD_ACCESS Attempted to dereference garbage pointer 0x10. 
    /usr/lib/libobjc.A.dylib objc_retain
    SPApp -[RCTShadowView isReactRootView]
    SPApp -[RCTTextManager uiBlockToAmendWithShadowViewRegistry:]
    SPApp -[RCTComponentData uiBlockToAmendWithShadowViewRegistry:]
    SPApp -[RCTUIManager _layoutAndMount]
    SPApp __36-[RCTBatchedBridge batchDidComplete]_block_invoke
    /usr/lib/system/libdispatch.dylib __dispatch_call_block_and_release
    /usr/lib/system/libdispatch.dylib __dispatch_queue_drain$VARIANT$mp
    /usr/lib/system/libdispatch.dylib __dispatch_queue_invoke$VARIANT$mp
    /usr/lib/system/libdispatch.dylib __dispatch_root_queue_drain
    /usr/lib/system/libdispatch.dylib __dispatch_worker_thread3
    /usr/lib/system/libsystem_pthread.dylib pthread_wqthread
EXC_BAD_ACCESS RCTView
Attempted to dereference garbage pointer 0xf168101e

EXC_BAD_ACCESS Attempted to dereference garbage pointer 0xf168101e. 
    /usr/lib/libobjc.A.dylib objc_release
    /usr/lib/libobjc.A.dylib object_cxxDestructFromClass(objc_object*, objc_class*)
    /usr/lib/libobjc.A.dylib objc_destructInstance
    /usr/lib/libobjc.A.dylib object_dispose
    /usr/lib/libobjc.A.dylib objc_object::sidetable_release(bool)
    Frameworks/UIKit.framework/UIKit <redacted>
    /usr/lib/libobjc.A.dylib object_cxxDestructFromClass(objc_object*, objc_class*)
    /usr/lib/libobjc.A.dylib objc_destructInstance
    /usr/lib/libobjc.A.dylib object_dispose
    Frameworks/UIKit.framework/UIKit <redacted>
    Frameworks/UIKit.framework/UIKit <redacted>
    Frameworks/CoreFoundation.framework/CoreFoundation CFRelease
    Frameworks/CoreFoundation.framework/CoreFoundation <redacted>
    /usr/lib/libobjc.A.dylib objc_object::sidetable_release(bool)
    /usr/lib/libobjc.A.dylib __object_remove_assocations
    /usr/lib/libobjc.A.dylib objc_destructInstance
    /usr/lib/libobjc.A.dylib object_dispose
    Frameworks/UIKit.framework/UIKit <redacted>
    Frameworks/UIKit.framework/UIKit <redacted>
    SPApp -[RCTView dealloc]
    Frameworks/CoreFoundation.framework/CoreFoundation CFRelease
    Frameworks/CoreFoundation.framework/CoreFoundation <redacted>
    /usr/lib/libobjc.A.dylib objc_object::sidetable_release(bool)
    /usr/lib/libobjc.A.dylib __object_remove_assocations
    /usr/lib/libobjc.A.dylib objc_destructInstance
    /usr/lib/libobjc.A.dylib object_dispose
    Frameworks/UIKit.framework/UIKit <redacted>
    Frameworks/UIKit.framework/UIKit <redacted>
    SPApp -[RCTView dealloc]
    Frameworks/CoreFoundation.framework/CoreFoundation CFRelease
    Frameworks/CoreFoundation.framework/CoreFoundation <redacted>
    /usr/lib/libobjc.A.dylib objc_object::sidetable_release(bool)
    /usr/lib/libobjc.A.dylib __object_remove_assocations
    /usr/lib/libobjc.A.dylib objc_destructInstance
    /usr/lib/libobjc.A.dylib object_dispose
    Frameworks/UIKit.framework/UIKit <redacted>
    Frameworks/UIKit.framework/UIKit <redacted>
    SPApp -[RCTView dealloc]
    Frameworks/CoreFoundation.framework/CoreFoundation CFRelease
    Frameworks/CoreFoundation.framework/CoreFoundation <redacted>
    /usr/lib/libobjc.A.dylib objc_object::sidetable_release(bool)
    /usr/lib/libobjc.A.dylib __object_remove_assocations
    /usr/lib/libobjc.A.dylib objc_destructInstance
    /usr/lib/libobjc.A.dylib object_dispose
    Frameworks/UIKit.framework/UIKit <redacted>
    Frameworks/UIKit.framework/UIKit <redacted>
    SPApp -[RCTView dealloc]
    Frameworks/CoreFoundation.framework/CoreFoundation CFRelease
    Frameworks/CoreFoundation.framework/CoreFoundation <redacted>
    /usr/lib/libobjc.A.dylib objc_object::sidetable_release(bool)
    /usr/lib/libobjc.A.dylib __object_remove_assocations
    /usr/lib/libobjc.A.dylib objc_destructInstance
    /usr/lib/libobjc.A.dylib object_dispose
    Frameworks/UIKit.framework/UIKit <redacted>
    Frameworks/UIKit.framework/UIKit <redacted>
    SPApp -[RCTView dealloc]
    Frameworks/CoreFoundation.framework/CoreFoundation CFRelease
    Frameworks/CoreFoundation.framework/CoreFoundation <redacted>
    /usr/lib/libobjc.A.dylib objc_object::sidetable_release(bool)
    /usr/lib/libobjc.A.dylib __object_remove_assocations
    /usr/lib/libobjc.A.dylib objc_destructInstance
    /usr/lib/libobjc.A.dylib object_dispose
    Frameworks/UIKit.framework/UIKit <redacted>
    Frameworks/UIKit.framework/UIKit <redacted>
    SPApp -[RCTView dealloc]
    Frameworks/CoreFoundation.framework/CoreFoundation CFRelease
    Frameworks/CoreFoundation.framework/CoreFoundation <redacted>
    /usr/lib/libobjc.A.dylib objc_object::sidetable_release(bool)
    /usr/lib/libobjc.A.dylib (anonymous namespace)::AutoreleasePoolPage::pop(void*)
    Frameworks/CoreFoundation.framework/CoreFoundation CFAutoreleasePoolPop
    Frameworks/CoreFoundation.framework/CoreFoundation <redacted>
    Frameworks/CoreFoundation.framework/CoreFoundation CFRunLoopRunSpecific
    Frameworks/CoreFoundation.framework/CoreFoundation CFRunLoopRunInMode
    PrivateFrameworks/GraphicsServices.framework/GraphicsServices GSEventRunModal
    Frameworks/UIKit.framework/UIKit UIApplicationMain
    SPApp main
EXC_BAD_ACCESS RCTText
Attempted to dereference garbage pointer 0xc.

EXC_BAD_ACCESS Attempted to dereference garbage pointer 0xc. 
    /usr/lib/libobjc.A.dylib objc_msgSend
    SPApp -[RCTText didMoveToWindow]
    Frameworks/UIKit.framework/UIKit <redacted>
    Frameworks/UIKit.framework/UIKit <redacted>
    Frameworks/UIKit.framework/UIKit <redacted>
    Frameworks/UIKit.framework/UIKit <redacted>
    Frameworks/UIKit.framework/UIKit <redacted>
    Frameworks/UIKit.framework/UIKit <redacted>
    Frameworks/UIKit.framework/UIKit <redacted>
    Frameworks/UIKit.framework/UIKit <redacted>
    Frameworks/UIKit.framework/UIKit <redacted>
    Frameworks/UIKit.framework/UIKit <redacted>
    Frameworks/UIKit.framework/UIKit <redacted>
    Frameworks/UIKit.framework/UIKit <redacted>
    Frameworks/UIKit.framework/UIKit <redacted>
    Frameworks/UIKit.framework/UIKit <redacted>
    Frameworks/UIKit.framework/UIKit <redacted>
    Frameworks/UIKit.framework/UIKit <redacted>
    Frameworks/UIKit.framework/UIKit <redacted>
    Frameworks/UIKit.framework/UIKit <redacted>
    Frameworks/UIKit.framework/UIKit <redacted>
    Frameworks/Foundation.framework/Foundation -[NSISEngine withBehaviors:performModifications:]
    Frameworks/UIKit.framework/UIKit <redacted>
    Frameworks/UIKit.framework/UIKit <redacted>
    Frameworks/UIKit.framework/UIKit <redacted>
    Frameworks/UIKit.framework/UIKit <redacted>
    Frameworks/UIKit.framework/UIKit <redacted>
    Frameworks/UIKit.framework/UIKit <redacted>
    Frameworks/UIKit.framework/UIKit <redacted>
    Frameworks/UIKit.framework/UIKit <redacted>
    Frameworks/UIKit.framework/UIKit <redacted>
    Frameworks/UIKit.framework/UIKit <redacted>
    Frameworks/UIKit.framework/UIKit <redacted>
    Frameworks/QuartzCore.framework/QuartzCore -[CALayer layoutSublayers]
    Frameworks/QuartzCore.framework/QuartzCore CA::Layer::layout_if_needed(CA::Transaction*)
    Frameworks/QuartzCore.framework/QuartzCore CA::Layer::layout_and_display_if_needed(CA::Transaction*)
    Frameworks/QuartzCore.framework/QuartzCore CA::Context::commit_transaction(CA::Transaction*)
    Frameworks/QuartzCore.framework/QuartzCore CA::Transaction::commit()
    Frameworks/QuartzCore.framework/QuartzCore CA::Transaction::observer_callback(__CFRunLoopObserver*, unsigned long, void*)
    Frameworks/CoreFoundation.framework/CoreFoundation <redacted>
    Frameworks/CoreFoundation.framework/CoreFoundation <redacted>
    Frameworks/CoreFoundation.framework/CoreFoundation <redacted>
    Frameworks/CoreFoundation.framework/CoreFoundation CFRunLoopRunSpecific
    Frameworks/CoreFoundation.framework/CoreFoundation CFRunLoopRunInMode
    PrivateFrameworks/GraphicsServices.framework/GraphicsServices GSEventRunModal
    Frameworks/UIKit.framework/UIKit UIApplicationMain
    SPApp main
EXC_BAD_ACCESS RCTModuleMethod
Attempted to dereference garbage pointer 0xc.

EXC_BAD_ACCESS Attempted to dereference garbage pointer 0xc. 
    /usr/lib/libobjc.A.dylib objc_msgSend
    Frameworks/Foundation.framework/Foundation __writeJSONValue
    Frameworks/Foundation.framework/Foundation ____writeJSONObject_block_invoke
    Frameworks/CoreFoundation.framework/CoreFoundation <redacted>
    Frameworks/CoreFoundation.framework/CoreFoundation <redacted>
    Frameworks/Foundation.framework/Foundation __writeJSONObject
    Frameworks/Foundation.framework/Foundation __writeJSONValue
    Frameworks/Foundation.framework/Foundation ____writeJSONObject_block_invoke
    Frameworks/CoreFoundation.framework/CoreFoundation <redacted>
    Frameworks/CoreFoundation.framework/CoreFoundation <redacted>
    Frameworks/Foundation.framework/Foundation __writeJSONObject
    Frameworks/Foundation.framework/Foundation __writeJSONValue
    Frameworks/Foundation.framework/Foundation ____writeJSONObject_block_invoke
    Frameworks/CoreFoundation.framework/CoreFoundation <redacted>
    Frameworks/CoreFoundation.framework/CoreFoundation <redacted>
    Frameworks/Foundation.framework/Foundation __writeJSONObject
    Frameworks/Foundation.framework/Foundation __writeJSONValue
    Frameworks/Foundation.framework/Foundation ____writeJSONObject_block_invoke
    Frameworks/CoreFoundation.framework/CoreFoundation <redacted>
    Frameworks/CoreFoundation.framework/CoreFoundation <redacted>
    Frameworks/Foundation.framework/Foundation __writeJSONObject
    Frameworks/Foundation.framework/Foundation __writeJSONValue
    Frameworks/Foundation.framework/Foundation ____writeJSONObject_block_invoke
    Frameworks/CoreFoundation.framework/CoreFoundation <redacted>
    Frameworks/CoreFoundation.framework/CoreFoundation <redacted>
    Frameworks/Foundation.framework/Foundation __writeJSONObject
    Frameworks/Foundation.framework/Foundation __writeJSONValue
    Frameworks/Foundation.framework/Foundation ____writeJSONObject_block_invoke
    Frameworks/CoreFoundation.framework/CoreFoundation <redacted>
    Frameworks/CoreFoundation.framework/CoreFoundation <redacted>
    Frameworks/Foundation.framework/Foundation __writeJSONObject
    Frameworks/Foundation.framework/Foundation __writeJSONValue
    Frameworks/Foundation.framework/Foundation ____writeJSONObject_block_invoke
    Frameworks/CoreFoundation.framework/CoreFoundation <redacted>
    Frameworks/CoreFoundation.framework/CoreFoundation <redacted>
    Frameworks/Foundation.framework/Foundation __writeJSONObject
    Frameworks/Foundation.framework/Foundation __writeJSONValue
    Frameworks/Foundation.framework/Foundation -[_NSJSONWriter dataWithRootObject:options:error:]
    Frameworks/Foundation.framework/Foundation +[NSJSONSerialization dataWithJSONObject:options:error:]
    SPApp -[BugsnagBreadcrumbs arrayValue]
    SPApp -[BugsnagNotifier serializeBreadcrumbs]
    SPApp +[Bugsnag leaveBreadcrumbWithBlock:]
    SPApp -[BugsnagReactNative leaveBreadcrumb:]
    Frameworks/CoreFoundation.framework/CoreFoundation <redacted>
    Frameworks/CoreFoundation.framework/CoreFoundation <redacted>
    Frameworks/CoreFoundation.framework/CoreFoundation <redacted>
    SPApp -[RCTModuleMethod invokeWithBridge:module:arguments:]
    SPApp -[RCTBatchedBridge callNativeModule:method:params:]
    SPApp __33-[RCTBatchedBridge handleBuffer:]_block_invoke.357
    /usr/lib/system/libdispatch.dylib __dispatch_call_block_and_release
    /usr/lib/system/libdispatch.dylib __dispatch_queue_drain$VARIANT$mp
    /usr/lib/system/libdispatch.dylib __dispatch_queue_invoke$VARIANT$mp
    /usr/lib/system/libdispatch.dylib __dispatch_root_queue_drain
    /usr/lib/system/libdispatch.dylib __dispatch_worker_thread3
    /usr/lib/system/libsystem_pthread.dylib pthread_wqthread

This is very hard to reproduce, and I believe it happens when a view gets unmounted.

  • react-native 0.32.2
  • Platform: iOS
  • Operating System: MacOS

@SudoPlz
Copy link
Contributor

SudoPlz commented Feb 1, 2017

For no 3 I also have this screenshot:

screen shot 2017-02-02 at 00 49 52

@dwilt
Copy link
Author

dwilt commented Feb 4, 2017

An interesting update.. I was working today (using react-redux in my project) and I forgot to connect the component that I was exporting. I literally had:

export default connect(null, { purchase: buyStory })

and not

export default connect(null, { purchase: buyStory })(StoryContainer)

and it threw me a red screen error saying: A valid React element (or null) must be returned. You may have returned undefined, an array or some other invalid object. So, I fixed it and went about my day. Made a few more changes and did some more refreshing. Went to save again, a couple minutes later, and the app crashed. Curious as to why all of sudden it crashed, I checked the Bugsnag reports and saw this:

EXC_BAD_ACCESS Attempted to dereference garbage pointer 0xb9971bec8. 
    Invariant Violation: wrapWithConnect(...): A valid React element (or null) must be returned. You may have returned undefined, an array or some other invalid object. 
        at invariant (http://192.168.0.11.xip.io:8081/index.ios.bundle?platform=ios&dev=true&minify=false:2295:7) 
        at ReactCompositeComponentWrapper.mountComponent (http://192.168.0.11.xip.io:8081/index.ios.bundle?platform=ios&dev=true&minify=false:19170:1) 
        at Object.mountComponent (http://192.168.0.11.xip.io:8081/index.ios.bundle?platform=ios&dev=true&minify=false:17387:29) 
        at ReactCompositeComponentWrapper.performInitialMount (http://192.168.0.11.xip.io:8081/index.ios.bundle?platform=ios&dev=true&minify=false:19452:28) 
        at ReactCompositeComponentWrapper.mountComponent (http://192.168.0.11.xip.io:8081/index.ios.bundle?platform=ios&dev=true&minify=false:19303:13) 
        at Object.mountComponent (http://192.168.0.11.xip.io:8081/index.ios.bundle?platform=ios&dev=true&minify=false:17387:29) 
        at ReactCompositeComponentWrapper.performInitialMount (http://192.168.0.11.xip.io:8081/index.ios.bundle?platform=ios&dev=true&minify=false:19452:28) 
        at ReactCompositeComponentWrapper.mountComponent (http://192.168.0.11.xip.io:8081/index.ios.bundle?platform=ios&dev=true&minify=false:19303:13) 
        at Object.mountComponent (http://192.168.0.11.xip.io:8081/index.ios.bundle?platform=ios&dev=true&minify=false:17387:29) 
        at ReactCompositeComponentWrapper.performInitialMount (http://192.168.0.11.xip.io:8081/index.ios.bundle?platform=ios&dev=true&minify=false:19452:28) 

What's interesting is that this error didn't exist anymore but it still caused the app to crash. I re-built and ran the app (without changing a line of code) and it fired up fine. So the error definitely wasn't there but it was like it cached the error from earlier. Not sure if this provides any insight as to what's going on but wanted to share anyway.

@SudoPlz
Copy link
Contributor

SudoPlz commented Feb 4, 2017

@dwilt Could it just be that the bug report was sent with a delay?
I think the error you saw was dispatched before you fixed it.

The question now is why you got Attempted to dereference garbage pointer.

Either way I believe @kattrali might be able to shed some light on this..!

@dwilt
Copy link
Author

dwilt commented Feb 4, 2017

@SudoPlz It's possible I guess but I doubt it because it errored with the typical red screen first - not crashed. Then it crashedmany builds/runs later and then when I restarted the app, I saw it say "Sending 1 crash report". Anyway, was just working performing my usual behavior in my app that works fine (scrolling a view) when I got this:

image

@SudoPlz Same issue as you with the ShadowView!

Tried rerunning and oddly Bugnsnag didn't send the crash report either.. (Note the Sending 0 crash reports)

image

@dwilt
Copy link
Author

dwilt commented Feb 6, 2017

Just got this and it seems to be relevant to react-native-fetch-blob:

EXC_BAD_ACCESS Attempted to dereference garbage pointer 0xb4236beb8. 
    /usr/lib/libobjc.A.dylib objc_msgSend
    Frameworks/Foundation.framework/Foundation -[NSObject(NSKeyValueObservingPrivate) _changeValueForKeys:count:maybeOldValuesDict:usingBlock:]
    Frameworks/Foundation.framework/Foundation -[NSObject(NSKeyValueObservingPrivate) _changeValueForKey:key:key:usingBlock:]
    Frameworks/Foundation.framework/Foundation -[NSOperationQueue setMaxConcurrentOperationCount:]
    /Users/eric/Documents/gjs-app/node_modules/react-native-fetch-blob/ios/RNFetchBlobNetwork.m:79:19 -[RNFetchBlobNetwork init]
    /Users/eric/Documents/gjs-app/node_modules/react-native-fetch-blob/ios/RNFetchBlob/RNFetchBlob.m:106:46 __65-[RNFetchBlob fetchBlob:taskId:method:url:headers:body:callback:]_block_invoke
    /Users/eric/Documents/gjs-app/node_modules/react-native-fetch-blob/ios/RNFetchBlobReqBuilder.m:155:9 __85+[RNFetchBlobReqBuilder buildOctetRequest:taskId:method:url:headers:body:onComplete:]_block_invoke
    /usr/lib/system/libdispatch.dylib __dispatch_call_block_and_release
    /usr/lib/system/libdispatch.dylib __dispatch_client_callout
    /usr/lib/system/libdispatch.dylib __dispatch_queue_override_invoke
    /usr/lib/system/libdispatch.dylib __dispatch_root_queue_drain
    /usr/lib/system/libdispatch.dylib __dispatch_worker_thread3
    /usr/lib/system/libsystem_pthread.dylib __pthread_wqthread

@dwilt
Copy link
Author

dwilt commented Feb 9, 2017

Another: Got it while in Xcode today:
image

@SudoPlz
Copy link
Contributor

SudoPlz commented Feb 9, 2017

@dwilt Could it have something to do with Failed getAllPurchases ?

@the-simian
Copy link

the-simian commented Mar 21, 2017

We are seeing a similar error with the whatwg-fetch/fetch.js module. Its the same error more or less:

EXC_BAD_ACCESS in /Volumes/MyProject/node_modules/react-native/node_modules/whatwg-fetch/fetch.js:441 Attempted to dereference garbage pointer 0xabe4ebec8.

Like you - its being caught in bugsnag only. Its very rare when it happens, and we cannot reproduce it. I am posting because I saw you mentioned it was related to a fetch module you are using, and was curious if you were able to discover the root cause.

@hramos
Copy link
Contributor

hramos commented Jul 26, 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 26, 2017
@hramos hramos closed this as completed Jul 26, 2017
@dswbx
Copy link

dswbx commented Apr 20, 2018

It‘s rare indeed but still happening at rn version 0.55.0:

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

@peacechen
Copy link

Still observing this sporadically with RN 0.55.3. Usually happens the first time it launches after building from Xcode.

EXC_BAD_ACCESS: Attempted to dereference garbage pointer 0x10ff25f04.
Originated at or in a subcall of -[RCTHTTPRequestHandler sendRequest:withDelegate:]
?, in -[RCTHTTPRequestHandler sendRequest:withDelegate:]
?, in -[RCTNetworkTask start]
?, in -[RCTNetworking sendRequest:responseType:incrementalUpdates:responseSender:]
?, in __44-[RCTNetworking sendRequest:responseSender:]_block_invoke
...

@StribMaxMarti
Copy link

I am also observing this in production.

I have an app with ~10000 active iOS users over the last month.
Over the same period, bugsnag has recorded 191 events of this type, over 173 users.
These events come from around 50 types of error, with the most common being in _mh_execute_header in CoreGraphics with around 50 events.

If anyone is looking in to this I would be happy to provide more information.

@SudoPlz
Copy link
Contributor

SudoPlz commented May 23, 2018

I'm on the same boat @StribMaxMarti are you able to constantly reproduce this?

@Benjumali
Copy link

same here, really annoying.. any updates on this issue? @StribMaxMarti @SudoPlz

@StribMaxMarti
Copy link

I haven't been able to replicate in dev thus far.

Looking at recent occurrences, this seems to be happening after a user opens a specific webpage in my app's "browser" (webview with custom chrome). The error occurs seconds to hours after. My guess is that the browser stays mounted and something about the page causes the crash, perhaps a memory leak.

The url: https://www.mlb.com/cut4/meet-gabby-dimarco-the-fan-who-caught-the-foul-ball-in-her-beer/c-279997458

There are other instances of this error that aren't related to the webview, so this is only part of the picture.

@SudoPlz
Copy link
Contributor

SudoPlz commented Jun 7, 2018

No updates at all from my side..

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

No branches or pull requests

9 participants