启动应用后出现“dyld_sim`dyld_fatal_error”错误

7
dyld_sim`dyld_fatal_error:

    0x103e63000 <+0>: int3   
->  0x103e63001 <+1>: nop    
  • 我的应用程序编译和构建成功,但是最终出现了以上错误。
  • 没有其他消息(错误日志)。
  • 我在AppDelegate的didFinishLaunghingWithOptions方法和main.m中设置了断点,但它从来没有停在那里。
  • 我的应用程序的第一个视图总是可见的,只有在之后才会出现错误。

我找不到关于这个错误的任何信息 - 我该如何解决它?有什么具体的建议。

我也尝试了这个:

  • 将框架类型从“必需”更改为“可选”。

但是什么都没用!!

是的,我正在使用CocoaPods。

更新:

我的问题与任何其他问题都不匹配,因为两者标题相互矛盾。

我遇到的错误 - dyld_sim`dyld_fatal_error

重复(建议)问题中的错误 - dyld`dyld_fatal_error:

更新2: enter image description here

更新3:

崩溃日志

    dyld_sim`dyldbootstrap::rebaseDyld:
    0x10f95c002 <+0>:   pushq  %rbp
    0x10f95c003 <+1>:   movq   %rsp, %rbp
    0x10f95c006 <+4>:   pushq  %r15
    0x10f95c008 <+6>:   pushq  %r14
    0x10f95c00a <+8>:   pushq  %r13
    0x10f95c00c <+10>:  pushq  %r12
    0x10f95c00e <+12>:  pushq  %rbx
    0x10f95c00f <+13>:  subq   $0x18, %rsp
    0x10f95c013 <+17>:  movq   %rsi, %rbx
    0x10f95c016 <+20>:  movq   %rdi, %r14
    0x10f95c019 <+23>:  movl   0x10(%r14), %r13d
    0x10f95c01d <+27>:  addq   $0x20, %r14
    0x10f95c021 <+31>:  xorl   %eax, %eax
    0x10f95c023 <+33>:  movq   %rax, -0x30(%rbp)
    0x10f95c027 <+37>:  xorl   %eax, %eax
    0x10f95c029 <+39>:  movq   %rax, -0x38(%rbp)
    0x10f95c02d <+43>:  xorl   %r12d, %r12d
    0x10f95c030 <+46>:  xorl   %r15d, %r15d
->  0x10f95c033 <+49>:  movl   (%r14), %eax
    0x10f95c036 <+52>:  cmpl   $0xb, %eax
    0x10f95c039 <+55>:  jne    0x10f95c043               ; <+65>
    0x10f95c03b <+57>:  movq   %r14, %r12
    0x10f95c03e <+60>:  jmp    0x10f95c0cc               ; <+202>
    0x10f95c043 <+65>:  cmpl   $0x19, %eax
    0x10f95c046 <+68>:  jne    0x10f95c0cc               ; <+202>
    0x10f95c04c <+74>:  leaq   0x8(%r14), %rdi
    0x10f95c050 <+78>:  leaq   0x192c0(%rip), %rsi       ; "__LINKEDIT"
    0x10f95c057 <+85>:  callq  0x10f9751a2               ; strcmp
    0x10f95c05c <+90>:  testl  %eax, %eax
    0x10f95c05e <+92>:  movq   -0x30(%rbp), %rax
    0x10f95c062 <+96>:  cmoveq %r14, %rax
    0x10f95c066 <+100>: movq   %rax, -0x30(%rbp)
    0x10f95c06a <+104>: leaq   0x48(%r14), %rax
    0x10f95c06e <+108>: movl   0x40(%r14), %ecx
    0x10f95c072 <+112>: leaq   (%rcx,%rcx,4), %rcx
    0x10f95c076 <+116>: shlq   $0x4, %rcx
    0x10f95c07a <+120>: leaq   0x48(%r14,%rcx), %rcx
    0x10f95c07f <+125>: jmp    0x10f95c085               ; <+131>
    0x10f95c081 <+127>: addq   $0x50, %rax
    0x10f95c085 <+131>: cmpq   %rcx, %rax
    0x10f95c088 <+134>: jae    0x10f95c0b3               ; <+177>
    0x10f95c08a <+136>: movzbl 0x40(%rax), %edx
    0x10f95c08e <+140>: cmpl   $0x6, %edx
    0x10f95c091 <+143>: jne    0x10f95c081               ; <+127>
    0x10f95c093 <+145>: movq   0x28(%rax), %rdx
    0x10f95c097 <+149>: shrq   $0x3, %rdx
    0x10f95c09b <+153>: testl  %edx, %edx
    0x10f95c09d <+155>: je     0x10f95c081               ; <+127>
    0x10f95c09f <+157>: movq   0x20(%rax), %rsi
    0x10f95c0a3 <+161>: addq   %rbx, %rsi
    0x10f95c0a6 <+164>: addq   %rbx, (%rsi)
    0x10f95c0a9 <+167>: addq   $0x8, %rsi
    0x10f95c0ad <+171>: decl   %edx
    0x10f95c0af <+173>: jne    0x10f95c0a6               ; <+164>
    0x10f95c0b1 <+175>: jmp    0x10f95c081               ; <+127>
    0x10f95c0b3 <+177>: cmpq   $0x0, -0x38(%rbp)
    0x10f95c0b8 <+182>: jne    0x10f95c0cc               ; <+202>
    0x10f95c0ba <+184>: testb  $0x2, 0x3c(%r14)
    0x10f95c0bf <+189>: movl   $0x0, %eax
    0x10f95c0c4 <+194>: cmovneq %r14, %rax
    0x10f95c0c8 <+198>: movq   %rax, -0x38(%rbp)
    0x10f95c0cc <+202>: movl   0x4(%r14), %eax
    0x10f95c0d0 <+206>: addq   %rax, %r14
    0x10f95c0d3 <+209>: incl   %r15d
    0x10f95c0d6 <+212>: cmpl   %r13d, %r15d
    0x10f95c0d9 <+215>: jne    0x10f95c033               ; <+49>
    0x10f95c0df <+221>: movl   0x48(%r12), %esi
    0x10f95c0e4 <+226>: movl   0x4c(%r12), %edx
    0x10f95c0e9 <+231>: testq  %rdx, %rdx
    0x10f95c0ec <+234>: je     0x10f95c13d               ; <+315>
    0x10f95c0ee <+236>: movq   -0x38(%rbp), %rax
    0x10f95c0f2 <+240>: movq   0x18(%rax), %rax
    0x10f95c0f6 <+244>: addq   %rbx, %rax
    0x10f95c0f9 <+247>: movq   -0x30(%rbp), %rcx
    0x10f95c0fd <+251>: movq   %rcx, %rdi
    0x10f95c100 <+254>: movq   0x18(%rdi), %rcx
    0x10f95c104 <+258>: addq   %rbx, %rcx
    0x10f95c107 <+261>: addq   %rsi, %rcx
    0x10f95c10a <+264>: subq   0x28(%rdi), %rcx
    0x10f95c10e <+268>: leaq   (%rcx,%rdx,8), %rdx
    0x10f95c112 <+272>: movl   0x4(%rcx), %esi
    0x10f95c115 <+275>: movl   %esi, %edi
    0x10f95c117 <+277>: andl   $0x6000000, %edi
    0x10f95c11d <+283>: cmpl   $0x6000000, %edi
    0x10f95c123 <+289>: jne    0x10f95c14c               ; <+330>
    0x10f95c125 <+291>: cmpl   $0x10000000, %esi
    0x10f95c12b <+297>: jae    0x10f95c15f               ; <+349>
    0x10f95c12d <+299>: movslq (%rcx), %rsi
    0x10f95c130 <+302>: addq   %rbx, (%rax,%rsi)
    0x10f95c134 <+306>: addq   $0x8, %rcx
    0x10f95c138 <+310>: cmpq   %rdx, %rcx
    0x10f95c13b <+313>: jb     0x10f95c112               ; <+272>
    0x10f95c13d <+315>: addq   $0x18, %rsp
    0x10f95c141 <+319>: popq   %rbx
    0x10f95c142 <+320>: popq   %r12
    0x10f95c144 <+322>: popq   %r13
    0x10f95c146 <+324>: popq   %r14
    0x10f95c148 <+326>: popq   %r15
    0x10f95c14a <+328>: popq   %rbp
    0x10f95c14b <+329>: retq   
    0x10f95c14c <+330>: movl   $0x8, %edi
    0x10f95c151 <+335>: callq  0x10f9710ea               ; __cxa_allocate_exception
    0x10f95c156 <+340>: leaq   0x191c5(%rip), %rcx       ; "relocation in dyld has wrong size"
    0x10f95c15d <+347>: jmp    0x10f95c170               ; <+366>
    0x10f95c15f <+349>: movl   $0x8, %edi
    0x10f95c164 <+354>: callq  0x10f9710ea               ; __cxa_allocate_exception
    0x10f95c169 <+359>: leaq   0x191d4(%rip), %rcx       ; "relocation in dyld has wrong type"
    0x10f95c170 <+366>: movq   %rcx, (%rax)
    0x10f95c173 <+369>: leaq   0x24c56(%rip), %rcx       ; typeinfo for char const*
    0x10f95c17a <+376>: xorl   %edx, %edx
    0x10f95c17c <+378>: movq   %rax, %rdi
    0x10f95c17f <+381>: movq   %rcx, %rsi
    0x10f95c182 <+384>: callq  0x10f971354               ; __cxa_throw

看起来动态链接器找不到 .dylib.framework 文件。你知道是哪一个吗? - Droppy
我想知道哪个库无法加载。错误消息将以“dyld:Library not loaded:…”开头。请在您的问题中更新此信息。 - Droppy
没有任何线索可以解释为什么动态链接器如此不安,所以无法提供太多帮助。 - Droppy
1个回答

3

在删除一些东西以尝试修复另一个问题后,我遇到了这个问题。我成功地通过还原以下内容来解决它: 在Project>Build Settings>Runpath Search Paths中,添加以下内容(使用+图标,值用逗号分隔):

$(inherited), @executable_path/Frameworks, @loader_path/Frameworks

很不幸,SO的文本编辑器让我把它写在代码块中。


1
将此添加到运行路径搜索路径,然后重新运行代码,会使“库未加载”错误显示在控制台中,从而让我进一步调试为什么找不到特定的库(在我的情况下是一个自定义库)。在添加此代码之前,控制台中没有任何错误消息,只有致命错误。 - user206481

网页内容由stack overflow 提供, 点击上面的
可以查看英文原文,
原文链接