Prints statements crash all time - ios

I have an iOS app written in swift which use a linked C framework , all print statement cause the app to crash with error "Thread 1: EXC_BREAKPOINT (code=1, subcode=0x1022cd9bc)" even if I print empty statement, however if I changed the print() to NSLog it work. I wonder what could be the issue for such problem.Error Screenshot

You have breakpoints active. Just delete or disable them
Image Source

Issue resolved by deleting a statement which has a pointer which cause bad memory access

Related

Track a zombie object in xcode

I'm getting this error exc_bad_access code=1 address= xcodein my IOS app so I've tried to use the zombie tool like this :
Product->Profile->Zombies then I click on start recording (the red dot)
Also I've check the Enable Zombie Objects in
Product->Scheme->Edit scheme->Run->Diagnostics
The problem is when I'm using the zombie mode and I try to simulate the error, the error is not simulated, not detected. When I run my project in normal mode, debug, the error occurs and the app crash.
So what I've missed here ?
Note this is the first time I use the zombie tools. Thanks.
Update
Error :
The problem with NSZombie here is that it keeps objects alive instead of deallocating them, but turns them into special objects that complain as soon as you try to call a method on them.
However, if you have some code like a block that just tries to access an instance variable (without calling a method on that object), this will now succeed as the object's memory region is now still available.
If you haven't done so already, simply try running your code in the normal debugger without NSZombie as that should tell you where the crash happens in the stack trace.

EXC_BAD_ACCESS from Apple Subthread

All of a sudden, I receive this EXC_BAD_ACCESS and NSZombie isn't saying anything.
Anyone have an effective way to debug and eliminate this issue?
There might be following issues:-
1) First check in your code in which line it is happening.
2) It happens due to improper bindings in the xib as well.

Xcode 5 Instruments does not show zombies

I am unable to post images as I don't yet have 10 rep so my apologies if any of this is vague.
I'm writing an ARC application for Mac OS X and it throws an EXC_BAD_ACCESS error. In an attempt to track down the issue, I have enabled Zombie Objects under the 'Diagnostics' Tab.
I then startup Instruments (Zombies)
Finally I record and cause the app to crash and the error is generated. However, instead of getting any zombie indicators in instruments, I get an app problem report for my app that I'm profiling saying that my app 'quit unexpectedly'. No stack trace is produced for me to navigate and that problem report isn't of much use to me.
Could the EXC_BAD_ACCESS error be caused by something other than dereferencing a pointer to memory that has been released? Should I always expect to get Zombies in this case when there is an EXC_BAD_ACCESS error? If so then how can I see the zombie? What else do I need to configure to get the zombies?
Thanks
Could the EXC_BAD_ACCESS error be caused by something other than dereferencing a pointer to memory that has been released?
Yes. That error simply means that your program tried to dereference a pointer that refers to a location that your program isn't allowed to access. That could be because it points to an object that no longer exists, but it can also happen when you use a pointer without setting it to something valid in the first place, or when you incorrectly try to use a non-pointer value as a pointer.
Should I always expect to get Zombies in this case when there is an EXC_BAD_ACCESS error?
No, NSZombieEnabled only helps you find cases where you're trying to access a deallocated object. It won't help you with other cases that produce EXC_BAD_ACCESS.
You could try adding an exception breakpoint in Xcode.
Click the "Breakpoint navigator" tab in Xcode
Click the plus sign
Click "Add Exception Breakpoint"

CoreFoundation Trap error "Thread1:EXC_BREAKPOINT (code=EXC_ARM_BREAKPOINT, subcode=0xdefe)"

i need your help i've got this frustrating "random" error.
The app is compose of one Mapviewcontroller and a collectionview on the second controller.
Sometimes when I return to the map from the second controller the app suddenly crash with this error on the the "trap" line.
The crash report doesn't point to any of my lines of code.
EXC_BREAKPOINT (code=EXC_ARM_BREAKPOINT, subcode=0xdefe)
I said "random error" because the same version of the same app could be build and run smooth for days, then suddenly it stuck. The only way to regain control of the app is to delete manually from the iPad and rebuild.
For your information the app uses Coredata.
Any ideas? Some method to figure out where the error come from?
Any help is appreciated, thanks!
I had this error on line like that
NSLog(#"%#: tutorial view retain count = %ld",self.class,CFGetRetainCount(CFTypeRef(tutorialView)));
where tutorialView equals nil
Restart your iOS device - that worked for me. You can also try restarting Xcode.
I was getting the crash where I had a breakpoint set, but I had breakpoints turned off. I think that there are glitches in how Xcode handles breakpoints that can cause this issue even if there aren't issues in the code itself.

Thread 1: EXC_BREAKPOINT(code = EXC_I386_BPT, subcode=0x0

I am working on to-do list app for iOS. when i build the run the app on my system which i used to development, there are no problems. However when i xcode project on another system.
I get the following error and the app crashes on launch.
Any inputs on what is going wrong?
Thread 1: EXC_BREAKPOINT(code = EXC_I386_BPT, subcode=0x0
I've experienced this while using a breakpoint which would log something and then continue automatically. Disabled that, and things returned to normal. As the message suggests, it's a breakpoint issue

Resources