Kjuly / ALAssetsLibrary-CustomPhotoAlbum

A nice ALAssetsLibrary category for saving images & videos into custom photo album.
http://www.touch-code-magazine.com/ios5-saving-photos-in-custom-photo-album-category-for-download/
MIT License
405 stars 101 forks source link

Multithreading violation in iOS 8.3+ #36

Open joshuafeldman opened 9 years ago

joshuafeldman commented 9 years ago

It seems that running with -com.apple.CoreData.ConcurrencyDebug 1 generates a crash when using saveVideo:toAlbum:completion: on iOS 8.3 and higher. I am still working through finding the exact issue but I suspect something related to PhotoKit.

The crash is [NSManagedObjectContext __Multithreading_Violation_AllThatIsLeftToUsIsHonor__] it is reproducible with both the device and simulator. Seems like it is trying to deallocate a batch request of some sort.

I will let you know if I determine the root cause. If anyone has seen this issue please let me know. This is debugging with Xcode 6.4

joshuafeldman commented 9 years ago

Looks like there is an open radar for this http://www.openradar.me/20705256

joshuafeldman commented 9 years ago

You could probably get around this issue if you use PhotoKit in iOS 8.0+

Kjuly commented 9 years ago

Thx for the feedback, yeah, i suggest to use PhotoKit from iOS 8.0 or later. If u support previous versions as well, it's still better to import the PhotoKit framework for 8.0+. I'll take a look at it in my spare time :)

jhollida24 commented 9 years ago

@joshuafeldman hey Josh, this is definitely not the right venue for this, but GitHub doesn't have private messaging and I couldn't find you on Twitter.

You filed an issue with the facebook sdk (which has since turned off issues on their project) that said you couldn't show the FBMessengerDialog on iPad. On iPhone it works fine. I have the same issue.

-[FBDialogs canPresentMessageDialogWithParams:] always returns NO

screen shot 2015-07-09 at 10 35 17 am

It appears you got a response from the facebook team, but I'm not able to see it. Do you remember what they told you?

Again, I apologize for this off topic post.

joshuafeldman commented 9 years ago

@jhollida24 Facebook does not support the Message Dialog on iPad. There is currently no supported way to show it. Wish I had a more positive answer

joshuafeldman commented 9 years ago

@Kjuly it is actually pretty easy to do. Found this gist while searching around https://gist.githubusercontent.com/roana0229/3e3ba5c1926a40ad8486/raw/a6bd7e3ce8b3d21b0e740f04f1c294fe811e5cec/PhotoAlbumUtil.swift

jhollida24 commented 9 years ago

Darn. Thanks for the response.

Kjuly commented 9 years ago

@jhollida24 ah, cool, thx for sharing :D