10

App wasn't developed by me, but now I have to add some features. Code compiles add launches on simulator but immediately crash on real device (didFinishLaunchingWithOptions never calls). Xcode doesn't show any errors. I think the problem may be in pods and frameworks but don't know how to check if this so. I reinstalled pods and recreated framework dependences in project but no app still crash. I have only this info from Xcode enter image description here enter image description here

How this info can help me? Any help appreciated.

UPD1: stacktrace enter image description here

UPD2: App crash on iOS9 and iOS10 so NSCameraUsageDescription isn't the problem

Ossir
  • 493
  • 1
  • 8
  • 19
  • Which architecture is your device on? Sometimes issues like these only appear on 32-bit ARM and work fine on amd64 (see http://stackoverflow.com/questions/29434253/xcode-exc-breakpoint-exc-arm-breakpoint-subcode-0xe7ffdefe for an example). Try using a device of the other type to test. Also: I think Xcode has a way to show the stack trace when an exception occurs. Can you show us that? – Raphael Schweikert Nov 30 '16 at 11:02
  • Have you tried including use_frameworks! in your podfile? maybe one of your dependencies has not been built for your current architecture... – Toastor Nov 30 '16 at 11:28
  • 1
    Have you tried deleting your app on device and reinstall? – JoakimE Nov 30 '16 at 11:28
  • 2
    If I search for `__abort_with_payload` I find a few mentions of iOS 10 crashing when trying to access the camera without having defined the `NSCameraUsageDescription` Info.plist key. Maybe it has to do with you trying to access privacy-related features? See [this answer](http://stackoverflow.com/a/39680377/11940) for a complete list. If you disable breakpoints, do you see anything in the console after the crash? – Raphael Schweikert Nov 30 '16 at 11:36
  • I've updated my question with stack trace. I'm using iPod5 (32-bit) and iPhone6 but it crash on both device – Ossir Nov 30 '16 at 11:46
  • I've tried to reinstall app on device – Ossir Nov 30 '16 at 11:50
  • @Ossir Have you disabled stopping at breakpoints as I suggested? This should print a human-readable message of the payload. – Raphael Schweikert Dec 05 '16 at 08:56
  • Yes but nothing changed. I found why app crash. Thanks for the help – Ossir Dec 05 '16 at 11:40
  • @Joakim Wow! It worked lol thanks – Logan Mar 13 '17 at 18:49

5 Answers5

6

had the same problem, worked on simulator but not on device and got this wonderful but minimalist stacktrace "abort_with_payload"

Turns out I just needed the "NSMicrophoneUsageDescription" key in my plist

PhilippeAuriach
  • 2,418
  • 2
  • 22
  • 41
4

The problem was in pods frameworks. Script generated by pods can't embed some frameworks correctly. I removed "[CP] Embed Pods Frameworks" script and add frameworks to "Embedded Binaries" by myself. And problem was solved.

Ossir
  • 493
  • 1
  • 8
  • 19
3

If abort_with_payload error occurred then chances are the Info.plist is missing UsageDescription of any Privacy key so check is there any thing missing or apple changed/added new UsageDescription for camera, photos, location etc that you are using.

Varun Naharia
  • 5,318
  • 10
  • 50
  • 84
2

Exception Type: EXC_CRASH (SIGABRT) Exception Codes: 0x0000000000000000, 0x0000000000000000 Exception Note: EXC_CORPSE_NOTIFY Termination Description: DYLD, Library not loaded: @rpath/libswiftCoreGraphics.dylib | Referenced from: /var/containers/Bundle/Application/7208AD66-5D56-4973-88A9-8D22D7E541DB/myapp.app/myapp | Reason: no suitable image found. Did find: | /private/var/containers/Bundle/Application/7208AD66-5D56-4973-88A9-8D22D7E541DB/myapp.app/Frameworks/libswiftCoreGraphics.dylib: code signing blocked mmap() '/private/var/containers/Bundle/Application/7208AD66-5D56-4973-88A9-8D22D7E541DB/myapp.app/Frameworks/libswiftCoreGraphics.dylib'

When crashed on 'abort_with_payload', I also got the above output from the console. I think the most important message is "code signing blocked mmap()", which indicates the problem was probably caused by code signing.

My solution was to delete the apple WWDR certificate and downloaded it from Apple. And MAKE SURE when trusting the certificate, use the "use system defaults" option.

enter image description here

Then QUIT the XCode, reopened it, cleaned the project and rebuilt. It works for me.

Jiang Wang
  • 273
  • 3
  • 9
0

This can also happen when you have XIB's in a subproject, and they have embedded UIViews. These UIViews should then have the right module selected!

Rudolf J
  • 517
  • 4
  • 10