Command failed due to signal: Segmentation fault: with xCode 7.0.1 - ios

My code is unable to build on xcode 7. What is Segmentation fault?

A segmentation fault happens when your code tries to access memory that it isn't allowed to access. This is often a sign of an uninitialized reference.
It's not clear to me from your screenshot exactly what is going on, though. Perhaps you could provide more details?

From the screenshot it looks like it is happening when you build your project. If this is correct, you need to create a minimal example that displays the problem i.e a code fragment that crashes the compiler in the same way and then you need to raise a bug report about it with Apple (supplying your minimal example so they can reproduce it).
This has happened to me a couple of times in the past and the way I have identified the bit that crashes the compiler is to comment out everything in the source file and then add it back in function by function.That will narrow the problem down to the function. After that you repeat with the lines of code in the offending function, until you get the line that crashes the compiler.
Along the way you may find a work around to stop the compiler crashing. If you do, do not be tempted to skip reporting the bug to Apple. They need to know.

Related

Unable to Build mac project in XCode14.0/14.1 with macOS ventura

I have recently updated to macOS 13.0 and for that minimum XCode Version required is 14.x series. But my existing project never getting successfully building. Its getting stuck at some point.
Its not getting failed. Build process screenshot is attached below. Its not pointing to any specific class. Seems like there are lots of classes which are getting compiled successfully at last but still build process is stuck at some point:
Seen similar threads like below on apple pages but nothing seems working. Does anyone got resolution?
Xcode 14 project compile error
XCode 14 compile errors immediately disappear or do not appear at all
Something similar has happened to me in the past on a number of occasions. If the Swift compiler is hanging mid-build, usually the issue is that there is some expression that is too complex for Swift to do the type inference on.
What you need to do is first find the exact statement that is causing the hang. This is how I do it:
First find out which source file is causing the problem. Look at the build log to figure this out (the build log can be located by looking at the reports navigator ⌘9 ). Find the build log and click on it. The build log will appear in an editor window.
One of the compiles will still be in progress and its file is the one you want.
The next thing to do is comment out all the code and recompile. This time the compilation will finish (if you have the right file, or there is only one) but probably with a lot of errors. Then you add the code back in, function by function, until one of them causes the compilation to hang again. If it's not obvious which line of the function is causing the problem, comment it out again and then add the lines back one by one until the compilation breaks again.
Once you have located the line, you need to simplify the type inference on that line. If it's a closure, try adding an explicit declaration for its parameters and return type. If it involves some complex array, try adding a type annotation to its declaration. Also try breaking down complex expressions into multiple simpler expressions.
There's no one size fits all answer to this but usually, once you have located the exact line that is causing the problem, it should be reasonably obvious how to fix it.

Xcode 8 debugger doesn't print objects and showing expression produced error

I have upgraded Xcode 8 but when I'm debugging, every object showing following error :
expression produced error: error: Couldn't materialize: couldn't get the value of __once: extracting data from value failed
error: errored out in DoExecute, couldn't PrepareToExecuteJITExpression
This seems system level error, so I've already tried all possible solutions but still doest work.
I don't know of any bug that would cause this to happen for all types. Except, if this is a Swift project, make sure that you have cleaned and rebuilt all the swift code you depend on from source. At present, Swift really needs the whole world to be built consistently for debugging to work. If that doesn't help, then we will need more details to figure out what is going wrong.
Might be worthwhile to file a bug with http://bugreporter.apple.com since that makes gathering the data needed to solve the problem easier.

Swift: Selector name found in current argument registers: release

I am getting a crash log that I can't repro with the message:
"Selector name found in current argument registers: release"
I cannot figure out what this means and googling, has not given me any good answers.
It is labeled as
Exception Type: SIGTRAP
And the line of code that it is crashing at is:
let accentColor = data.AccentColor == nil ? UIColor.blackColor() : data.AccentColor!
The same line of code worked in the init() function, but it seems to be crashing at this later point after the user taps a button
This crash is happening a fair amount when I send it out to users, but I can't repro it or figure out what may be causing it.
What does this error message mean and what can I do to fix the issue?
This does not look like an issue with the HockeySDK but much rather with Swift itself.
I've seen several people having issues with Swift compiler optimizations lately. The issue probably only occurs on Ad-Hoc builds because Xcode uses the Release configuration for this which uses a different set of compiler settings.
If you try switching your local build from Debug to Release too, you should be able to reproduce this issue.
As a workaround, you can disable these optimizations for your Ad-Hoc builds but if this persists, you should probably file a bug with Apple.

Unity3d: Error building Player: Append is not supported

I receive this error when appending an already-successful build in XCode. What I don't understand is I'm not changing anything when appending, and this error shows up.
I've never used an 'old version of Xcode' as the error implicitly states.
Does anyone know how to get append working on a consistent basis?
This is a very simple project, and I'm using Playhaven and TapForTap SDK's, if that offers any insight.
Turns out, XCode upgraded itself without telling me. :(
I rolled back to the version I was using and all is well.
With no code snippets or error logs, it's very hard to determine what the source of your problem is. There's no way to know if your error is describing the cause of your problem or a symptom of the problem without more information.
I can only offer some suggestions:
My first thought is that you're using a deprecated method in your code somewhere, possibly "Append", which if that is the case, more than likely has an updated counterpart, but you'll have to check documentation regarding that.
If you've used "Append" previously with no errors, then you should look into what exactly you've changed in your new build, and verify that the methods you're using are supported.
If your errors are vague or unhelpful, you can begin the process of elimination and start commenting out blocks of code until it builds successfully, and narrow down the source of the problem significantly.
However, it would be to your benefit to expand your question with more information.

Receiving signal SIGTRAP after instruction "svc 128" on iOS 6.1

Every once in a while, while debugging an application on an iPad (OS 6.1.3, SDK 6.1), the program pauses after receiving a SIGTRAP signal. I first noticed this happening inside the stat function (from /usr/include/stat.h), but it's also happening in a few other places, like semwait_signal (from nanosleep). The most obvious pattern is that it always happens immediately after running the instruction svc #128. In the case of stat, it returned 0 and there were no errors, so it doesn't seem to indicate any kind of failure state.
Has anyone else experienced this, or know how to get around it?
Thanks!
Unfortunately I didn't discover why exactly the SIGTRAP was being raised by these basic functions, but this symptom went away when I fixed a larger problem with my iOS project.
The app target and static library targets I was linking in didn't consistently define the preprocessor macro _DEBUG, which generated some weird assembly. They had the same levels of optimization, but apparently including/excluding _DEBUG made enough of a difference to cause problems.

Resources