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

Xcode 13.3 - Error (Xcode): Segmentation fault: 11 Encountered error while archiving for device. #999

Closed
iamshaunwu opened this issue Mar 15, 2022 · 46 comments
Labels
iOS Issue applies to iOS platform on hold

Comments

@iamshaunwu
Copy link

Hi, after upgrading to Xcode 13.3 and iOS 15.4,

  • no issues encountered while debugging app on iPhone.
  • no issues building Android appbundle
  • however, encountered the below when building iOS app flutter build ipa --obfuscate --split-debug-info=debug-info
  • have tried pod deintegrate && rm Podfile.lock && pod install> flutter clean > rm -rf ~/Library/Developer/Xcode/DerivedData then rebuild, same issue encountered.
  • I tried disabling file_picker in pubspec.yaml, Xcode was able to build archive successfully.

Appreciate if some light can be shed on this issue. Thanks!

SwiftCodeGeneration normal arm64 (in target 'DKImagePickerController' from project 'Pods')
    cd /Users/myname/Projects/apps/my_app_name/ios/Pods
    /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/swift-frontend -frontend -c -primary-file /Users/myname/Library/Developer/Xcode/DerivedData/Runner-faokyziihkhtwugbkjwfnzeicqgb/Build/Intermediates.noindex/ArchiveIntermediates/Runner/IntermediateBuildFilesPath/Pods.build/Release-iphoneos/DKImagePickerController.build/Objects-normal/arm64/DKPopoverViewController.bc -embed-bitcode -target arm64-apple-ios12.0 -Xllvm -aarch64-use-tbi -O -disable-llvm-optzns -module-name DKImagePickerController -o /Users/myname/Library/Developer/Xcode/DerivedData/Runner-faokyziihkhtwugbkjwfnzeicqgb/Build/Intermediates.noindex/ArchiveIntermediates/Runner/IntermediateBuildFilesPath/Pods.build/Release-iphoneos/DKImagePickerController.build/Objects-normal/arm64/DKPopoverViewController.o

