cezarywojcik / CWStatusBarNotification

A library that allows you to easily create text-based notifications that appear on the status bar.
MIT License
2.03k stars 261 forks source link

Memory Leak #64

Open docash59 opened 9 years ago

docash59 commented 9 years ago

My Crashlytics has picked up a leak in the code affects iOS 8 and crashes at CWStatusBarNotification.m > updateStatusBarFrame selector function. Any chance you could assist on how to resolve this?

Fatal Exception: NSInvalidArgumentException -[__NSCFString updateStatusBarFrame]: unrecognized selector sent to instance

Thread : Fatal Exception: NSInvalidArgumentException 0 CoreFoundation 0x256cafef exceptionPreprocess 1 libobjc.A.dylib 0x33d6ec8b objc_exception_throw 2 CoreFoundation 0x256d0409 __methodDescriptionForSelector 3 CoreFoundation 0x256ce327 __forwarding 4 CoreFoundation 0x255fde78 _CF_forwarding_prep_0 5 CoreFoundation 0x25682e09 CFNOTIFICATIONCENTER_IS_CALLING_OUT_TO_AN_OBSERVER 6 CoreFoundation 0x255dd515 _CFXNotificationPost 7 Foundation 0x2633f749 -[NSNotificationCenter postNotificationName:object:userInfo:] 8 UIKit 0x28dcd18d -[UIApplication _notifyWillChangeStatusBarFrame:] 9 UIKit 0x28dccd8d -[UIApplication statusBar:willAnimateFromHeight:toHeight:duration:animation:] 10 UIKit 0x28db0d7f -[UIStatusBar _requestStyleAttributes:animationParameters:] 11 UIKit 0x28dafb93 -[UIStatusBar requestStyle:animated:] 12 CoreFoundation 0x25682e09 CFNOTIFICATIONCENTER_IS_CALLING_OUT_TO_AN_OBSERVER 13 CoreFoundation 0x255dd515 _CFXNotificationPost 14 Foundation 0x2633f749 -[NSNotificationCenter postNotificationName:object:userInfo:] 15 Foundation 0x2634422f -[NSNotificationCenter postNotificationName:object:] 16 UIKit 0x28dc738f -[UIApplication _saveSnapshotWithName:] 17 UIKit 0x28faef77 -[UIApplication _handleApplicationDectivationWithScene:shouldForceExit:transitionContext:completion:] 18 UIKit 0x28fb62b1 88-[UIApplication _handleApplicationLifecycleEventWithScene:transitionContext:completion:]_block_invoke 19 UIKit 0x28fb625d -[UIApplication _handleApplicationLifecycleEventWithScene:transitionContext:completion:] 20 UIKit 0x28fab11b -[UIApplication scene:didUpdateWithDiff:transitionContext:completion:] 21 FrontBoardServices 0x2c29aa65 80-[FBSSceneImpl updater:didUpdateSettings:withDiff:transitionContext:completion:]_block_invoke_2 22 FrontBoardServices 0x2c2a9ec9 __31-[FBSSerialQueue performAsync:]_block_invoke_2 23 CoreFoundation 0x25690fd5 CFRUNLOOP_IS_CALLING_OUT_TO_A_BLOCK 24 CoreFoundation 0x25690299 CFRunLoopDoBlocks 25 CoreFoundation 0x2568edd3 CFRunLoopRun 26 CoreFoundation 0x255db201 CFRunLoopRunSpecific 27 CoreFoundation 0x255db013 CFRunLoopRunInMode 28 GraphicsServices 0x2d0ac201 GSEventRunModal 29 UIKit 0x28da7a09 UIApplicationMain 30 Social Dummy 0x00025627 main (main.m:16) 31 libdyld.dylib 0x34320aaf start

cezarywojcik commented 9 years ago

Can you provide steps on how to reproduce the error?

docash59 commented 9 years ago

Unfortunately Im unable to as this has been done by couple users in my app. I personally have never come across this issue during vigorous testing myself and have tried to see whether I could solve it myself but haven't reproduced. However here is a link the issue in my Crashlytics: http://crashes.to/s/a9b0e587699

cezarywojcik commented 9 years ago

Seems like when this kind of statement is set up, it doesn't think that updateStatusBarFrame is a selector for self. Not sure what to make of that. Can't really do much without a way to reproduce this unfortunately. Let me know if you can reproduce this or have other ideas.

docash59 commented 9 years ago

I thought as much yeah. If i come across it i'll get back to you. Thanks. This is a REALLY useful and easy to use library!

rex3du commented 7 years ago

Is there any updates regarding this issue?