15

I know this thread existed before, but was closed as only appearing in iOS5 beta 6. By now I have the Golden Master of iOS 5 on my phone and that error still appears.

This is happening when I create a UIImagePickerController with a sourceType of UIImagePickerControllerSourceTypePhotoLibrary more than 5 times. I am, as far as I can tell, creating and releasing the previous UIImagePickerController correctly each time.

Edit: adding code, as requested.

UIImagePickerController *ipc = [[UIImagePickerController alloc] init];
ipc.delegate = self;
ipc.sourceType = UIImagePickerControllerSourceTypePhotoLibrary;
[self presentModalViewController:ipc animated:YES];
[ipc release];

Later, I call [self dismissModalViewControllerAnimated:YES]; when -imagePickerController:didFinishPickingImage:editingInfo: gets called.

6
  • 1
    IOS 5 is still not released (as of 10/7/2011) and under NDA, so you're probably better off asking on Apple's developer forums...
    – John T
    Oct 7, 2011 at 16:28
  • Also, this sounds like something that might be the subject for a bug report, if you believe your usage of UIImagePickerController is correct: bugreport.apple.com
    – Brad Larson
    Oct 7, 2011 at 17:28
  • 2
    iOS 5 is out now, and I have this problem. Answers pls! Oct 14, 2011 at 20:15
  • Post some code, post the link to the previous discussed thread and we could talk.
    – Oleg Danu
    Oct 15, 2011 at 12:06
  • @OlegDanu previous thread is dull as ditchwater: stackoverflow.com/questions/7167373/… basically just said "this only happens in beta 6, use beta 7". Oct 16, 2011 at 4:23

6 Answers 6

26
+50

The problem happens in Apple examples, so the best bet is to ignore.

1
  • 3
    Filed bug report, rdar://10306359 Oct 18, 2011 at 21:21
0

Later, I call [self dismissModalViewControllerAnimated:YES]; when -imagePickerController:didFinishPickingImage:editingInfo: gets called.

Have you tried to set the delegate of the image picker to nil, in didFinishPickingImage ?

0
0

This is not your fault.It may be vary in different version.Apple should solve this issue.Main thing is that you should check for memory leak is important.Thanks

0

Try this UIImagePickerControllerSourceTypePhotoLibrary Error

I hope it will help

0

try setting

picker=nil

in the

- (void)imagePickerController:(UIImagePickerController *)picker didFinishPickingMediaWithInfo:(NSDictionary *)info
{
[self dismissModalViewControllerAnimated:YES];
picker = nil;
}

it works for me......

1
  • I don't want to sound rude or anything but setting 'picker' to null in that context will do absolutely nothing. All it will do is mark the variable in that context to nil. It won't release any memory (as it is held by the caller of that method I'm guessing). The fact that it 'works' for you could be based on other factors, I'm guessing.
    – Dandré
    Jan 28, 2013 at 12:02
-1

Try this one, i am sure this is gonna help you;

- (void)viewDidAppear:(BOOL)animated
{
    [super viewDidAppear:animated];

    [self setModalInPopover:YES];
}

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.