Skip to content
This repository has been archived by the owner on Dec 14, 2023. It is now read-only.

Segmentation fault when built with Xcode 13.3 #159

Closed
nikoTM opened this issue Mar 17, 2022 · 3 comments
Closed

Segmentation fault when built with Xcode 13.3 #159

nikoTM opened this issue Mar 17, 2022 · 3 comments

Comments

@nikoTM
Copy link

nikoTM commented Mar 17, 2022

Showing Recent Messages
SwiftCodeGeneration normal arm64 (in target 'DKImagePickerController' from project 'Pods')
    cd /Users/.../.../platforms/ios/Pods
    /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/swift-frontend -frontend -c -primary-file /Users/.../Library/Developer/Xcode/DerivedData/.../Build/Intermediates.noindex/ArchiveIntermediates/.../IntermediateBuildFilesPath/Pods.build/Release-iphoneos/DKImagePickerController.build/Objects-normal/arm64/DKPopoverViewController.bc -embed-bitcode -target arm64-apple-ios9.0 -Xllvm -aarch64-use-tbi -O -disable-llvm-optzns -module-name DKImagePickerController -o /Users/.../Library/Developer/Xcode/DerivedData/.../Build/Intermediates.noindex/ArchiveIntermediates/.../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/.../Library/Developer/Xcode/DerivedData/.../Build/Intermediates.noindex/ArchiveIntermediates/.../IntermediateBuildFilesPath/Pods.build/Release-iphoneos/DKImagePickerController.build/Objects-normal/arm64/DKPopoverViewController.bc -embed-bitcode -target arm64-apple-ios9.0 -Xllvm -aarch64-use-tbi -O -disable-llvm-optzns -module-name DKImagePickerController -o /Users/.../Library/Developer/Xcode/DerivedData/.../Build/Intermediates.noindex/ArchiveIntermediates/.../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/.../Library/Developer/Xcode/DerivedData/.../Build/Intermediates.noindex/ArchiveIntermediates/.../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           0x0000000107222f88 llvm::sys::PrintStackTrace(llvm::raw_ostream&, int) + 56
1  swift-frontend           0x0000000107221f9c llvm::sys::RunSignalHandlers() + 112
2  swift-frontend           0x0000000107223618 SignalHandler(int) + 344
3  libsystem_platform.dylib 0x00000001be9a14c4 _sigtramp + 56
4  swift-frontend           0x00000001051a0e8c 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           0x00000001051b1878 (anonymous namespace)::ObjCARCContract::run(llvm::Function&, llvm::AAResults*, llvm::DominatorTree*) + 1024
6  swift-frontend           0x0000000106f96e24 llvm::FPPassManager::runOnFunction(llvm::Function&) + 1292
7  swift-frontend           0x0000000106f9d38c llvm::FPPassManager::runOnModule(llvm::Module&) + 60
8  swift-frontend           0x0000000106f975a8 llvm::legacy::PassManagerImpl::run(llvm::Module&) + 1088
9  swift-frontend           0x0000000102f62ee8 swift::performLLVMOptimizations(swift::IRGenOptions const&, llvm::Module*, llvm::TargetMachine*) + 3376
10 swift-frontend           0x0000000102f63e28 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           0x0000000102f6c364 swift::performLLVM(swift::IRGenOptions const&, swift::ASTContext&, llvm::Module*, llvm::StringRef) + 180
12 swift-frontend           0x0000000102ac4ea0 swift::performFrontend(llvm::ArrayRef<char const*>, char const*, void*, swift::FrontendObserver*) + 6976
13 swift-frontend           0x0000000102a8c130 swift::mainEntry(int, char const**) + 808
14 dyld                     0x0000000109b4d088 start + 516
error: Segmentation fault: 11 (in target 'DKImagePickerController' from project 'Pods')

Seems to be the case for other people as well flutter/flutter#100193

@nikoTM
Copy link
Author

nikoTM commented Mar 17, 2022

https://bugs.swift.org/browse/SR-15792
Possibly related

@bzeeman
Copy link

bzeeman commented Mar 17, 2022

I am not using your project, but updating to Xcode 13.3 I get Segmentation Fault 11 when archiving on an M1Max MacBook Pro, and Abort trap:6 with the same code on and Core i9 16" Intel MacBook Pro.

@nikoTM
Copy link
Author

nikoTM commented Apr 19, 2022

For anyone looking for a workaround, the cause was fixed here zhangao0086/DKImagePickerController@ded0926

Possible workarounds are either to manually change the files as in the commit above in your Pods within Xcode (after ns build), or add the following line to your Podfile so it pulls the correct version which is 4.3.3, because currently it pulls 4.3.2 (before ns build)

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

Thanks to the folks here (miguelpruivo/flutter_file_picker#999 (comment))

@nikoTM nikoTM closed this as completed Apr 19, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants