Skip to content

EXC_BAD_ACCESS crash in SKAdNetwork startImpression:completionHandler: #162

@emilnilimaa

Description

@emilnilimaa

Environment

react-native-appodeal: 3.10.1
Native Appodeal SDK: 3.10.0
Platform: iOS
Ad types: Interstitial, Rewarded Video, Banner
Adapter pods (all 3.10.0.0)
APDBidMachineAdapter, APDDTExchangeAdapter, APDIABAdapter, APDInMobiAdapter, APDIronSourceAdapter, APDMetaAudienceNetworkAdapter, APDMintegralAdapter, APDMyTargetAdapter, APDPangleAdapter, APDSmaatoAdapter, APDVungleAdapter, APDYandexAdapter, APDAmazonAdapter, APDAppLovinAdapter, APDAppLovinMAXAdapter, APDAppsFlyerAdapter, APDUnityAdapter

Description

We're seeing recurring EXC_BAD_ACCESS / KERN_INVALID_ADDRESS crashes reported in Sentry originating from [SKAdNetwork startImpression:completionHandler:]. The crash appears to be a null pointer dereference (address 0x1588) happening asynchronously after showing an interstitial ad via Appodeal.show().

This is not reproducible on demand — it occurs sporadically in production.

Stack Trace

EXC_BAD_ACCESS: KERN_INVALID_ADDRESS at 0x1588

__swift_project_boxed_opaque_existential_1Tm
StoreKit __49+[SKAdNetwork startImpression:completionHandler:]block_invoke_2
CoreFoundation invoking

CoreFoundation -[NSInvocation invoke]
Foundation NSXPCCONNECTION_IS_CALLING_OUT_TO_REPLY_BLOCK
Foundation -[NSXPCConnection _decodeAndInvokeReplyBlockWithEvent:sequence:replyInfo:]
Foundation __88-[NSXPCConnection _sendInvocation:orArguments:count:methodSignature:selector:withProxy:]_block_invoke_3
Foundation -[NSXPCConnection _sendInvocation:orArguments:count:methodSignature:selector:withProxy:]
Foundation -[NSXPCConnection _sendSelector:withProxy:arg1:arg2:]
Foundation _NSXPCDistantObjectSimpleMessageSend2
StoreKit __49+[SKAdNetwork startImpression:completionHandler:]_block_invoke.36
libdispatch _dispatch_call_block_and_release
libdispatch _dispatch_client_callout
libdispatch _dispatch_lane_serial_drain
libdispatch _dispatch_lane_invoke
libdispatch _dispatch_workloop_worker_thread
libsystem_pthread _pthread_wqthread
Expected Behavior
No crash when showing interstitial ads. The SKAdNetwork impression tracking should handle invalid/deallocated objects gracefully.

Additional Context

The crash appears to involve a deallocated or invalid impression object being passed to SKAdNetwork's startImpression:completionHandler:. The very low memory address (0x1588) suggests a null pointer dereference within the completion handler callback.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions