Note that there are some explanatory texts on larger screens.

plurals
  1. POUIImagePickerController source type photo library crash in Ipad iOS7
    primarykey
    data
    text
    <p>I try to present a UIImagePickerController from rect using this code:</p> <pre><code>UIImagePickerController* imgPickerController = [[UIImagePickerController alloc] init]; imgPickerController.delegate = self; imgPickerController.sourceType = UIImagePickerControllerSourceTypePhotoLibrary; imgPickerController.mediaTypes = [[NSArray alloc] initWithObjects:(NSString *)kUTTypeImage, nil]; imgPickerController.allowsEditing = NO; _popover = [[UIPopoverController alloc] initWithContentViewController:imgPickerController]; [_popover setDelegate:self]; [_popover presentPopoverFromRect:CGRectMake(195, 55, 70, 64) inView:self.view permittedArrowDirections:UIPopoverArrowDirectionUp animated:NO]; </code></pre> <p>But sometimes crash happends... NO always, sometimes run, sometimes crash... This is the crash LOG:</p> <pre><code>Thread 0: Crashed: com.apple.main-thread 0 CoreText 0x2e4c0d1e TComponentFont::GetRawBoundingBox() const + 13 1 CoreText 0x2e4b3ba7 TBaseFont::CalculateFontMetrics(bool) const + 110 2 CoreText 0x2e4b3ba7 TBaseFont::CalculateFontMetrics(bool) const + 110 3 CoreText 0x2e4c0d0b TComponentFont::CalculateFontMetrics(bool) const + 34 4 CoreText 0x2e4b39fd TBaseFont::InitFontMetrics() const + 44 5 CoreText 0x2e4b3839 TBaseFont::GetStrikeMetrics(float, CGAffineTransform const*, bool) const + 104 6 CoreText 0x2e4b3603 TFont::InitStrikeMetrics() const + 38 7 CoreText 0x2e4b35b9 CTFontGetAscent + 92 8 GraphicsServices 0x32a17245 GSFontEnsureExtraData + 228 9 GraphicsServices 0x32a19361 GSFontGetLatin1LayoutInfo + 44 10 UIFoundation 0x359a252d -[UIFont(UIFont_AttributedStringDrawing) _getLatin1GlyphMapping:andAdvanceMapping:] + 12 11 UIFoundation 0x35978e61 __NSStringDrawingEngine + 3784 12 UIFoundation 0x3597df7f -[NSAttributedString(NSExtendedStringDrawing) boundingRectWithSize:options:context:] + 898 13 UIKit 0x3085dcab -[UILabel _updateScaledMetricsForRect:] + 594 14 UIKit 0x306023d3 -[UILabel setAdjustsFontSizeToFitWidth:] + 206 15 PhotosUI 0x3466608b -[PUFlatWhiteInterfaceTheme configureAlbumListSubtitleLabel:] 16 PhotosUI 0x345bc141 +[PUAlbumListCellContentView _updateLabelGlobalCachedSizes] 17 libobjc.A.dylib 0x38588231 _class_initialize + 572 18 libobjc.A.dylib 0x3858f7a7 lookUpImpOrForward + 130 19 libobjc.A.dylib 0x38587feb _class_lookupMethodAndLoadCache3 + 34 20 libobjc.A.dylib 0x38587db9 _objc_msgSend_uncached + 24 21 PhotosUI 0x345bb059 -[PUAlbumListTableViewController tableView:cellForRowAtIndexPath:] 22 UIKit 0x3069aa5b -[UITableView _createPreparedCellForGlobalRow:withIndexPath:] + 410 23 UIKit 0x30642e7d -[UITableView _updateVisibleCellsNow:] + 1804 24 UIKit 0x30642699 -[UITableView layoutSubviews] + 184 25 UIKit 0x30568da3 -[UIView(CALayerDelegate) layoutSublayersOfLayer:] + 346 26 QuartzCore 0x301efc6b -[CALayer layoutSublayers] + 142 27 QuartzCore 0x301eb47b CA::Layer::layout_if_needed(CA::Transaction*) + 350 28 UIKit 0x3057dc1b -[UIView(Hierarchy) layoutBelowIfNeeded] + 530 29 PhotosUI 0x3467ec55 -[PUAbstractAlbumListViewController viewDidLayoutSubviews] 30 UIKit 0x30568e79 -[UIView(CALayerDelegate) layoutSublayersOfLayer:] + 560 31 QuartzCore 0x301efc6b -[CALayer layoutSublayers] + 142 32 QuartzCore 0x301eb47b CA::Layer::layout_if_needed(CA::Transaction*) + 350 33 QuartzCore 0x301eb30d CA::Layer::layout_and_display_if_needed(CA::Transaction*) + 16 34 QuartzCore 0x301ead1f CA::Context::commit_transaction(CA::Transaction*) + 230 35 QuartzCore 0x301eab2f CA::Transaction::commit() + 314 36 UIKit 0x305610c3 _afterCACommitHandler + 126 37 CoreFoundation 0x2ddc11cd __CFRUNLOOP_IS_CALLING_OUT_TO_AN_OBSERVER_CALLBACK_FUNCTION__ + 20 38 CoreFoundation 0x2ddbeb71 __CFRunLoopDoObservers + 284 39 CoreFoundation 0x2ddbeeb3 __CFRunLoopRun + 730 40 CoreFoundation 0x2dd29c27 CFRunLoopRunSpecific + 522 41 CoreFoundation 0x2dd29a0b CFRunLoopRunInMode + 106 42 GraphicsServices 0x32a1d283 GSEventRunModal + 138 43 UIKit 0x305cd049 UIApplicationMain + 1136 44 Puzz! 0x00032665 main (main.m:16) </code></pre> <p>Thanks!</p> <p><strong>EDIT</strong></p> <p>Finally, I decided use a AssetsLibrary framework to create a custom UIImagePickerController using this MyImagePicker sample: </p> <p><a href="https://developer.apple.com/library/ios/samplecode/myimagepicker/Introduction/Intro.html" rel="nofollow">https://developer.apple.com/library/ios/samplecode/myimagepicker/Introduction/Intro.html</a></p>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload