1

could you please help me out to fix the EXC_BAD_ACCESS problem.

It was all good in previous version of Xcode with iOS 8. After I've installed the new one (7.0.1 with iOS 9 in simulator) this exception started appearing. It appears right in the moment when I tap on any cell in table view. Detail view controller should appear after tap, but this exception appears: - Thread 1: EXC_BAD_ACCESS (code=2, address=0xbf7b6ffc)

enter image description here

As far as I see there are 2 of this exceptions. I've tried to enable zombies but it didn't give more information.

this is the project on github: https://github.com/bodya48/news thank you in advance

Bogdan Laukhin
  • 1,454
  • 2
  • 17
  • 26

2 Answers2

0

You need to have a strong reference to the TableView and the TableViewController.

Zia
  • 14,622
  • 7
  • 40
  • 59
0

Welcome to iOS Development - Seems like you are accessing an invalid pointer.

What does EXC_BAD_ACCESS mean?

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”

When EXC_BAD_ACCESS happen?

You will get EXC_BAD_ACCESS in 3 cases:

An object is not initialized An object is already released Something else that is not very likely to happen That’s already a good starting point. Start using the debugger, if you recently added a new object to the class you’re working on, put a breakpoint at the line before the freshly added object is used for the first time and check the values in the debugger.

Here's a good link with an understanding of how to debug these issues: http://www.touch-code-magazine.com/how-to-debug-exc_bad_access/

StevenOjo
  • 2,498
  • 1
  • 16
  • 21