Glnn/GWAssetHelper — Issue #1: Weird crash with iOS 5
Author: gtalusan
Created: 2012-01-04 07:18:15+00:00
State: open

Hi Glenn,

I've checked out your project and I've written some sample code to use it:

```objective-c
UIImageView *imageView = [[UIImageView alloc] initWithFrame:[UIScreen mainScreen].bounds];
ALAsset *asset = [self.assets objectAtIndex:index];
NSLog(@"%@", asset.defaultRepresentation.url);
[imageView setThumbnailWithAssetURL:asset.defaultRepresentation.url];
```
My asset.defaultRepresentation.url is @"assets-library://asset/asset.JPG?id=B7BFDE8F-B6C4-406F-87C4-DD4CF6F3B68E&ext=JPG", but I get a weird crash in the blocks for either thumbnailWithAssetURL and fullScreenImageWithAssetURL:

```objective-c
*** Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '-[__NSCFSet addObject:]: attempt to insert nil'
*** First throw call stack:
(0x33da18bf 0x33ff11e5 0x33da17b9 0x33da17db 0x33cf9e0b 0x1458f 0x157bd 0x3717339d 0x14153 0x13ce3 0x15fab 0x3718c6b5 0x371e761b 0x3718f363 0x3718ef53 0x37183673 0x37183349 0xf435 0x3724bf07 0x371ddc1d 0x37409509 0x37158d69 0x371578b7 0x371643cd 0x3716420f 0x37163ddd 0x3714a4ed 0x37149d2d 0x3057cdf3 0x33d75553 0x33d754f5 0x33d74343 0x33cf74dd 0x33cf73a5 0x3057bfcd 0x37178743 0x2763 0x21d4)
```

FWIW, I'm using an ARC project with -fno-objc-arc on all of the GWAssetHelper files. I understand the stacktrace above is less than helpful, but it's all I've got.

Any ideas?