0
votes

Good afternoon.

Error memory when the app is running.

[5133:307051] *** -[DeclarantController retain]: message sent to deallocated instance 0x7f9e53d22b50

The form open after you request data in a background thread.

dispatch_async(dispatch_get_main_queue(), ^{
                        DeclarantController *viewController = [self.storyboard instantiateViewControllerWithIdentifier:@"DeclarantController"];
                        viewController.consultData = self.consultData;
                        viewController.parentView = self;
                        [self.navigationController pushViewController:viewController animated:YES];
                    });

Simplified the controller, but the error POPs up if put in the viewDidLoad method call getDeclarantKind. If you comment out, the error does not occur. Error occurs even with an empty method.

@implementation DeclarantController : BaseController

- (void)viewDidLoad
{
    [super viewDidLoad];
    [self tableColor];
    [self getDeclarantKind];
}

-(NSMutableArray*)getDeclarantKind
{

}
@end

when the following algorithm:

  1. Opens a form And on it there is a button for transition to B
  2. Opens form B on it the API request in background process. If the response came form opens C
  3. Form C normally works
  4. Go back swipe on form B and then swipe to the form And
  5. Repeat items 1-3. The form opens
  6. Go back swipe on form B and then swipe to the form And
  7. Repeat items 1-3. Form C opens but the buttons will slide. After clicking on any area of the screen there is a bug in main.m

    int main(int argc, char *argv[]) { @autoreleasepool { return UIApplicationMain(argc, argv, nil, NSStringFromClass([AppDelegate class])); } }

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

Most do not understand why the error is triggered only on the 3rd pass. The first 2 work. And if you want to remove [self getDeclarantKind]; the same form is rendered and works fine.

2
Did you add points? - iBug

2 Answers

0
votes

I cannot tell you the exact issue or the reason for crashing. But you can try adding exception break points for your project/workspace. This will give you the exact statement which is causing the crash.

enter image description here

enter image description here

I hope this will help you.

happy coding!

0
votes

program execution does not stop where the error occurs. Again in main fails. I hands can't find the method where the error POPs up. because the form is designed with an error but without an error, but the error occurs when you press the mouse on the screen.