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 16 Beta build crashes during ScanDependencies for ImageCropPicker.m #2078

Open
hkilaru opened this issue Aug 1, 2024 · 3 comments

Comments

@hkilaru
Copy link

hkilaru commented Aug 1, 2024

Description

Xcode 16 beta build process crashes due to RNImageCropPicker.

The following build commands failed:
ScanDependencies .../ios/build/Pods.build/Debug-iphonesimulator/RNImageCropPicker.build/Objects-normal/arm64/ImageCropPicker.o /node_modules/react-native-image-crop-picker/ios/src/ImageCropPicker.m normal arm64 objective-c com.apple.compilers.llvm.clang.1_0.compiler (in target 'RNImageCropPicker' from project 'Pods')

Detailed Xcode crash logs below [1]

How to repeat issue and example

  • Build app from Xcode 16 beta (confirmed it exists on Xcode 16 beta 3 and 4)
    Note: works fine on latest stable Xcode 15.4.

Solution

Not solved

Versions

  • package.json: 0.41.2
  • pods: 0.39.0
  • React Native version: 0.72.0
  • Platform: iOS
  • Development Operating System: MacOS
  • Dev tools: Xcode 16 Beta 3

[1]

-------------------------------------
Translated Report (Full Report Below)
-------------------------------------

Process:               XCBBuildService [82544]
Path:                  /Applications/Xcode-beta.app/Contents/SharedFrameworks/XCBuild.framework/Versions/A/PlugIns/XCBBuildService.bundle/Contents/MacOS/XCBBuildService
Identifier:            com.apple.dt.XCBBuildService
Version:               1.0 (23000.0.234)
Build Info:            XCBuild-23000000234000000~42 (16A5202i)
Code Type:             ARM-64 (Native)
Parent Process:        Xcode [75914]
Responsible:           Xcode [75914]
User ID:               501

Date/Time:             2024-07-31 12:27:28.1017 -0400
OS Version:            macOS 14.5 (23F79)
Report Version:        12
Anonymous UUID:        7575C1AA-A52C-8EC3-09A3-5C86BA7AFC7C

Sleep/Wake UUID:       BDFE5220-D47B-4AEF-B51E-0794B1298979

Time Awake Since Boot: 26000 seconds
Time Since Wake:       10205 seconds

System Integrity Protection: enabled

Crashed Thread:        11

Exception Type:        EXC_CRASH (SIGABRT)
Exception Codes:       0x0000000000000000, 0x0000000000000000

Termination Reason:    Namespace SIGNAL, Code 6 Abort trap: 6
Terminating Process:   XCBBuildService [82544]

