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. #695

Closed
iamshaunwu opened this issue Mar 15, 2022 · 35 comments · Fixed by #696

Comments

@iamshaunwu
Copy link

Hi, encountered this while compiling app on the just released Xcode 13.3. No issues when compiling on 13.2.1. Appreciate if some light can be shed. 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')
@Vakil-Parth
Copy link

+1

15 similar comments
@vothanhduymy
Copy link

+1

@changleibox
Copy link

+1

@Tpow99
Copy link

Tpow99 commented Mar 16, 2022

+1

@kekko7072
Copy link

+1

@Mocaris
Copy link

Mocaris commented Mar 16, 2022

+1

@siddharthghedia
Copy link

+1

@abdulla-allaith
Copy link

+1

@kanczler
Copy link

+1

@robertocorrales
Copy link

+1

@CS-Vlad
Copy link

CS-Vlad commented Mar 16, 2022

+1

@kketanssharma
Copy link

+1

@JoshJuncker
Copy link

+1

@justkawal
Copy link

+1

@jayhsugo
Copy link

+1

@hemantshrm
Copy link

hemantshrm commented Mar 17, 2022

+1

@miguelpruivo
Copy link

@zhangao0086 this should be top priority.

@DimkaSF
Copy link

DimkaSF commented Mar 17, 2022

+1

4 similar comments
@RishabhHelpwise
Copy link

+1

@dhuma1981
Copy link

+1

@phanbaohuy96
Copy link

+1

@2kjm
Copy link

2kjm commented Mar 17, 2022

+1

@cpc6128
Copy link

cpc6128 commented Mar 17, 2022

+2 :-)

@FBisca
Copy link

FBisca commented Mar 17, 2022

+1

5 similar comments
@YDA93
Copy link

YDA93 commented Mar 17, 2022

+1

@hedbladucf
Copy link

+1

@kungpotato
Copy link

+1

@xkeyC
Copy link

xkeyC commented Mar 18, 2022

+1

@liseykin-ivan
Copy link

+1

@jmilillo
Copy link

The issue seems to be caused by the use of UI_USER_INTERFACE_IDIOM() in both DKPopoverViewController and DKAssetGroupGridLayout.

I was able to archive by removing these lines, but of course that leaves iPad in an undesirable state. We will have to come up with an alternative.

I would not expect a fix from @zhangao0086 as he does not seem interested in maintaining this project

@miguelpruivo
Copy link

A fixed is already provided with #696. @zhangao0086 please merge it as soon as possible and deploy to the pods.

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'

@miguelpruivo
Copy link

miguelpruivo commented Mar 21, 2022

@zhangao0086 please, update the Pods with this fix.

1 similar comment
@kketanssharma
Copy link

@zhangao0086 please, update the Pods with this fix.

@msangals
Copy link

@zhangao0086 could you please update the pod

@CalHoll
Copy link

CalHoll commented Mar 23, 2022

UPDATED - The full work around can be found here: miguelpruivo/flutter_file_picker#999 (comment)

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