Crash when selecting a photo from a shared photo stream #58

Closed
smartbot opened this Issue Sep 26, 2013 · 4 comments

Projects

None yet

4 participants

@smartbot

Exception: *** setObjectForKey: object cannot be nil (key: UIImagePickerControllerOriginalImage)

I have been getting this exception at the following line in ELCImagePickerController.m:

[workingDictionary setObject:img forKey:@"UIImagePickerControllerOriginalImage"];

It only occurs when I select a photo from a photo stream that someone else is sharing. Does anyone have any idea what is going on?

I tried this on a iPhone 5 and 5S with the same issue. It seems to work fine on the iPad though.

@mfrawley
mfrawley commented Nov 4, 2013

Bump, we're experiencing it also, anyone know more, I can't repro myself though, even with a shared photo stream, is it really iPhone5-specific?

@jvanmetre
Contributor

I tried on both an iPhone 4 and an iPhone 5s running iOS 7, and can't seem to reproduce this issue.
Do you have any more info or a longer backtrace that you can share?

@iworkinprogress

I've run into this same problem.

This line in ELCImagePickerController seems to be returning nil:
ALAssetRepresentation *assetRep = [asset defaultRepresentation];

Seems like it could be from a shared photo stream where the image hasn't downloaded yet:
http://stackoverflow.com/questions/18079776/how-to-get-a-alassetrepresentation-of-a-shared-photostream-alasset

My solution for now was the simply disable shared photo streams:
[ALAssetsLibrary disableSharedPhotoStreamsSupport];

Not ideal...but no more crashing.

@mfrawley

The nil value here needs to be checked, the better fix is to check it and observe the notification for when the shared stream loads. Can anyone review my fix?

@jvanmetre jvanmetre closed this Jan 20, 2014
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment