Subject 1: EXC_BAD_ACCESS (code = 1, address = 0x30000008)

I still stuck to this problem, even followed the entire answer from this forum. can someone tell me what to do in a simple way? I am a new student in xcode. I turned on the zombie object.

this is my coding that failed

if ([[[AryStoreknowItem objectAtIndex:indexPath.row] objectForKey:@"action"] isEqualToString:@"a1"]) { NSString *t1 =[[AryStoreknowItem objectAtIndex:indexPath.row] objectForKey:@"title"]; NSString *a1 = [[AryStoreknowItem objectAtIndex:indexPath.row] objectForKey:@"action"]; NSUserDefaults *defaults = [NSUserDefaults standardUserDefaults]; // saving an NSString [defaults setObject:a1 forKey:@"a1"]; [defaults setObject:t1 forKey:@"t1"]; JournalPage *journal=[[JournalPage alloc]initWithNibName:@"JournalPage" bundle:nil]; [self presentModalViewController:journal animated:YES]; 

In my application, I have several ViewController. when I click the back button in the UINavigationBar, then this type of problem is generated, I can’t explain my problem because all the functions work correctly.

Example: -

1 - fitstVController (works correctly)

=> it has a UITableView, when I click on a specific row, then it will go on another UIViewController (SecoundViewController)

2 - SecoundViewController (working correctly)

=> has a UITableView and a UIActionSheet. when I select the UiActionSheet button, then another UIViewController (ThirdViewController) is open

3 - ThirdViewController (does not open)

Error

=> appeared when I click on line three. the same thing happens if I click on another cell, the third cell that I click will crash earlier than on other pages

+6
source share
4 answers

I don’t think that we have enough to diagnose any specific problem (and it’s difficult for you to follow your description). However, I would recommend:

  • I would suggest running your code through a static analyzer ("Analyze" in the Xcode Product menu) and make sure that it does not provide any warnings. This will (among other things) identify many problems with conventional memory that can easily infect with non-ARC code. It makes no sense to go further until you get a clean health score.

  • I would suggest turning on the Breakpoint Exception and see if it identifies a particular line of code that is the source of the problem. Sometimes this can identify a line of code without having to reverse engineer where the error occurred by looking at the stack trace.

  • Given that you are creating code without ARC, you can also temporarily enable zombies. You can see this configuration setting of the circuit configuration .

  • In addition, I will give you an article by Ray Wenderlich. My application crashed, now what? .

If you still have errors, share a stack trace with us.

+11
source

You may have rejected the ViewController while the object is still accessing it. That was my problem, and Rob helped me read the answer.

+2
source

I got this error when I used the reusable / XIB view and had a combination of two errors:

  • I forgot to specify the name of the user class in the identity inspector

    enter image description here

  • I exposed the view as my specific presentation class in its output

    enter image description here

By specifying the presentation class in the Identity Inspector, I fixed the error

+1
source

This type of problem usually occurs due to free / allocated memory.

Go to

Product β†’ Pure

will fix this problem in most cases

0
source

Source: https://habr.com/ru/post/955383/


All Articles