My app runs fine and as expected, but for some reason when I place breakpoints, stepping into/over/resuming causes the program to crash with EXC_BAD_ACCESS. This does not happen if I remove/disable breakpoints.
Any advice?
EXC_BAD_ACCESS is an exception raised as a result of accessing bad memory. We're constantly working with pointers to memory in Swift that link to a specific memory address. An application will crash whenever we try to access a pointer that is invalid or no longer exists.
EXC_BAD_ACCESS means that message was sent to a point in the memory where there's no instance of a class to execute it. Thus “bad access”. You will get EXC_BAD_ACCESS in 3 cases: An object is not initialized.
From what I can see, LLDB appears to be broken in the Xcode 4.2 and 4.2.1. Switch to GDB in your "Edit Scheme" settings.
Breakpoints work just as expected after switching to GDB.
To anyone that might experience the same thing with Xcode 5.0.1 and Mavericks: Try deleting all your schemes and auto create them again - that fixed it for me.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With