productbuild crashed with Segmentation fault: 11

While doing the final .pkg file calling the tool:
productbuild --distribution "$DIS_FILE" --resources "$RES_DIR" --package-path "$PKGS" --version "$VERSION" "$PKG_NAME"

And the crash stack is:

Thread 0 Crashed:: Dispatch queue: com.apple.main-thread
0   libxar.1.dylib                	0x00007fff2ae2c00c xar_file_new_from_parent + 190
1   libxar.1.dylib                	0x00007fff2ae29d59 xar_add_frombuffer + 63
2   com.apple.PackageKit          	0x00007fff3ba79a2f -[PKMutableXARArchive setData:forPath:compressed:] + 246
3   com.apple.PackageKit          	0x00007fff3babb38e -[PKArchiveDistributionContainer setResourceData:forKey:forLocalization:] + 284
4   com.apple.PackageKit          	0x00007fff3bab9fef -[PKMutableDistributionContainer storeResourcesAtPath:forLocalization:] + 922
5   com.apple.PackageKit          	0x00007fff3baa5590 -[PKArchiveProduct(ForMutableSubclassers) addResourceDataAtPath:] + 324
6   productbuild                  	0x000000010efdc8a8 0x10efd8000 + 18600
7   productbuild                  	0x000000010efdba6e 0x10efd8000 + 14958
8   libdyld.dylib                 	0x00007fff204c0f3d start + 1

While using macOS 11.6.7, xcode 12.3, and CLT 11.1

Replies

Well, that’s annoying. Even more annoying is that I’m having issues working with your crash report. I suspect that it might have been munged by DevForums. Can you email me a copy? My address is in my signature.

Make sure to reference this thread ’cause I get a lot of email |-:

Share and Enjoy

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

Hi @eskimo

I just mailed you the crash report.

Thanks!