zhangao0086 / DKImagePickerController

Image Picker Controller for iOS written in Swift 4 & 5.
MIT License
1.5k stars 473 forks source link

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

Closed iamshaunwu closed 2 years ago

iamshaunwu commented 2 years ago

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 commented 2 years ago

+1

vothanhduymy commented 2 years ago

+1

changleibox commented 2 years ago

+1

Tpow99 commented 2 years ago

+1

kekko7072 commented 2 years ago

+1

Mocaris commented 2 years ago

+1

siddharthghedia commented 2 years ago

+1

abdulla-allaith commented 2 years ago

+1

kanczler commented 2 years ago

+1

robertocorrales commented 2 years ago

+1

CS-Vlad commented 2 years ago

+1

kketanssharma commented 2 years ago

+1

JoshJuncker commented 2 years ago

+1

justkawal commented 2 years ago

+1

jayhsugo commented 2 years ago

+1

hemantshrm commented 2 years ago

+1

miguelpruivo commented 2 years ago

@zhangao0086 this should be top priority.

DimkaSF commented 2 years ago

+1

RishabhHelpwise commented 2 years ago

+1

dhuma1981 commented 2 years ago

+1

phanbaohuy96 commented 2 years ago

+1

2kjm commented 2 years ago

+1

cpc6128 commented 2 years ago

+2 :-)

FBisca commented 2 years ago

+1

YDA93 commented 2 years ago

+1

hedbladucf commented 2 years ago

+1

kungpotato commented 2 years ago

+1

xkeyC commented 2 years ago

+1

liseykin-ivan commented 2 years ago

+1

jmilillo commented 2 years ago

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 commented 2 years ago

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 commented 2 years ago

@zhangao0086 please, update the Pods with this fix.

kketanssharma commented 2 years ago

@zhangao0086 please, update the Pods with this fix.

msangals commented 2 years ago

@zhangao0086 could you please update the pod

CalHoll commented 2 years ago

UPDATED - The full work around can be found here: https://github.com/miguelpruivo/flutter_file_picker/issues/999#issuecomment-1075160814