Please submit a bug report (https://swift.org/contributing/#reporting-bugs) and include the project and the crash backtrace.
Stack dump:
0.	Program arguments: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/swift-frontend -frontend -c -primary-file /Users/myname/Library/Developer/Xcode/DerivedData/Runner-faokyziihkhtwugbkjwfnzeicqgb/Build/Intermediates.noindex/ArchiveIntermediates/Runner/IntermediateBuildFilesPath/Pods.build/Release-iphoneos/DKImagePickerController.build/Objects-normal/arm64/DKPopoverViewController.bc -embed-bitcode -target arm64-apple-ios12.0 -Xllvm -aarch64-use-tbi -O -disable-llvm-optzns -module-name DKImagePickerController -o /Users/myname/Library/Developer/Xcode/DerivedData/Runner-faokyziihkhtwugbkjwfnzeicqgb/Build/Intermediates.noindex/ArchiveIntermediates/Runner/IntermediateBuildFilesPath/Pods.build/Release-iphoneos/DKImagePickerController.build/Objects-normal/arm64/DKPopoverViewController.o
1.	Apple Swift version 5.6 (swiftlang-5.6.0.323.62 clang-1316.0.20.8)
2.	Compiling with the current language version
3.	Running pass 'Function Pass Manager' on module '/Users/myname/Library/Developer/Xcode/DerivedData/Runner-faokyziihkhtwugbkjwfnzeicqgb/Build/Intermediates.noindex/ArchiveIntermediates/Runner/IntermediateBuildFilesPath/Pods.build/Release-iphoneos/DKImagePickerController.build/Objects-normal/arm64/DKPopoverViewController.bc'.
4.	Running pass 'ObjC ARC contraction' on function '@UI_USER_INTERFACE_IDIOM'
Stack dump without symbol names (ensure you have llvm-symbolizer in your PATH or set the environment var `LLVM_SYMBOLIZER_PATH` to point to it):
0  swift-frontend           0x000000010503ef88 llvm::sys::PrintStackTrace(llvm::raw_ostream&, int) + 56
1  swift-frontend           0x000000010503df9c llvm::sys::RunSignalHandlers() + 112
2  swift-frontend           0x000000010503f618 SignalHandler(int) + 344
3  libsystem_platform.dylib 0x000000019e6914c4 _sigtramp + 56
4  swift-frontend           0x0000000102fbce8c llvm::objcarc::BundledRetainClaimRVs::insertRVCallWithColors(llvm::Instruction*, llvm::CallBase*, llvm::DenseMap<llvm::BasicBlock*, llvm::TinyPtrVector<llvm::BasicBlock*>, llvm::DenseMapInfo<llvm::BasicBlock*>, llvm::detail::DenseMapPair<llvm::BasicBlock*, llvm::TinyPtrVector<llvm::BasicBlock*> > > const&) + 64
5  swift-frontend           0x0000000102fcd878 (anonymous namespace)::ObjCARCContract::run(llvm::Function&, llvm::AAResults*, llvm::DominatorTree*) + 1024
6  swift-frontend           0x0000000104db2e24 llvm::FPPassManager::runOnFunction(llvm::Function&) + 1292
7  swift-frontend           0x0000000104db938c llvm::FPPassManager::runOnModule(llvm::Module&) + 60
8  swift-frontend           0x0000000104db35a8 llvm::legacy::PassManagerImpl::run(llvm::Module&) + 1088
9  swift-frontend           0x0000000100d7eee8 swift::performLLVMOptimizations(swift::IRGenOptions const&, llvm::Module*, llvm::TargetMachine*) + 3376
10 swift-frontend           0x0000000100d7fe28 swift::performLLVM(swift::IRGenOptions const&, swift::DiagnosticEngine&, llvm::sys::SmartMutex<false>*, llvm::GlobalVariable*, llvm::Module*, llvm::TargetMachine*, llvm::StringRef, swift::UnifiedStatsReporter*) + 2440
11 swift-frontend           0x0000000100d88364 swift::performLLVM(swift::IRGenOptions const&, swift::ASTContext&, llvm::Module*, llvm::StringRef) + 180
12 swift-frontend           0x00000001008e0ea0 swift::performFrontend(llvm::ArrayRef<char const*>, char const*, void*, swift::FrontendObserver*) + 6976
13 swift-frontend           0x00000001008a8130 swift::mainEntry(int, char const**) + 808
14 dyld                     0x00000001078a1088 start + 516
error: Segmentation fault: 11 (in target 'DKImagePickerController' from project 'Pods')
[✓] Flutter (Channel stable, 2.10.3, on macOS 12.3 21E230 darwin-arm, locale
    en-SG)
    • Flutter version 2.10.3 at /Users/myname/Projects/flutter
    • Upstream repository https://github.com/flutter/flutter.git
    • Framework revision 7e9793dee1 (13 days ago), 2022-03-02 11:23:12 -0600
    • Engine revision bd539267b4
    • Dart version 2.16.1
    • DevTools version 2.9.2

[✓] Android toolchain - develop for Android devices (Android SDK version 30.0.3)
    • Android SDK at /Users/myname/Library/Android/sdk
    • Platform android-31, build-tools 30.0.3
    • Java binary at: /Applications/Android Studio.app/Contents/jre/Contents/Home/bin/java
    • Java version OpenJDK Runtime Environment (build 11.0.11+0-b60-7772763)
    • All Android licenses accepted.

[✓] Xcode - develop for iOS and macOS (Xcode 13.3)
    • Xcode at /Applications/Xcode.app/Contents/Developer
    • CocoaPods version 1.11.2

[✓] Chrome - develop for the web
    • Chrome at /Applications/Google Chrome.app/Contents/MacOS/Google Chrome

[✓] Android Studio (version 2021.1)
    • Android Studio at /Applications/Android Studio.app/Contents
    • Flutter plugin can be installed from:
      🔨 https://plugins.jetbrains.com/plugin/9212-flutter
    • Dart plugin can be installed from:
      🔨 https://plugins.jetbrains.com/plugin/6351-dart
    • Java version OpenJDK Runtime Environment (build 11.0.11+0-b60-7772763)

[✓] VS Code (version 1.65.2)
    • VS Code at /Applications/Visual Studio Code.app/Contents
    • Flutter extension version 3.36.0

[✓] Connected device (2 available)
    • myiPhone (mobile) • 00008110-001938481E04801E • ios            • iOS 15.4 19E241
    • Chrome (web)     • chrome                    • web-javascript • Google Chrome 99.0.4844.51

[✓] HTTP Host Availability
    • All required HTTP hosts are available
@iamshaunwu iamshaunwu added the new issue An issue that hasn't yet been seen from the maintainer label Mar 15, 2022
@iamshaunwu
Copy link
Author

iamshaunwu commented Mar 15, 2022

Reference to #966 I also raised the issue at zhangao0086/DKImagePickerController#695.

Not sure if repo maintenance is still active there but in the meantime, I will fall back to 13.2.1 when compiling.

@Tpow99
Copy link

Tpow99 commented Mar 15, 2022

Also having this issue.

@xellDart
Copy link

xellDart commented Mar 16, 2022

Same issue after update to new Xcode version

@Vakil-Parth
Copy link

+1

@samuelchanx
Copy link

samuelchanx commented Mar 16, 2022

https://developer.apple.com/download/all/?q=xcode
In case any of you needed, here's where you can download older version of XCode. Reverting to older version of XCode 13.2.1 works fine for me too.

@abdulla-allaith
Copy link

+1

2 similar comments
@vothanhduymy
Copy link

+1

@tranice
Copy link

tranice commented Mar 16, 2022

+1

@miguelpruivo
Copy link
Owner

Blocked by #695. You can upvote there since this is a dependency of file_picker.

@miguelpruivo miguelpruivo added on hold iOS Issue applies to iOS platform and removed new issue An issue that hasn't yet been seen from the maintainer labels Mar 16, 2022
@Mocaris
Copy link

Mocaris commented Mar 16, 2022

+1

1 similar comment
@dmitry-kotorov
Copy link

+1

@FernandoUFS
Copy link

+1

2 similar comments
@changleibox
Copy link

+1

@hemantshrm
Copy link

+1

@miguelpruivo
Copy link
Owner

Please, upvote on the #695 since this plugin directly depends on it for some iOS features.

@BatuhanGnday
Copy link

+1

3 similar comments
@narendra02031997
Copy link

+1

@szastavnyy
Copy link

+1

@FBisca
Copy link

FBisca commented Mar 17, 2022

+1

@phanbaohuy96
Copy link

phanbaohuy96 commented Mar 17, 2022

+1
any update for this?

@narendra02031997
Copy link

I think till now don't have any update so i decide to keep Xcode 13.3 and Xcode 13.0 both. Build archive from Xcode 13.0 problem will solve.

@armandojimenez
Copy link

Any update for this?

@xiaomaxuetu
Copy link

+1

1 similar comment
@MarnoDev
Copy link

+1

@miguelpruivo
Copy link
Owner

miguelpruivo commented Mar 18, 2022

This will be fixed as soon as #695 is fixed. Sorry for any inconvenience.

@miguelpruivo
Copy link
Owner

I'll try to fix this my own since the maintainer of the dependency (DKImagePickerController) is taking a while. I'll keep you updated. Might have to point the podspec to a fix fork until is merged into the official repo.

@miguelpruivo
Copy link
Owner

miguelpruivo commented Mar 18, 2022

EDIT: It's now published on the pods repo. Just run a pod repo update inside your project's /ios folder and you should be good.


It's fixed and I already provided with #696 to the official repo.

As of now, you can use the workaround to point directly to the repo with the fix on your Podfile:

pod 'DKImagePickerController/PhotoGallery', :git => 'https://github.com/miguelpruivo/DKImagePickerController.git'

After that, don't forget to

cd ios && rm Podfile.lock && rm -rf Pods && pod install

@iamshaunwu
Copy link
Author

Thanks boss!

@Wackymax
Copy link

zhangao0086/DKImagePickerController#696 has been closed and merged into develop

@AbMuneeb
Copy link

When a new update of file_picker will be available on pub.dev with these changes

@Bingbing0311
Copy link

+1 ,thank you

@CalHoll
Copy link

CalHoll commented Mar 21, 2022

+1 this one tortured me for some time

@theatulverma1
Copy link

+1 One of my app feature is on hold due to this issue. Please let us know when the update is coming?

@gabrielginter
Copy link

gabrielginter commented Mar 21, 2022

for those blocked by this issue.... you could install xcode 13.2.1 in parallel to 13.3 and archive without issue. That's what I've been doing. You can find the official download page here https://developer.apple.com/download/all/?q=Xcode

I hope it helps

@rvndsngwn
Copy link

App update delay due to this issue.

@miguelpruivo
Copy link
Owner

miguelpruivo commented Mar 21, 2022

@rvndsngwn you can use the temporary workaround.

The owner of the DKImagePickerController will have to publish the updated Pod, merging only isn't enough. When it's done, you shouldn't require anything else other than a pod repo update.

@alihassan143
Copy link

@rvndsngwn you can use the temporary workaround.

The owner of the DKImagePickerController will have to publish the updated Pod, merging only isn't enough. When it's done, you shouldn't require anything else other than a pod repo update.

not working

@msangals
Copy link

+1

@Theunodb
Copy link

PS.
You need to add this to your iOs project's podfile inside the target 'Runner' do :

target 'Runner' do
  use_frameworks!
  use_modular_headers!

  flutter_install_all_ios_pods File.dirname(File.realpath(__FILE__))

  pod 'FirebaseFirestore', :git => 'https://github.com/invertase/firestore-ios-sdk-frameworks.git', :tag => '8.11.0'
  pod 'DKImagePickerController/PhotoGallery', :git => 'https://github.com/miguelpruivo/DKImagePickerController.git'
end

@ForceGT
Copy link

ForceGT commented Mar 23, 2022

I'm seeing the following issue in my terminal, any leads?

[!] The following Swift pods cannot yet be integrated as static libraries:

The Swift pod `DKPhotoGallery-library` depends upon `SDWebImage-library`, which does not define modules. To opt into those targets generating module maps (which is necessary to import them from Swift when building as static libraries), you may set `use_modular_headers!` globally in your Podfile, or specify `:modular_headers => true` for particular dependencies.

@ForceGT
Copy link

ForceGT commented Mar 23, 2022

Got the fix finally, make sure you add the line pod 'DKImagePickerController/PhotoGallery', :git => 'https://github.com/miguelpruivo/DKImagePickerController.git' after the use_modular_headers! line so that the settings apply for this pod as well

I'm seeing the following issue in my terminal, any leads?

[!] The following Swift pods cannot yet be integrated as static libraries:

The Swift pod `DKPhotoGallery-library` depends upon `SDWebImage-library`, which does not define modules. To opt into those targets generating module maps (which is necessary to import them from Swift when building as static libraries), you may set `use_modular_headers!` globally in your Podfile, or specify `:modular_headers => true` for particular dependencies.

@alihassan143
Copy link

PS. You need to add this to your iOs project's podfile inside the target 'Runner' do :

target 'Runner' do
  use_frameworks!
  use_modular_headers!

  flutter_install_all_ios_pods File.dirname(File.realpath(__FILE__))

  pod 'FirebaseFirestore', :git => 'https://github.com/invertase/firestore-ios-sdk-frameworks.git', :tag => '8.11.0'
  pod 'DKImagePickerController/PhotoGallery', :git => 'https://github.com/miguelpruivo/DKImagePickerController.git'
end

this method is working fine now i can successfully create the archive for ios and publish my app

@osamamohammed98
Copy link

osamamohammed98 commented Mar 24, 2022

this solve proplem with xcode 13.3

pod 'DKImagePickerController/PhotoGallery', :git => 'https://github.com/miguelpruivo/DKImagePickerController.git'

set it on your pod file and do pod update | pod install then make ipa it will work inshallah

@gabrielginter
Copy link

It seems the pod package DKImagePickerController has been updated to 4.3.3 (was 4.3.2), running pod update inside "ios" folder will update this package to the latest version.

After doing this I was able to archive my app on XCode 13.3 successfully. No extra change needed on your pod file.

@miguelpruivo
Copy link
Owner

So this is now fixed. I'm closing this. 🎉

@akrambak
Copy link

akrambak commented Apr 8, 2022

EDIT: It's now published on the pods repo. Just run a pod repo update inside your project's /ios folder and you should be good.

It's fixed and I already provided with #696 to the official repo.

As of now, you can use the workaround to point directly to the repo with the fix on your Podfile:

pod 'DKImagePickerController/PhotoGallery', :git => 'https://github.com/miguelpruivo/DKImagePickerController.git'

After that, don't forget to

cd ios && rm Podfile.lock && rm -rf Pods && pod install

THKS

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
iOS Issue applies to iOS platform on hold
Projects
None yet
Development

No branches or pull requests