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

#11
[![enter image description here][1]][1]


[1]:


I have same problem so I tried switch Optimization Level to **Fast, Single-File Optimization[-O]** instead of **Fast, Whole Module Optimization** then it worked, built, archive to Appstore succeed.

Some frameworks we used that need to refactor to adapt with **Fast, Whole Module Optimization** level I think.
But I still did not find those framework.
Reply

#12
I had exactly the same issue, and after many hours of debugging, I found out it was because I was accessing a subscript by using .subscript() instead of between []. XCode thinks this is perfectly valid, but gives this segmentation fault error when building.
Reply

#13
In my case, IGListKit refactored their class named IGListSectionController to ListSectionController , while I already had a class named ListSectionController. I used find and replace and didn't know I had a class with the same name.

`class ListSectionController : ListSectionController`



I read the error message in full and concluded that **this error can also happen when you have Circular dependencies**. This wasn't mentioned in any of the comments, I hope this helps.
Reply

#14
I'm using Xcode 8.3/Swift 3

I used @Ron B.'s answer to go through all the code and comment out different functions until I got a successful build. It turns out it was `async trailing closures` that was causing my error:

**My trailing closures:**

let firstTask = DispatchWorkItem{
//self.doSomthing()
}
let secondTask = DispatchWorkItem{
//self.doSomthingElse()
}

//trailing closure #1
DispatchQueue.main.asyncAfter(deadline: .now() + 10){firstTask}

//trailing closure #2
DispatchQueue.main.asyncAfter(deadline: .now() + 20){secondTask}

**Once I used the autocomplete syntax** the `Segmentation fault: 11`
was **Gone**

//autocomplete syntax closure #1
DispatchQueue.main.asyncAfter(deadline: .now() + 10, execute: firstTask)

//autocomplete syntax closure #2
DispatchQueue.main.asyncAfter(deadline: .now() + 20, execute: secondTask)
Reply

#15
If you're using multiple versions of XCode, this error can easily happen if your paths have changed (eg. You downloaded the DMG to Desktop, extracted, but then moved XCode to Applications afterward). Carefully read the Segmentation Fault 11 error given to you in XCode, it may reference your old path which is the cause of the Segmentation Fault. If it does, you can fix it by either:

1. xcode-select the correct path. Eg. sudo xcode-select -s /Applications/Xcode-beta.app/Contents/Developer/ (obviously input your correct path here)
2. When installing your second version of XCode, ensure it's being extracted to the final path (extract to Applications itself) and that 'XCode.app' doesn't already exist when you do so (rename your previous one if it exists). After it's installed, you can rename both as you like.

Another potential fix for this issue:

Upgrading from El Capitan to Sierra and 'installing extra components' when launching Xcode after this upgrade fixed it for me the first time this happened.
Reply

#16
I also encounterd the `Segmentation fault: 11 error` because I was calling a method which was returning `Any object` and compiler got confused to understand the object type that was being used.

Casting `Any object` to the required type which I was using, solved my issue.
Reply

#17
I recently encountered the same problem, and I will try to generalise how I solved it, as a lot of these answers are to spesific to be of help to everyone.

**1.** First look at the bottom of the error message to identify the file and function which causes the segmentation fault.

[![Error message][1]][1]

**2.** Then I look at that function and commented out all of it. I compiled and it now worked. Then I removed the comments from parts of the function at a time, until I hit the line that was responsible for the error. After this I was able to fix it, and it all works. :)

[1]:
Reply

#18
I had this line in my code

weakSelf?.notifications = weakSelf?.notifications ?? [] + weakSelf?.chatNotificationDataSource ?? []
this cause Segmentation fault.
But then i changed it in this way:


weakSelf?.notifications = (weakSelf?.notifications ?? []) + (weakSelf?.chatNotificationDataSource ?? [])
and app started working.

Reply

#19
I got this error when getting a value from NSUserDefaults. The following gives error:

let arr = defaults.objectForKey("myArray")


What fixed the error was to cast the type to the correct type stored in NSUserDefaults. The following gives no error:

let arr = defaults.objectForKey("myArray") as! Array<String>
Reply

#20
**When your development target is not supporting any UIControl**

In my case i was using `StackView` in a project with development target `8.0`.
This error can happen if your development target is not supporting any UIControl.

**When you set incorrect target**

In below line if you leave default target "target" instead of self then Segmentation fault 11 occurs.

shareBtn.addTarget(self, action: #selector(ViewController.share(_:)), for: .touchUpInside)

Reply



Forum Jump:


Users browsing this thread:
1 Guest(s)

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