【问题标题】:getting error "dyld_sim`dyld_fatal_error" after app starts应用程序启动后出现错误“dyld_sim`dyld_fatal_error”
【发布时间】:2015-06-15 11:15:35
【问题描述】:
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

更新 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。你知道是哪一个吗?
  • 我想知道哪个库加载失败。将有一条以dyld: Library not loaded: ... 开头的错误消息。请用它更新您的问题。
  • 对于动态链接器为何如此不安,没有任何线索可以帮助您。

标签: ios runtime-error fatal-error


【解决方案1】:

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

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

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

【讨论】:

  • 将此添加到运行路径搜索路径,然后重新运行代码使控制台中显示“库未加载”错误,然后让我进一步调试未找到特定库的原因(在我的情况下,它是一个自定义库)。在添加这个之前,我在控制台中没有收到任何错误消息,只是致命错误
猜你喜欢
  • 2021-05-18
  • 1970-01-01
  • 2018-03-26
  • 2017-05-07
  • 2020-05-12
  • 1970-01-01
  • 1970-01-01
  • 2018-11-09
  • 1970-01-01
相关资源
最近更新 更多