Open scorpiozj opened 8 years ago
Have you tried use Constant string like @"string" ? Or try to look at your scheme and run as debug. Or try to Enable Zombie Objects to find what's going on. Bcz this problem should about project setting rather than this library.
It only happens in Production, and I never find it in Debug.
That's also why I need help...
still not fixed the problem? LOL I meet this b4 but I forgot how to fix. But it SHOULD be your scheme setting problem
thanks for you quick response! I checked the scheme, but for Archive there is no configuration. what else should I look?
sorry, scheme is not the main cause, but you can Enable Zombie Objects in scheme to find out the root of problem.
From stack overflow: EXC_BAD_ACCESS KERN_INVALID_ADDRESS generally means that you are sending a obj c message to an invalid memory address. Usually this happens because an object that you are using has been deallocated, while you weren't expecting it to be.
The reason it works on another phone is probably just that autoreleased objects aren't being released at the same time. You should check your retain/release balances and can use NSZombieEnabled to get more information.
BTW, have you tried use Constant string like @"string" to test the code?
E.g.: [RKDropdownAlert title:@"I'm Title" message:@"help me!!"];
yes, it does matter with memory. However, I use ARC, and there is no manually retain/release. This is why I can't find it so far. By the way, the title and msg is localized, and I haven't tried with constant string. May test it later.
As for the Zombie, can it be enabled and work in Release?
For Zombie, it can work in Release, you can edit your scheme to set Run as Release to help you find which one variable had been release memory by system.
I understand the difficulty to locate this problem using ARC, because I'm using ARC too! haha! In my method, I use dummy, slow but accurate method to find out which/where the variable released: check all variable step by step. It may time consuming, but once you locate which variable released, you can find the root very fast.
If you use with constant string and no error, you can mainly look at the string variable to find out where did it been released.
Problem may happened by this statement.
10 MyApp 0x74847 -ZZFileViewController p_refreshByConnectStatus
The Fabric has a record of issue:
I check the code, and find it just calls:
[RKDropdownAlert title:alertTitle message:alertMsg];
Both the strings are not nil as usingNSLocalizedString
.The Project is using ARC and I have no idea about this
EXC_BAD_ACCESS
. Could you find something from the crash log?