'Crashlytics: What does compiler-generated means?

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.

enter image description here

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

enter image description here

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.

enter image description here

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 :)



Solution 1:[1]

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.

backup

Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source
Solution 1