仅使用LLDB()启动时iOS应用程序崩溃(该应用程序在模拟器中运行)

问题描述:

只需完成将代码库更新到Swift 4即可.它在模拟器中运行良好.构建设备时,我会立即崩溃,没有错误消息:

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:

在模拟器中工作正常.

上面有一些线程:

应用仅因(lldb)而崩溃?

iOS应用程序崩溃,没有错误,只是(lldb)

dyld`__abort_with_payload:没有错误消息

从我了解到的问题来看,可能是链接二进制文件,但是我已经研究了链接二进制文件,并且我相信一切都正确链接了.

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:​​:我有一个xcodeproj的内部框架,因此我尝试将其删除并将其安装为Pod,但错误仍然存​​在.

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 :添加完整的堆栈跟踪:

Update2 Adding full stack trace:

Update3 不是通过从Xcode而是从手机本身启动应用程序,然后通过跟踪错误日志来跟踪崩溃而导致的错误跟踪: Termination Description: DYLD, Library not loaded: @rpath/PromiseKit.framework/PromiseKit | Referenced from: /var/containers/Bundle/Application/C50A937F-2A6F-4E5C-89C7-2D

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 在删除了promisekit框架之后,该应用程序的外壳版本确实在设备上进行了编译,这使我断定这是一个框架链接错误(就像其他遇到此神秘问题的人一样).但是,请尝试使用常见线程中的所有解决方案,例如:

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框架崩溃的设备上的应用程序,dyld:库未加载,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.

长短不一是当我将框架嵌入到主应用程序中时,它引起了其他一些难以理解的错误.当我从构建阶段删除一个运行脚本时,它允许嵌入实际运行,并解决了该问题.

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:

我能够嵌入框架,并且该应用开始在设备上编译.

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.