Search code examples
iosxcodelldbswift4sigabrt

iOS App Crash On Launch With Only LLDB() (The App Works In Simulator)


Just finished updating codebase to Swift 4. It is working fine in the simulator. When I build to a device I get an instant crash with no error message:

enter image description here enter image description here enter image description here

It works fine in the simulator.

There are some threads on it:

App crashes only with (lldb)?

iOS app crashes with no error, just (lldb)

dyld`__abort_with_payload: With no error message

From what I learned the problem might be linked binaries but I've dug into my linked binaries and I believe everything is linked correctly.

Any thoughts on where to begin debugging this or what the problem might be?

Update1: I had an internal framework for one of my xcodeproj's so I tried removing it and installing it as a pod but the error still persists.

Update2 Adding full stack trace: enter image description here

Update3 Error trace from forcing crash by launching app not from Xcode but the phone itself and then tracing error log: Termination Description: DYLD, Library not loaded: @rpath/PromiseKit.framework/PromiseKit | Referenced from: /var/containers/Bundle/Application/C50A937F-2A6F-4E5C-89C7-2D

Update4 After removing the promisekit framework the shell version of the app does compile on the device which leads me to conclude this (like the others who have had this mysterious issue) is a framework link error. However trying all the solutions in the common threads like:

iOS app with framework crashed on device, dyld: Library not loaded, Xcode 6 Beta

Has not worked. Embedding and linking or anything else has not worked.

So it is a framework linking error of some kind but linking and embedding does not seem to fix the issue.


Solution

  • The long and the short of it was when I embedded the framework into the main app, it caused some other obscure bug. When I removed a runscript from the build phases, it allowed the embedding to actually work and it fixed the issue.

    So by deleting the run script phase seen below in the build phases: enter image description here

    I was able to embed the framework and the app began to compile on devices.

    So if you have this type of error in the future the solution is still to embed it, but in my case, there was another problem preventing that embedding from working.