Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

crashed when call +[RKDropdownAlert title: message:] #28

Open
scorpiozj opened this issue Apr 10, 2016 · 9 comments
Open

crashed when call +[RKDropdownAlert title: message:] #28

scorpiozj opened this issue Apr 10, 2016 · 9 comments

Comments

@scorpiozj
Copy link

The Fabric has a record of issue:


iPhone5, iOS9.3.1
Crashed: com.apple.main-thread
EXC_BAD_ACCESS KERN_INVALID_ADDRESS 0x00000000a1b06cf5
Thread : Crashed: com.apple.main-thread
0  libobjc.A.dylib                0x2136ba86 objc_msgSend + 5
1  Foundation                     0x222f779d -[NSObject(NSKeyValueObserverNotification) willChangeValueForKey:] + 276
2  QuartzCore                     0x241e1251 CA::Layer::set_delegate(objc_object*) + 112
3  UIKit                          0x26174d95 -[UIView _createLayerWithFrame:] + 592
4  UIKit                          0x261746e5 UIViewCommonInitWithFrame + 852
5  UIKit                          0x26174317 -[UIView initWithFrame:] + 130
6  UIKit                          0x2617bc61 -[UILabel initWithFrame:] + 56
7  MyApp                  0xcf6af -[RKDropdownAlert initWithFrame:] (RKDropdownAlert.m:56)
8  MyApp                  0xcfc77 +[RKDropdownAlert alertView] (RKDropdownAlert.m:135)
9  MyApp                  0xcffab +[RKDropdownAlert title:message:] (RKDropdownAlert.m:174)
10 MyApp                  0x74847 -[ZZFileViewController p_refreshByConnectStatus] (ZZFileViewController.m:1186)
11 CoreFoundation                 0x21b53345 __CFNOTIFICATIONCENTER_IS_CALLING_OUT_TO_AN_OBSERVER__ + 12
12 CoreFoundation                 0x21b52d53 _CFXRegistrationPost + 398
13 CoreFoundation                 0x21b52b29 ___CFXNotificationPost_block_invoke + 40
14 CoreFoundation                 0x21ba9f63 -[_CFXNotificationRegistrar find:object:observer:enumerator:] + 1334
15 CoreFoundation                 0x21ab20eb _CFXNotificationPost + 486
16 Foundation                     0x222f7b17 -[NSNotificationCenter postNotificationName:object:userInfo:] + 70
17 UIKit                          0x261fa873 -[UIApplication _stopDeactivatingForReason:] + 1150
18 UIKit                          0x26413b39 __62-[UIApplication _sceneSettingsPostLifecycleEventDiffInspector]_block_invoke1180 + 104
19 FrontBoardServices             0x232621a3 __52-[FBSSettingsDiffInspector inspectDiff:withContext:]_block_invoke27 + 158
20 Foundation                     0x22397e23 __NSIndexSetEnumerate + 430
21 Foundation                     0x223230f7 -[NSIndexSet enumerateIndexesWithOptions:usingBlock:] + 66
22 BaseBoard                      0x231f6d17 -[BSSettingsDiff inspectChangesWithBlock:] + 102
23 FrontBoardServices             0x2325dbe7 -[FBSSettingsDiff inspectOtherChangesWithBlock:] + 94
24 FrontBoardServices             0x2326200f -[FBSSettingsDiffInspector inspectDiff:withContext:] + 310
25 UIKit                          0x264142cf __70-[UIApplication scene:didUpdateWithDiff:transitionContext:completion:]_block_invoke + 170
26 UIKit                          0x26413f99 -[UIApplication scene:didUpdateWithDiff:transitionContext:completion:] + 644
27 FrontBoardServices             0x23254c29 __80-[FBSSceneImpl updater:didUpdateSettings:withDiff:transitionContext:completion:]_block_invoke_2 + 40
28 FrontBoardServices             0x2326fbf7 __FBSSERIALQUEUE_IS_CALLING_OUT_TO_A_BLOCK__ + 18
29 FrontBoardServices             0x2326faa7 -[FBSSerialQueue _performNext] + 226
30 FrontBoardServices             0x2326fda5 -[FBSSerialQueue _performNextFromRunLoopSource] + 44
31 CoreFoundation                 0x21b63a67 __CFRUNLOOP_IS_CALLING_OUT_TO_A_SOURCE0_PERFORM_FUNCTION__ + 14
32 CoreFoundation                 0x21b63657 __CFRunLoopDoSources0 + 454
33 CoreFoundation                 0x21b619bf __CFRunLoopRun + 806
34 CoreFoundation                 0x21ab0289 CFRunLoopRunSpecific + 516
35 CoreFoundation                 0x21ab007d CFRunLoopRunInMode + 108
36 GraphicsServices               0x230ccaf9 GSEventRunModal + 160
37 UIKit                          0x261db2c5 UIApplicationMain + 144
38 FlashairShare                  0x8abcf main (main.m:14)
39 libdispatch.dylib              0x2175c873 (Missing)

I check the code, and find it just calls:
[RKDropdownAlert title:alertTitle message:alertMsg];
Both the strings are not nil as using NSLocalizedString.
The Project is using ARC and I have no idea about this EXC_BAD_ACCESS.
Could you find something from the crash log?

@kokitang
Copy link

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.

@scorpiozj
Copy link
Author

scorpiozj commented Aug 19, 2016

It only happens in Production, and I never find it in Debug.
That's also why I need help...

@kokitang
Copy link

still not fixed the problem? LOL
I meet this b4 but I forgot how to fix. But it SHOULD be your scheme setting problem

@scorpiozj
Copy link
Author

thanks for you quick response!
I checked the scheme, but for Archive there is no configuration.
what else should I look?

@kokitang
Copy link

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.

@kokitang
Copy link

kokitang commented Aug 19, 2016

BTW, have you tried use Constant string like @"string" to test the code?

E.g.: [RKDropdownAlert title:@"I'm Title" message:@"help me!!"];

@scorpiozj
Copy link
Author

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?

@kokitang
Copy link

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.

@kokitang
Copy link

Problem may happened by this statement.

10 MyApp 0x74847 -ZZFileViewController p_refreshByConnectStatus

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants