Crashlytics:编译器生成的含义是什么? [英] Crashlytics: What does compiler-generated means?

查看:22
本文介绍了Crashlytics:编译器生成的含义是什么?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在使用 Firebase Crashlytics 从我的 iOS 应用程序中获取崩溃报告,但我遇到了一些我无法通过 <compiler-generated> 理解的崩溃.错误信息.我不明白是什么导致了这种崩溃.

I'm using Firebase Crashlytics to get crash reports from my iOS app and I get some crashes that I don't understand with a <compiler-generated> error message. I don't understand what causes this kind of crash.

当我查看堆栈跟踪时,我也得到一或几行编译器生成的错误消息.

When I look at the stack trace I get one or several lines with the compiler-generated error message too.

我一直在搜索,但找不到发生这种崩溃的原因.在此特定示例中,这里是发生崩溃的函数(它没有说明哪一行).据我所知,我只能猜测这与我在另一个数组上使用数组中的索引有关,因此它可能超出范围......但我真的不知道.

I've been searching but can't find the reason or reasons why this kind of crash happens. In this particular example here is the function where the crash happens (it doesn't say which line). From what I see I can only guess that it has to do with the fact that I'm using an index from an array on another array so it might be out of range... but I don't really know.

这使得修复崩溃变得非常困难,因为我只能假设我的代码中可能有什么问题.另外,如果问题实际上是超出索引的范围,它不应该报告发生崩溃的行吗?我真的很想了解编译器生成的东西,而不是解决这个实际的崩溃:)

It makes it really hard to fix crashes cause I just can assume what might be wrong in my code. Plus if the problem is actually the range out of index thing, shouldn't it report the line where the crashes occurs ? I'm really trying to understand the compiler-generated thing more than solving this actual crash :)

推荐答案

编译器生成的意思是代码被swift编译器注入到最终的二进制文件中.这可能是展开的内联类型库函数、优化等.屏幕截图上的崩溃日志仅显示失败执行堆栈的 顶部调用,并且在大多数情况下,它不是您的代码行(虽然有原因),但有一些标准函数调用(来自库或自动生成).因此,您不仅要调查第一行,还要调查崩溃堆栈的完整回溯.

Compiler-generated means code injected into final binary by swift compiler. This might be unrolled inline-type library function, optimisation things, etc. The crash-log on your screenshot just shows the top call of the failed execution stack, and in majority of cases it is not your code line (while there is the reason) but some standard function call (from library or autogenerated). So you have to investigate not just one first line, but complete back trace of crashed stack.

这篇关于Crashlytics:编译器生成的含义是什么?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