SIGABRT xcode 4.2 error - xcode

I am trying to run my app for IPhone in xcode 4.2 and it keeps shutting down. From what I've heard, SIGABRT can come from many places. I have tried restarting the computer and resetting the iOS simulator already. The build succeeds, but then pops out this error before I can test the app. The error is in the main.m file.
0x00001fa8 <+0152> mov -0x38(%ebp),%ecx
Thread 1: Program received signal: "SIGABRT"

SIGABRT means that there was an error thrown somewhere in your code. This could happen due to a wide range of problems. Try setting an exception breakpoint in the breakpoint navigator or manually set breakpoints yourself to see where the exception was thrown. Also you can look in the debugger console to see where the exception came from.

Related

Xcode doesn't stop execution on assertion failure when debugging Unity Editor

I'm currently working on native plugin for Unity Engine. So there's my custom c++/objective-c++ code running inside Unity Editor process. Breakpoints are working just fine, but when assertion failure happens Editor just crashes and Xcode says Finished running Unity instead of stopping debugger.
I have 2 cases when there may be assertion failure:
Assertion in my own c++/objective-c++ code.
Xcode validation (e.g. Metal API Validation)
In both cases Editor just crashes, Xcode says Finished running Unity, then Unity Crash Reporter appears, and finally macOS crash reported appears.
To start Unity Editor from Xcode I followed this guide: https://docs.unity3d.com/Manual/XcodeFrameDebuggerIntegration.html (Capturing a frame from Unity Editor with Xcode section)
How can I make Xcode/Unity Editor stop execution and show line/assertion info when assertion failure happens?
This is a design "feature" in Xcode. I noticed such behavior in C++ and it is similar for Obj-C++.
You need to manually add an Exception Breakpoint. See here - How to add Exception Breakpoint in Xcode?
Enable the Exception Breakpoint. Exception - All. Break on - Throw.
I would also recommend enabling all the memory breakpoints. See here - https://developer.apple.com/library/archive/documentation/Performance/Conceptual/ManagingMemory/Articles/MallocDebug.html

meteor + cordova libc++abi.dylib: terminating with uncaught exception

I have been playing around with Meteor's command "meteor run ios-device", and it all worked well.
But after a certain build, the app is freezing at the splash screen and Xcode is showing the following error:
libc++abi.dylib: terminating with uncaught exception
The full console output can be seen here http://pastebin.com/Ta98RkAH
After searching on google/stackoverflow it seems like a lot of people get this error for different reasons, but i can't really tell as i'm not familiar with this error and Xcode at all.
One thing i found on phonegap community was someone saying npm's package "ios-sim" should be updated, but that did not work for me.

ibtool compilation error building for simulator but not for hardware

Apparently out of nowhere I've suddenly started getting a compilation error, which only occurs when building for the simulator:
Command /Applications/Xcode.app/Contents/Developer/usr/bin/ibtool failed with exit code 255
It compiled this morning, I have not changed the xib, now this afternoon it fails.
What is it and why is it only for the simulator?
EDIT - the number of errors increasing, first it was one, then I relaunched x code, then it was two, now its increased to 3.
EDIT - Now XCode crashes whenever I try to view any xib.
Maybe time for a reinstall
I had a similar error once. In my case I had edited the SourceCode of a storyboard and failed to add a file in the section.

ios Zombie detection

I'm having (in my opinion) a very difficult problem in my code. It crashes randomly at different places in the code. The project is a ARC project.
So my program crashes occaisonally with this messages:
malloc: *** error for object 0xd2dd8b0: incorrect checksum for freed object - object was probably modified after being freed.
*** set a breakpoint in malloc_error_break to debug
I already set a breakpoint for malloc_error_break but I don't get any information out of it. When the code crashes ,XCode shows me the place in the code where it happens. But as I already said the crashes are randomly and do not occur always. But it seems as if the crashes are concentrated at on particular line in the code.
Now, I wanted to debug it using the instruments that come with xcode. After a bit of googling i found the following stuff on stackoverflow: How do I set up NSZombieEnabled in Xcode 4? and Xcode malloc error.
So the first link describes how to start zombie detection out of xcode itself by clicking the run button in xcode and choose "Profile". The problem I have is, that I cannot find "Zombies" when choosing the template for the trace document in my version of xcode (4.2). But if I start Instruments outside xcode (e.g. from finder) I can choose zombies.
Okay, here is what I did:
1) Start Instruments from finder and choose Profile "Zombies".
2) Start iphone app from xcode in the iphone simulator (normal run (not profile or debug)).
3) In Instruments "Choose Target"->"Attach to process"->"iPhone Simulator (57529)".
4) Instruments begins to recod something (I cannot figure out what it does).
5) Start playing around with the app until it crashes.
Eventually the app crashes and here is a screenshot of instruments after crashing the app:
My questions:
1) Is Zombies adequate for my problem or should I use another analyizes tool?
2) What tells me instruments in it's output after crashing?
Judging by your description of the problem, your crash is caused by something besides accessing a zombie object. If your app accesses a deallocated (zombie) object, Instruments shows a message like the following when using the Zombies template:

suddenly getting wait_fences: failed to receive reply: 10004003

I have an Xcode 4.2 project with ios5 targeting 4.3 and am now suddenly getting "wait_fences: failed to receive reply: 10004003" error.
It occurs on the 4.3 Simulator (don't have a 4.3 device). It does NOT occur on 5.0 simulator or device.
App runs as before and when the keyboard appears, all is good. When I tap the keyboard. I get the error. Description is displayed once in the console. Subsequent runs still crash app but error is not written to console! (So I'm assuming subsequent crashes are the same) It's suddenly started occurring and I can't see anywhere the in the code, changes could affect it.
Has anyone else experienced this same issue and or managed to resolve it?
NB: I have already read the other posts regarding this error.
Have now confirmed that it is not the code so my iOS Simulator must have been corrupted some how.

Resources