ALAssetRepresentation crash in iOS 6

66 views
Skip to first unread message

Leonardo Parro Jr

unread,
Sep 29, 2012, 10:15:35 PM9/29/12
to iphonesdkd...@googlegroups.com
Hi,

Using ALAssetRepresentation methods in iOS 6 crashes..

ALAssetRepresentation *rep = [asset defaultRepresentation];

CGImageRef imgRef = [rep fullScreenImage]; --> crashes here!


But, this code works fine in previous version (iOS 5) & we're updating the app to support iOS 6.
Anyone have encountered this problem in iOS 6?

Thanks

-J

Jesse Tayler

unread,
Sep 29, 2012, 11:39:28 PM9/29/12
to iphonesdkd...@googlegroups.com
what is your backtrace?




--
You received this message because you are subscribed to the Google Groups "iPhone SDK Development" group.
To post to this group, send email to iphonesdkd...@googlegroups.com.
To unsubscribe from this group, send email to iphonesdkdevelop...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/iphonesdkdevelopment?hl=en.

Leonardo Parro Jr

unread,
Sep 30, 2012, 6:35:50 AM9/30/12
to iphonesdkd...@googlegroups.com
Hi Jesse,

Thanks for the response.
I've attached the sample screenshot in debug.
I hope you can notify me if you can spot something…

Btw, I'm using ELCImagePickerController (https://github.com/elc/ELCImagePickerController).

Thanks.
-J
Screen Shot 2012-09-30 at 6.12.40 PM.png

Jesse Tayler

unread,
Sep 30, 2012, 12:27:14 PM9/30/12
to iphonesdkd...@googlegroups.com

open source is fantastic! but beware of what you use -- some GIT is good, some GIT maybe not so much. 

I have no idea what's up here, but it would seem a memory related issue.

did you try running the analyzer ?

I don't see anything obviously wrong at a glance of the code.



<Screen Shot 2012-09-30 at 6.12.40 PM.png>

Leonardo Parro Jr

unread,
Sep 30, 2012, 12:58:04 PM9/30/12
to iphonesdkd...@googlegroups.com
Hi Jesse,

Thanks for the response.

It turns out that the culprit of the bug is that, above lines of code I've put up dynamically an UIAlertView and runs it in background thread.


 [alert performSelectorInBackground:@selector(show) withObject:nil];


I've put an alert just to prompt user it's still processing the photos selected…say, if user chooses 50-100 photos & will take a while to process..

I also can't use simply call like [alert show]; since it doesn't display in the foreground.


Here's the full code of the method:

http://pastebin.com/3WhgHzfa


So for now, I've just commented that alertView call & it fixes the crash..

But, I'm still stucked how to present the user an alertView or just simply a view to notify user it's still processing in the background..

I can't just simply call addSubView since it won't also display

@interface ELCImagePickerController : UINavigationController {


id delegate;

}



Thanks

-J

Reply all
Reply to author
Forward
0 new messages