Create an account

Very important

  • To access the important data of the forums, you must be active in each forum and especially in the leaks and database leaks section, send data and after sending the data and activity, data and important content will be opened and visible for you.
  • You will only see chat messages from people who are at or below your level.
  • More than 500,000 database leaks and millions of account leaks are waiting for you, so access and view with more activity.
  • Many important data are inactive and inaccessible for you, so open them with activity. (This will be done automatically)


Thread Rating:
  • 255 Vote(s) - 3.53 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Command failed due to signal: Segmentation fault: 11

#21
I got segmentation fault on my Mac Mini using Xcode Bots. The seg fault did only occur during build step of testing and not during building or running locally. Only in Xcode bots during build step of testing.

I am using macOS Sierra and Xcode 8, with the code converted to Swift 2.3.

I finally found the line causing the seg fault, it was caused by:

public let isIpad = UIDevice.currentDevice().userInterfaceIdiom == .Pad

Which was declared outside a class as a constant. Changing it to check the userInterfaceIdiom at runtime fixed the issue.

Hopes this helps someone else!

This is the error log for my seg fault:

0 swift 0x000000010f93d76b llvm::sys::PrintStackTrace(llvm::raw_ostream&) + 43
1 swift 0x000000010f93ca56 llvm::sys::RunSignalHandlers() + 70
2 swift 0x000000010f93ddbf SignalHandler(int) + 287
3 libsystem_platform.dylib 0x00007fffb24aabba _sigtramp + 26
4 libsystem_platform.dylib 0x00007fbbfff49ae0 _sigtramp + 1302982464
5 swift 0x000000010db79996 (anonymous namespace)::Traversal::visit(swift::Expr*) + 118
6 swift 0x000000010db7b880 (anonymous namespace)::Traversal::visitApplyExpr(swift::ApplyExpr*) + 128
7 swift 0x000000010db799eb (anonymous namespace)::Traversal::visit(swift::Expr*) + 203
8 swift 0x000000010db78f45 swift::Expr::walk(swift::ASTWalker&) + 53
9 swift 0x000000010d6d2c87 walkForProfiling(swift::AbstractFunctionDecl*, swift::ASTWalker&) + 231
10 swift 0x000000010d6d2719 swift::Lowering::SILGenProfiling::assignRegionCounters(swift::AbstractFunctionDecl*) + 553
11 swift 0x000000010d6de348 (anonymous namespace)::SILGenType::emitType() + 952
12 swift 0x000000010d6ddf1e swift::Lowering::SILGenModule::visitNominalTypeDecl(swift::NominalTypeDecl*) + 30
13 swift 0x000000010d6625eb swift::Lowering::SILGenModule::emitSourceFile(swift::SourceFile*, unsigned int) + 731
14 swift 0x000000010d663139 swift::SILModule::constructSIL(swift::ModuleDecl*, swift::SILOptions&, swift::FileUnit*, llvm::Optional<unsigned int>, bool, bool) + 793
15 swift 0x000000010d6635a3 swift::performSILGeneration(swift::FileUnit&, swift::SILOptions&, llvm::Optional<unsigned int>, bool) + 115
16 swift 0x000000010d491c18 performCompile(swift::CompilerInstance&, swift::CompilerInvocation&, llvm::ArrayRef<char const*>, int&) + 12536
17 swift 0x000000010d48dc79 frontend_main(llvm::ArrayRef<char const*>, char const*, void*) + 2777
18 swift 0x000000010d489765 main + 1957
19 libdyld.dylib 0x00007fffb229e255 start + 1

Reply

#22
## Human Error report:
In my case, the culprit was **passing in an array in the place of a variadic parameter**. That is, for the signature:

// Note the variadic parameter
func addSubview(subview subview: UIView, constrain: NSLayoutAttribute...)


I passed in:

// Compile-time error, "constrain" parameters have array brackets
someUIView.addSubview(subview: someOtherView, constrain: [.Leading, .Top, .Bottom, .Trailing])


rather than:

// Correct
someUIView.addSubview(subview: someOtherView, constrain: .Leading, .Top, .Bottom, .Trailing)


Reply

#23
For me I was blocking the main thread.

What I did to Fix it with GCD (see below)

dispatch_async(dispatch_get_main_queue(),
})
Reply

#24
In my case it was caused by trying to use a function that returned an NSNumber as an argument where a Double was expected. My advice is be careful mixing Objective C objects with Swift datatypes. And as many others have suggested, comment out lines until you pinpoint which one causes the error. (Even if you create other errors when doing so, you can just ignore them and see what makes the segmentation fault error go away.)
Reply

#25
Any crash is a compiler bug (whether or not your code is valid). Try the latest beta and if it still crashes file a bug report at [bugs.swift.org][1]. The Swift team are very responsive on these.


[1]:

[To see links please register here]

Reply

#26
I had similar issue in with Xcode 7.3 and iOS 9.3.
**`Command failed due to signal: Segmentation fault: 11`**

[![Screenshot][1]][1]

Basic steps such as Clean (cmd+shift+k) code, Delete derived data and Quit Xcode didn't work.

**There was some culprit in my code.**

It was `[txtUserName.text.characters.count = 0]`

In your case **Review your code and fix the culprit.**


[1]:
Reply

#27
In my case I had declared the following property in one of my ViewControllers subclass:

@property NSString * title

I think this was conflicting with the already existing `title` property in `ViewController`. I renamed this property to something else and refactored its use and the error disappeared.
Reply

#28
I have experienced the same issue on my first try with [Realm.io][1]. The reason for the error was that I have named my target `Realm` and that caused namespace clashing. The issue was resolved after I have changed my project and target name into something else, as explained on [this issue][2].

My suggestion is to check for similar namespace clashes.


[1]:

[To see links please register here]

"Realm.io"
[2]:

[To see links please register here]

Reply

#29
I also ran into this problem.... obviously, it is a general error or sorts... when the xcode gets confused.... in my case, I had 3 vars that I was assigning values to from an array.... but I did not specify the type of data in each element of the array.... once I did, it resolved the problem....
Reply

#30
object.doubleValue = dict["doublevalue"] as! Int

I found the reason after rolling back each step I made.... force casting to Int for a Double variable
Reply



Forum Jump:


Users browsing this thread:
1 Guest(s)

©0Day  2016 - 2023 | All Rights Reserved.  Made with    for the community. Connected through