Thread 11 Crashed:
0   libsystem_kernel.dylib        	       0x18662aa60 __pthread_kill + 8
1   libsystem_pthread.dylib       	       0x186662c20 pthread_kill + 288
2   libsystem_c.dylib             	       0x18656fac4 __abort + 136
3   libsystem_c.dylib             	       0x18656fa3c abort + 192
4   libclang.dylib                	       0x3003db968 aborting_fatal_error_handler(void*, char const*, bool) + 44
5   libclang.dylib                	       0x302d74ff4 llvm::report_fatal_error(llvm::Twine const&, bool) + 280
6   libclang.dylib                	       0x302d9f644 report_size_overflow(unsigned long, unsigned long) + 180
7   libclang.dylib                	       0x302d9f420 llvm::SmallVectorBase<unsigned int>::grow_pod(void*, unsigned long, unsigned long) + 288
8   libclang.dylib                	       0x300ae2aac clang::scanSourceForDependencyDirectives(llvm::StringRef, llvm::SmallVectorImpl<clang::dependency_directives_scan::Token>&, llvm::SmallVectorImpl<clang::dependency_directives_scan::Directive>&, clang::DiagnosticsEngine*, clang::SourceLocation) + 3596
9   libclang.dylib                	       0x300845184 clang::tooling::dependencies::DependencyScanningWorkerFilesystem::ensureDirectiveTokensArePopulated(clang::tooling::dependencies::EntryRef) + 180
10  libclang.dylib                	       0x30084e634 std::__1::__function::__func<(anonymous namespace)::DependencyScanningAction::runInvocation(std::__1::shared_ptr<clang::CompilerInvocation>, clang::FileManager*, std::__1::shared_ptr<clang::PCHContainerOperations>, clang::DiagnosticConsumer*)::'lambda'(clang::FileEntryRef), std::__1::allocator<(anonymous namespace)::DependencyScanningAction::runInvocation(std::__1::shared_ptr<clang::CompilerInvocation>, clang::FileManager*, std::__1::shared_ptr<clang::PCHContainerOperations>, clang::DiagnosticConsumer*)::'lambda'(clang::FileEntryRef)>, std::__1::optional<llvm::ArrayRef<clang::dependency_directives_scan::Directive>> (clang::FileEntryRef)>::operator()(clang::FileEntryRef&&) + 112
11  libclang.dylib                	       0x300b32b78 clang::Preprocessor::EnterSourceFile(clang::FileID, clang::detail::SearchDirIteratorImpl<true>, clang::SourceLocation, bool) + 360
12  libclang.dylib                	       0x300b2b1b4 clang::Preprocessor::HandleHeaderIncludeOrImport(clang::SourceLocation, clang::Token&, clang::Token&, clang::SourceLocation, clang::detail::SearchDirIteratorImpl<true>, clang::FileEntry const*) + 2908
13  libclang.dylib                	       0x300b270f4 clang::Preprocessor::HandleIncludeDirective(clang::SourceLocation, clang::Token&, clang::detail::SearchDirIteratorImpl<true>, clang::FileEntry const*) + 172
14  libclang.dylib                	       0x300b2912c clang::Preprocessor::HandleImportDirective(clang::SourceLocation, clang::Token&) + 44
15  libclang.dylib                	       0x300b27968 clang::Preprocessor::HandleDirective(clang::Token&) + 1652
16  libclang.dylib                	       0x300b56384 clang::Preprocessor::Lex(clang::Token&) + 1480
17  libclang.dylib                	       0x300a59e40 clang::ReadPCHAndPreprocessAction::ExecuteAction() + 52
18  libclang.dylib                	       0x300a54dd0 clang::FrontendAction::Execute() + 60
19  libclang.dylib                	       0x3009cf1e8 clang::CompilerInstance::ExecuteAction(clang::FrontendAction&) + 268
20  libclang.dylib                	       0x30084a830 (anonymous namespace)::DependencyScanningAction::runInvocation(std::__1::shared_ptr<clang::CompilerInvocation>, clang::FileManager*, std::__1::shared_ptr<clang::PCHContainerOperations>, clang::DiagnosticConsumer*) + 1332
21  libclang.dylib                	       0x3013497b4 clang::tooling::ToolInvocation::run() + 428
22  libclang.dylib                	       0x300850440 clang::tooling::dependencies::DependencyScanningWorker::computeDependencies(llvm::StringRef, std::__1::vector<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char>>, std::__1::allocator<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char>>>> const&, clang::tooling::dependencies::DependencyConsumer&, clang::tooling::dependencies::DependencyActionController&, clang::DiagnosticConsumer&, std::__1::optional<llvm::StringRef>)::$_1::operator()(clang::driver::Command const&) const + 448
23  libclang.dylib                	       0x300849f6c forEachDriverJob(llvm::ArrayRef<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char>>>, clang::DiagnosticsEngine&, clang::FileManager&, llvm::function_ref<bool (clang::driver::Command const&)>) + 436
24  libclang.dylib                	       0x3008495bc clang::tooling::dependencies::DependencyScanningWorker::computeDependencies(llvm::StringRef, std::__1::vector<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char>>, std::__1::allocator<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char>>>> const&, clang::tooling::dependencies::DependencyConsumer&, clang::tooling::dependencies::DependencyActionController&, clang::DiagnosticConsumer&, std::__1::optional<llvm::StringRef>) + 616
25  libclang.dylib                	       0x300337054 getFileDependencies(CXOpaqueDependencyScannerWorker*, int, char const* const*, char const*, void (*)(void*, CXModuleDependencySet*), void*, CXString*, clang::DiagnosticConsumer*, llvm::function_ref<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char>> (clang::tooling::dependencies::ModuleID const&, clang::tooling::dependencies::ModuleOutputKind)>, std::__1::optional<llvm::StringRef>, llvm::function_ref<void (clang::tooling::dependencies::TranslationUnitDeps)>) + 624
26  libclang.dylib                	       0x300337e74 clang_experimental_DependencyScannerWorker_getDepGraph + 524
27  XCBCSupport                   	       0x100971784 libclang_scanner_scan_dependencies + 304
28  XCBCore                       	       0x10237f684 DependencyScanner.scanDependencies(commandLine:workingDirectory:lookupOutput:modulesCallback:) + 864
29  XCBTaskExecution              	       0x1019588b4 ClangModuleDependencyGraph.scanModuleDependencies(libclangPath:scanningOutputPath:usesCompilerLauncher:usesSerializedDiagnostics:fileCommandLine:workingDirectory:casOptions:cacheFallbackIfNotAvailable:verifyingModule:outputPath:reportRequiredTargetDependencies:fileSystem:) + 904
30  XCBTaskExecution              	       0x1019a436c ClangScanTaskAction.performTaskAction(_:dynamicExecutionDelegate:executionDelegate:clientDelegate:outputDelegate:) + 1096
31  XCBBuildSystem                	       0x100c5daa1 InProcessCommand.execute(_:_:_:) + 1
32  XCBBuildSystem                	       0x100c5d765 closure #1 in InProcessCommand.execute(_:_:_:) + 1
33  XCBBuildSystem                	       0x100c5bb89 partial apply for closure #1 in InProcessCommand.execute(_:_:_:) + 1
34  XCBUtil                       	       0x10073cc01 partial apply for closure #1 in AsyncStreamController<>.init(priority:_:) + 1
35  XCBUtil                       	       0x10073cc01 partial apply for closure #1 in AsyncStreamController<>.init(priority:_:) + 1
36  XCBUtil                       	       0x100760a75 static Result<>.catching(_:) + 1
37  XCBUtil                       	       0x10076f5e9 closure #2 in runAsyncAndBlock<A>(_:) + 1
38  XCBUtil                       	       0x10073cc01 partial apply for closure #1 in AsyncStreamController<>.init(priority:_:) + 1
39  XCBUtil                       	       0x10074cccd $sxIeAghHr_xs5Error_pIeghHrzo_s8SendableRzlTRTQ0_ + 1
40  XCBUtil                       	       0x10073d975 closure #1 in AsyncStreamController<>.init(priority:_:) + 1
41  libswift_Concurrency.dylib    	       0x24e7d70f9 completeTaskWithClosure(swift::AsyncContext*, swift::SwiftError*) + 1

@marcshilling
Copy link

marcshilling commented Aug 13, 2024

I believe I'm having this issue too. For me, the error surfaces in Xcode as unexpected service error: The Xcode build system has crashed. Build again to continue., but from looking at the build logs this is happening during the Compile QBImagePickerController.m build step of Build target RNImageCropPicker.

This has been an issue since Xcode 16 Beta 1. I can confirm it's still happening in Beta 5, as well as in Xcode 16.1 Beta 1.

Edit: I saw there was a new release that claims to fix Xcode 16 issues...I can confirm upgrading to that resolves my crash! ✅

@1Jesper1
Copy link

I needed to manually update TOCropViewController to 2.7.4 in Podfile.lock when installing react-native-image-crop-picker v0.41.2.

@quinnstonchurchill
Copy link

Ran into this issue on the non beta Xcode 16 release and was able to fix it by upgrading react-native-image-crop-picker to 0.41.2 and manually updating TOCropViewController to 2.7.4 in Podfile.lock

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

No branches or pull requests

4 participants