2

I'm getting "Swift Compiler Error: Command failed due to signal: Bus error: 10" and not able to execute any project. Getting this issue from today, earlier everything was working fine.

This is a part of the error:

0  swift                    0x0000000110def4f7 PrintStackTraceSignalHandler(void*) + 39
1  swift                    0x0000000110dee9a6 SignalHandler(int) + 646
2  libsystem_platform.dylib 0x00007fffe21a7b3a _sigtramp + 26
3  swift                    0x000000011171ae36 cmark_strbuf__initbuf + 49482
4  swift                    0x0000000110dc2b77 (anonymous namespace)::RawMemoryObject::readBytes(unsigned char*, unsigned long long, unsigned long long) const + 55
5  swift                    0x000000010e85378f llvm::SimpleBitstreamCursor::Read(unsigned int) + 143
6  swift                    0x0000000110bab2da llvm::BitstreamCursor::readRecord(unsigned int, llvm::SmallVectorImpl<unsigned long long>&, llvm::StringRef*) + 1754
7  swift                    0x000000010e87518b swift::ModuleFile::ModuleFile(std::__1::unique_ptr<llvm::MemoryBuffer, std::__1::default_delete<llvm::MemoryBuffer> >, std::__1::unique_ptr<llvm::MemoryBuffer, std::__1::default_delete<llvm::MemoryBuffer> >, bool, swift::serialization::ValidationInfo&, swift::serialization::ExtendedValidationInfo*) + 6475
8  swift                    0x000000010e8d5847 swift::SerializedModuleLoader::loadAST(swift::ModuleDecl&, llvm::Optional<swift::SourceLoc>, std::__1::unique_ptr<llvm::MemoryBuffer, std::__1::default_delete<llvm::MemoryBuffer> >, std::__1::unique_ptr<llvm::MemoryBuffer, std::__1::default_delete<llvm::MemoryBuffer> >, bool) + 359
9  swift                    0x000000010e8d3eb5 swift::SerializedModuleLoader::loadModule(swift::SourceLoc, llvm::ArrayRef<std::__1::pair<swift::Identifier, swift::SourceLoc> >) + 517
10 swift                    0x000000010ebb57f3 swift::ASTContext::getModule(llvm::ArrayRef<std::__1::pair<swift::Identifier, swift::SourceLoc> >) + 243
11 swift                    0x000000010e7c92f2 swift::CompilerInstance::performSema() + 2530
12 swift                    0x000000010dc06e3d swift::performFrontend(llvm::ArrayRef<char const*>, char const*, void*, swift::FrontendObserver*) + 15949
13 swift                    0x000000010dbbcd6c main + 9052
14 libdyld.dylib            0x00007fffe1f98235 start + 1
15 libdyld.dylib            0x000000000000007e start + 503742026

Please help

Thanks in Advance,

Paul Floyd
  • 5,530
  • 5
  • 29
  • 43
Kalpesh
  • 65
  • 2
  • 10

3 Answers3

1

Did you try to remove your all projects Derived data folders, in your case, it'll here: /Users/User_Name/Library/Developer/Xcode/DerivedData/. remove all project's folder [No worries, it's safe] and do a Product > Clean your projects from Xcode menu.

Abdelahad Darwish
  • 5,969
  • 1
  • 17
  • 35
0

As per apple

Type 1 error (Bus Error): -

One of the most common indications of a memory-related error. It means that you tried to access an non-existent/inaccessible memory address.

Common causes and solutions: - Init/Extension or Control Panel conflict. insufficient memory for the operation being attempted, you could try allotting more memory to the application.

Chetan
  • 881
  • 14
  • 22
  • I'm getting this error for all applications, As per this answer i also tried restarting my device. https://stackoverflow.com/questions/25973979/swift-compiler-error-on-xcode-6 – Kalpesh Aug 21 '17 at 09:37
0

Re-installing Xcode worked for me

Kalpesh
  • 65
  • 2
  • 10