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

UIActionSheet not closing on iPhone 4.0, 4.1 simulator #31

Closed
indit opened this issue Jan 29, 2012 · 6 comments
Closed

UIActionSheet not closing on iPhone 4.0, 4.1 simulator #31

indit opened this issue Jan 29, 2012 · 6 comments

Comments

@indit
Copy link

indit commented Jan 29, 2012

Hi Tim,

Thanks a lot for this utility. Just included it in my app and works well, expect for one issue.

In the iPhone 4.0, 4.1 simulator the UIActionSheet is visible and the UIPickerView's data is lost when the cancel or done button is pressed. Not sure if the same behavior is present when running on the device. Please let me know if you require more information to reproduce this.

Thanks.

@TimCinel
Copy link
Owner

TimCinel commented Feb 2, 2012

Yes, please describe what you mean.

Is it happening in the sample project? When you say the data is lost, what happens? Does a crash occur?

Thanks,
Tim.

On 2012-01-30, at 05:08 , indit wrote:

Hi Tim,

Thanks a lot for this utility. Just included it in my app and works well, expect for one issue.

In the iPhone 4.0, 4.1 simulator the UIActionSheet is visible and the UIPickerView's data is lost when the cancel or done button is pressed. Not sure if the same behavior is present when running on the device. Please let me know if you require more information to reproduce this.

Thanks.


Reply to this email directly or view it on GitHub:
#31

@eloe
Copy link
Contributor

eloe commented Feb 2, 2012

I am running into the same issue. Below is the stacktrace I am getting:

*** Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '-[_UIOnePartImageView actionPickerDone:]: unrecognized selector sent to instance 0x6867fe0' *** Call stack at first throw: ( 0 CoreFoundation 0x3688541b __exceptionPreprocess + 114 1 libobjc.A.dylib 0x350a03ec objc_exception_throw + 40 2 CoreFoundation 0x36886b83 -[NSObject(NSObject) doesNotRecognizeSelector:] + 98 3 CoreFoundation 0x3682be07 ___forwarding___ + 506 4 CoreFoundation 0x3682bbc0 _CF_forwarding_prep_0 + 48 5 CoreFoundation 0x3682a3e3 -[NSObject(NSObject) performSelector:withObject:withObject:] + 26 6 UIKit 0x3101742c -[UIApplication sendAction:to:from:forEvent:] + 136 7 UIKit 0x3108b794 -[UIBarButtonItem(UIInternal) _sendAction:withEvent:] + 136 8 CoreFoundation 0x3682a3e3 -[NSObject(NSObject) performSelector:withObject:withObject:] + 26 9 UIKit 0x3101742c -[UIApplication sendAction:to:from:forEvent:] + 136 10 UIKit 0x31017394 -[UIApplication sendAction:toTarget:fromSender:forEvent:] + 40 11 UIKit 0x3101735c -[UIControl sendAction:to:forEvent:] + 52 12 UIKit 0x31016fac -[UIControl(Internal) _sendActionsForEvents:withEvent:] + 536 13 UIKit 0x31017824 -[UIControl touchesEnded:withEvent:] + 460 14 UIKit 0x31015844 -[UIWindow _sendTouchesForEvent:] + 588 15 UIKit 0x31014e78 -[UIWindow sendEvent:] + 396 16 UIKit 0x3100e5f8 -[UIApplication sendEvent:] + 452 17 UIKit 0x3100dd00 _UIApplicationHandleEvent + 6812 18 GraphicsServices 0x32f80de0 PurpleEventCallback + 1032 19 CoreFoundation 0x36816e47 __CFRUNLOOP_IS_CALLING_OUT_TO_A_SOURCE1_PERFORM_FUNCTION__ + 28 20 CoreFoundation 0x36816e05 __CFRunLoopDoSource1 + 164 21 CoreFoundation 0x368090a5 __CFRunLoopRun + 580 22 CoreFoundation 0x36808d7b CFRunLoopRunSpecific + 226 23 CoreFoundation 0x36808c89 CFRunLoopRunInMode + 60 24 GraphicsServices 0x32f7fe8c GSEventRunModal + 196 25 UIKit 0x30f95f94 -[UIApplication _run] + 572 26 UIKit 0x30f934d4 UIApplicationMain + 972 27 BuddyTV 0x000035e1 main + 72 28 BuddyTV 0x00003594 start + 40 ) terminate called after throwing an instance of 'NSException'

When in Zombie mode I get this message:

*** -[ActionSheetStringPicker performSelector:withObject:withObject:]: message sent to deallocated instance 0x6889750

Looks like there is an issue in this method [AbstractActionSheetPicker actionPickerDone:(id)sender] with the target and successAction being released before being called. I will keep looking into it and see if I can get a fix in. Any help would be appreciated though.

@indit
Copy link
Author

indit commented Feb 2, 2012

Yes it occurs in the sample project provided. What I meant to data being lost is that the contents of the UIPickerView is lost.

@eloe
Copy link
Contributor

eloe commented Feb 2, 2012

indit - I have found the issue and submitted a pull request for the fix. Its a 4 liner so you can copy it over to your solution for now.

@indit
Copy link
Author

indit commented Feb 3, 2012

Hi eloe, Thanks for the update. Updated my solution and works as expected.

@TimCinel
Copy link
Owner

TimCinel commented Feb 8, 2012

Have merged Eric's fix. Thanks again!

@TimCinel TimCinel closed this as completed Feb 8, 2012
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

3 participants