Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

dyld: Symbol not found: _objc_debug_tag60_permutations #538

Closed
howoften opened this issue Aug 14, 2024 · 6 comments · Fixed by #550
Closed

dyld: Symbol not found: _objc_debug_tag60_permutations #538

howoften opened this issue Aug 14, 2024 · 6 comments · Fixed by #550
Labels

Comments

@howoften
Copy link

howoften commented Aug 14, 2024

app crash before - (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions
here is some info print from XCode Console:

dyld: Symbol not found: _objc_debug_tag60_permutations
  Referenced from: /private/var/containers/Bundle/Application/021CB514-F075-4F65-BB58-B0B26CAAACF7/Test.app/Frameworks/KSCrash.framework/KSCrash
  Expected in: /usr/lib/libobjc.A.dylib
 in /private/var/containers/Bundle/Application/021CB514-F075-4F65-BB58-B0B26CAAACF7/Test.app/Frameworks/KSCrash.framework/KSCrash

My podfile:

target 'Test' do
  use_frameworks!
pod 'KSCrash', '~> 2.0.0-alpha.5'
end

The app runs on an iPhone 6 with iOS12.3.1,Xcode version is 15.4

@GLinnik21 GLinnik21 added the bug label Aug 14, 2024
@GLinnik21
Copy link
Collaborator

Hi!
KSCrash isn't typically used as a dynamic library. Could you try modifying your Podfile to use static linking?

target 'Test' do
  use_frameworks! :linkage => :static
  pod 'KSCrash', '~> 2.0.0-alpha.5'
end

Run pod install and rebuild. Does the error persist? Can you share the code you're using to initialize and run KSCrash? ?

@GLinnik21
Copy link
Collaborator

Relevant code

// Map of tags to obfuscated tags.
extern uintptr_t objc_debug_taggedpointer_obfuscator;
#if OBJC_SPLIT_TAGGED_POINTERS
extern uint8_t objc_debug_tag60_permutations[8];
static inline uintptr_t _objc_basicTagToObfuscatedTag(uintptr_t tag) {
return objc_debug_tag60_permutations[tag];
}
static inline uintptr_t _objc_obfuscatedTagToBasicTag(uintptr_t tag) {
for (unsigned i = 0; i < 7; i++)
if (objc_debug_tag60_permutations[i] == tag)
return i;
return 7;
}
#endif

@zjzjhaha
Copy link

I also encounter the same Issue on iphone SE1 with 13.3.1, How to support this version to fix the BUG

@howoften
Copy link
Author

Hi! KSCrash isn't typically used as a dynamic library. Could you try modifying your Podfile to use static linking?

target 'Test' do
  use_frameworks! :linkage => :static
  pod 'KSCrash', '~> 2.0.0-alpha.5'
end

Run pod install and rebuild. Does the error persist? Can you share the code you're using to initialize and run KSCrash? ?

thanks for your reply,I've been pretty busy lately.
I have modified my podFile like yours, But the error still exist,

@howoften
Copy link
Author

howoften commented Aug 30, 2024 via email

@GLinnik21
Copy link
Collaborator

it cant be reproduce on iOS simulators, because i cant install a simulators with iOS 12.

We installed the iOS 12 simulator on Xcode 11 on VM, so it doesn't reproduce on the iOS 12 simulator.

according to the xcode console log, the library libobjc.A.dylib doesnt contains the symbol ‘_objc_debug_tag60_permutations’;may be the shared dynamic library(libobjc.A.dylib) on my iPhone 6(12.3.1) doesnt contains that symbol,
could you consider to remove that symbol?

Yes, that is exactly what is happening. I did find my iPhone 6 with iOS 12 and successfully reproduced the problem. I'm already working on a solution in the linked branch.

@GLinnik21 GLinnik21 linked a pull request Aug 30, 2024 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants