0

I am passing two string using delegate to the parent controller while I pop to the parent controller.

    if (![clientIdd length] == 0)
    {
        [self.clientIdDelegate passClientId:clientIdd andCouncelorId:councelorId];

        [self.navigationController popViewControllerAnimated:YES];
    }

I enabled Zombies and am getting an error like this:

[CFString respondsToSelector:]: message sent to deallocated instance 0x7a77f8e0.

Can anyone help?

siburb
  • 4,880
  • 1
  • 25
  • 34
jerfin
  • 803
  • 1
  • 13
  • 28
  • Can you post full crash log? – Fahri Azimov Mar 15 '16 at 05:48
  • I guess clientId is dead – Andrey Chernukha Mar 15 '16 at 05:48
  • - -[CFString respondsToSelector:]: message sent to deallocated instance 0x7a77f8e0 - this the log msg – jerfin Mar 15 '16 at 05:48
  • How do you declare delegate instance? weak or strong? – Muzahid Mar 15 '16 at 05:51
  • Muzahidul i have declared it as strong – jerfin Mar 15 '16 at 05:51
  • This line `if (![clientIdd length] ==0)` is really getting bugs(and all other insects) out of my head. This check you are making is wrong, and only empty strings pass it. Change it to `if (!([clientIdd length]==0))` or `if ([clientIdd length]!=0)` or `if (clientIdd && [clientIdd length] > 0)`, and try, maybe it will work (last one is better). Also, put check like that for your `councelorId`, it also can be `nil` or empty. – Fahri Azimov Mar 15 '16 at 05:57
  • It seems that you are calling a delegate and then you try to pop the controller from the screen. Do you have an async request / piece of code in the `[self.clientIdDelegate passClientId:clientIdd andCouncelorId:councelorId];` method or something similar? – Marco Pace Mar 15 '16 at 07:29

1 Answers1

0

Check whether clientIdd is NSNull using the following code.

if(clientIdd == (id)[NSNull null])

if it is the case then find out the reason for clientIdd becoming null in your code.

Chirag Bhutani
  • 229
  • 1
  • 8