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

Crash on Xcode 15 with iOS 14 #2274

Closed
5 tasks done
devssun opened this issue Oct 5, 2023 · 4 comments
Closed
5 tasks done

Crash on Xcode 15 with iOS 14 #2274

devssun opened this issue Oct 5, 2023 · 4 comments

Comments

@devssun
Copy link

devssun commented Oct 5, 2023

Checklist before submitting a bug report

Xcode version

15.0

Facebook iOS SDK version

16.2.0

Dependency Manager

SPM

SDK Framework

Core

Goals

Success to build

Expected results

Success to build

Actual results

When I run my app on iOS 14.1 real device, there is a crash from Facebook SDK.
But they just give only Thread 1: EXC_BAD_ACCESS (code=1, address=0x0).

If I don't initalize facebook SDK, then it works to run.
I updated facebook SDK version 14 to 16, but it doesn't work.

How can I fix? Please let me know.

Error Stack

Thread 1 Queue : com.apple.main-thread (serial)
#1	0x0000000100cb7794 in __libcpp_operator_new<unsigned long> [inlined] at /Applications/Xcode_14.2.0_14C18_fb.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS16.2.sdk/usr/include/c++/v1/new:235
#2	0x0000000100cb7790 in __libcpp_allocate [inlined] at /Applications/Xcode_14.2.0_14C18_fb.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS16.2.sdk/usr/include/c++/v1/new:261
#9	0x0000000100cb7734 in +[FBSDKModelParser parseWeightsData:] at /facebook-ios-sdk/FBSDKCoreKit/FBSDKCoreKit/AppEvents/Internal/ML/FBSDKModelParser.mm:67
#10	0x0000000100cb3bf8 in __51-[FBSDKModelManager checkFeaturesAndExecuteForMTML]_block_invoke at /facebook-ios-sdk/FBSDKCoreKit/FBSDKCoreKit/AppEvents/Internal/ML/FBSDKModelManager.mm:301
#2	0x0000000100cb3ba0 in -[FBSDKModelManager checkFeaturesAndExecuteForMTML] at /facebook-ios-sdk/FBSDKCoreKit/FBSDKCoreKit/AppEvents/Internal/ML/FBSDKModelManager.mm:299
#3	0x0000000100cb0bf0 in __27-[FBSDKModelManager enable]_block_invoke at /facebook-ios-sdk/FBSDKCoreKit/FBSDKCoreKit/AppEvents/Internal/ML/FBSDKModelManager.mm:132
#6	0x0000000100cb0a10 in _dispatch_once [inlined] at /Applications/Xcode_14.2.0_14C18_fb.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS16.2.sdk/usr/include/dispatch/once.h:85
#7	0x0000000100cb0a00 in -[FBSDKModelManager enable] at /facebook-ios-sdk/FBSDKCoreKit/FBSDKCoreKit/AppEvents/Internal/ML/FBSDKModelManager.mm:93
#8	0x0000000100c86034 in __43-[FBSDKAppEvents fetchServerConfiguration:]_block_invoke_4.99 at /facebook-ios-sdk/FBSDKCoreKit/FBSDKCoreKit/AppEvents/FBSDKAppEvents.m:987
#9	0x0000000100d3988c in closure #1 in _FeatureManager.check(_:completionBlock:) [inlined] at /facebook-ios-sdk/FBSDKCoreKit/FBSDKCoreKit/Internal/FeatureManager/_FeatureManager.swift:66

Steps to reproduce

No response

Code samples & details

No response

@devssun devssun changed the title Crash on Xcode 15 Crash on Xcode 15 with iOS 14 Oct 5, 2023
@EkkoG
Copy link

EkkoG commented Oct 9, 2023

Maybe you can try this solution https://developer.apple.com/documentation/xcode-release-notes/xcode-15-release-notes

Binaries using symbols with a weak definition crash at runtime on iOS 14/macOS 12 or older. This impacts primarily C++ projects due to their extensive use of weak symbols. (114813650) (FB13097713)

Workaround: Bump the minimum deployment target to iOS 15, macOS 12, watchOS 8 or tvOS 15, or add -Wl,-ld_classic to the OTHER_LDFLAGS build setting.

Weak symbol imports are linked as non-weak imports, when used from LTO object files. (115521975) (FB13171424)

Workaround: Add -Wl,-weak_reference_mismatches,weak or -Wl,-ld_classic options to the OTHER_LDFLAGS build setting.

@devssun
Copy link
Author

devssun commented Oct 10, 2023

Maybe you can try this solution https://developer.apple.com/documentation/xcode-release-notes/xcode-15-release-notes

Binaries using symbols with a weak definition crash at runtime on iOS 14/macOS 12 or older. This impacts primarily C++ projects due to their extensive use of weak symbols. (114813650) (FB13097713)
Workaround: Bump the minimum deployment target to iOS 15, macOS 12, watchOS 8 or tvOS 15, or add -Wl,-ld_classic to the OTHER_LDFLAGS build setting.
Weak symbol imports are linked as non-weak imports, when used from LTO object files. (115521975) (FB13171424)
Workaround: Add -Wl,-weak_reference_mismatches,weak or -Wl,-ld_classic options to the OTHER_LDFLAGS build setting.

I add -Wl,-ld_classic options to the OTHER_LDFLAGS build setting, and it works! thank you.

@devssun devssun closed this as completed Oct 10, 2023
@Aaron0927
Copy link

Maybe you can try this solution https://developer.apple.com/documentation/xcode-release-notes/xcode-15-release-notes

Binaries using symbols with a weak definition crash at runtime on iOS 14/macOS 12 or older. This impacts primarily C++ projects due to their extensive use of weak symbols. (114813650) (FB13097713)
Workaround: Bump the minimum deployment target to iOS 15, macOS 12, watchOS 8 or tvOS 15, or add -Wl,-ld_classic to the OTHER_LDFLAGS build setting.
Weak symbol imports are linked as non-weak imports, when used from LTO object files. (115521975) (FB13171424)
Workaround: Add -Wl,-weak_reference_mismatches,weak or -Wl,-ld_classic options to the OTHER_LDFLAGS build setting.

I add -Wl,-ld_classic options to the OTHER_LDFLAGS build setting, and it works! thank you.

this resolve my problem

@EkkoG
Copy link

EkkoG commented Nov 24, 2023

https://developer.apple.com/documentation/xcode-release-notes/xcode-15_1-release-notes#Linking

Xcode 15.1 should fixed the problem, no need add link flag.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants