iOS app from TestFlight cannot be opened due to Code signing

One of our apps (built with Xcode 26.1.1 and distributed via TestFlight) crashes upon launch on iOS 17 with Exception Type: EXC_BAD_ACCESS (SIGKILL) and Termination Reason: CODESIGNING 2 Invalid Page.

I have never seen this before. Any pointers?

On iOS 18 & 26 this does not happen btw.

Answered by jzilske in 876059022

It does, and the exception reason tripped me up at first:

Exception Type:  EXC_BAD_ACCESS (SIGKILL)
Exception Subtype: KERN_INVALID_ADDRESS at 0x0000000000000000
Exception Codes: 0x0000000000000001, 0x0000000000000000
VM Region Info: 0 is not in any region.  Bytes before following region: 4339253248
      REGION TYPE                 START - END      [ VSIZE] PRT/MAX SHRMOD  REGION DETAIL
      UNUSED SPACE AT START
--->  
      __TEXT                   102a3c000-102a40000 [   16K] r-x/r-x SM=COW  /var/containers/Bundle/Application/5BD67EC6-39CC-428C-944B-C2E2FCA311B4/<private>.app/<private>
Termination Reason: CODESIGNING 2 Invalid Page

Turns put it was likely a problem with an async closure passed to a Combine subject as indicated by the first stack frames:

0   ???                           	0x0000000000000000 0x0 + 0
1   <private>                     	0x0000000102edacc8 type metadata accessor for (nonisolated(nonsending) (), ()) + 44 (/<compiler-generated>:0)
2   <private>                     	0x0000000102edac64 type metadata accessor for PassthroughSubject<(nonisolated(nonsending) (), ()), Never> + 44 (/<compiler-generated>:0)

Does this general a crash report? If so, please post an example here. See Posting a Crash Report for advice on how to do that.

Share and Enjoy

Quinn “The Eskimo!” @ Developer Technical Support @ Apple
let myEmail = "eskimo" + "1" + "@" + "apple.com"

It does, and the exception reason tripped me up at first:

Exception Type:  EXC_BAD_ACCESS (SIGKILL)
Exception Subtype: KERN_INVALID_ADDRESS at 0x0000000000000000
Exception Codes: 0x0000000000000001, 0x0000000000000000
VM Region Info: 0 is not in any region.  Bytes before following region: 4339253248
      REGION TYPE                 START - END      [ VSIZE] PRT/MAX SHRMOD  REGION DETAIL
      UNUSED SPACE AT START
--->  
      __TEXT                   102a3c000-102a40000 [   16K] r-x/r-x SM=COW  /var/containers/Bundle/Application/5BD67EC6-39CC-428C-944B-C2E2FCA311B4/<private>.app/<private>
Termination Reason: CODESIGNING 2 Invalid Page

Turns put it was likely a problem with an async closure passed to a Combine subject as indicated by the first stack frames:

0   ???                           	0x0000000000000000 0x0 + 0
1   <private>                     	0x0000000102edacc8 type metadata accessor for (nonisolated(nonsending) (), ()) + 44 (/<compiler-generated>:0)
2   <private>                     	0x0000000102edac64 type metadata accessor for PassthroughSubject<(nonisolated(nonsending) (), ()), Never> + 44 (/<compiler-generated>:0)
the exception reason tripped me up at first:

Yeah, I’ve been mislead by that in the past. Fortunately, this time I remembered the mantra that we here in DTS chant steadily throughout the day:

Always start with a crash report.

Always start with a crash report.

Almost start with a crash report.

(-:

Share and Enjoy

Quinn “The Eskimo!” @ Developer Technical Support @ Apple
let myEmail = "eskimo" + "1" + "@" + "apple.com"

iOS app from TestFlight cannot be opened due to Code signing
 
 
Q