Which is the cause for dyld`dyld_fatal_error, a incompatible api on iOS?

mamcx picture mamcx · Apr 26, 2012 · Viewed 21.9k times · Source

I'm moving part of my projects to iOS 5 / ARC. One of the oldest project (iOS 4.2, armv6 for support iPod Touch 2g) is giving to me:

dyld`dyld_fatal_error:
0x8feb1070:  int3   
0x8feb1071:  nop    

Just after the launch image but before going to main. Must be some lib/code updated to iOS 5, but which one? Is possible to use a better method than guess??

Answer

grundyoso picture grundyoso · Jun 2, 2012

Ran to this problem myself trying to reproduce this project using Xcode4.3.2 with SDK iOS5.1. The issue was that the standard project template on Xcode4.3.2 configures for iOS5, which has some features that earlier iOS versions don't support. In my case, the GLKit Framework was being pulled in and was not supported on my iPhone3G running iOS4.2. The error I was getting was just like yours:

dyld`dyld_fatal_error:
0x2fe01080:  trap   
0x2fe01084:  mov    r0, r0

Upon closer review of the Console Output you can see what's causing the app to crash:

dyld: Library not loaded: /System/Library/Frameworks/GLKit.framework/GLKit
Referenced from: /var/mobile/Applications/A60A53B1-F87D-467D-BB0B-82C603049202/HiJackInTheBox.app/HiJackInTheBox
  Reason: image not found
(lldb) 

The error meant that the GLKit framework was not found in the iOS resident on the target where the app was installed. The framework was being pulled into the build under Project->BuildPhases->LinkBinaryWithLibraries.

So to correct the problem I needed to remove the GLKit framework and all code making references to it. Then the build succeeded and ran on the target device. Hope this helps!