Dynamic library crashing with Code Signature Invalid

Hi, I have a dynamic library libmowglicore.dylib, which works fine in non sandboxed enviroment(command line cpp project). libmowglicore.dylib is signed, it shows valid on disk.

When i add it to network extension project, network extension getting crash on launch.


0   dyld                          	       0x102c8e81c dyld3::MachOFile::compatibleSlice(Diagnostics&, void const*, unsigned long, char const*, dyld3::Platform, bool, dyld3::GradedArchs const&) + 76
1   dyld                          	       0x102c72b9c invocation function for block in dyld4::JustInTimeLoader::makeJustInTimeLoaderDisk(Diagnostics&, dyld4::RuntimeState&, char const*, dyld4::Loader::LoadOptions const&, bool, unsigned int) + 96
2   dyld                          	       0x102c72b9c invocation function for block in dyld4::JustInTimeLoader::makeJustInTimeLoaderDisk(Diagnostics&, dyld4::RuntimeState&, char const*, dyld4::Loader::LoadOptions const&, bool, unsigned int) + 96
3   dyld                          	       0x102c77fcc dyld4::SyscallDelegate::withReadOnlyMappedFile(Diagnostics&, char const*, bool, void (void const*, unsigned long, bool, dyld4::FileID const&, char const*) block_pointer) const + 132
4   dyld                          	       0x102c72b08 dyld4::JustInTimeLoader::makeJustInTimeLoaderDisk(Diagnostics&, dyld4::RuntimeState&, char const*, dyld4::Loader::LoadOptions const&, bool, unsigned int) + 204

How to debug it?

Answered by DTS Engineer in 759247022

This looks like one of the weird code signing crashes discussed in Updating Mac Software. Try doing this:

  1. Reproduce the crash.

  2. Restart your machine.

  3. Repeat the actions required to reproduce the crash, making sure not to rebuild your code.

Does it still crash?

Share and Enjoy

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

Accepted Answer

This looks like one of the weird code signing crashes discussed in Updating Mac Software. Try doing this:

  1. Reproduce the crash.

  2. Restart your machine.

  3. Repeat the actions required to reproduce the crash, making sure not to rebuild your code.

Does it still crash?

Share and Enjoy

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

Dynamic library crashing with Code Signature Invalid
 
 
Q