【发布时间】:2017-07-12 23:13:19
【问题描述】:
我现在可以从我的应用程序的照片库中选择一张图片,但由于某种原因,当用户尝试像以前一样选择一张图片时,我现在遇到了崩溃 (EXC_BAD_ACCESS)。
我尝试添加所有隐私条目作为测试,但没有成功。环顾四周寻找修复程序,我注意到我的日志与没有设置隐私密钥的日志相似,但是我在信息 plist 中有正确的条目,这与我有一段时间一样,我什至在尝试时收到了权限警报打开选择器。这是我的信息列表条目:
我拥有的堆栈如下:
2 CoreFoundation 0x000000010a43d2b4 +[NSArray arrayWithObjects:count:] + 52,
3 CoreData 0x00000001184abe90 -[NSSQLEntity _generateInverseRelationshipsAndMore] + 1104,
4 CoreData 0x00000001185f58dc -[NSSQLModel _generateModel:error:] + 1708,
5 CoreData 0x00000001184a5dde -[NSSQLModel initWithManagedObjectModel:configurationName:retainHashHack:brokenHashVersion:] + 366,
6 CoreData 0x00000001184a5142 -[NSSQLCore initWithPersistentStoreCoordinator:configurationName:URL:options:] + 882,
7 CoreData 0x00000001185a20b9 __91-[NSPersistentStoreCoordinator addPersistentStoreWithType:configuration:URL:options:error:]_block_invoke + 1081,
8 CoreData 0x00000001185b12f4 gutsOfBlockToNSPersistentStoreCoordinatorPerform + 196,
9 libdispatch.dylib 0x000000010f78305c _dispatch_client_callout + 8,
10 libdispatch.dylib 0x000000010f760de6 _dispatch_barrier_sync_f_invoke + 346,
11 CoreData 0x000000011859e785 _perform + 213,
12 CoreData 0x00000001184a4b87 -[NSPersistentStoreCoordinator addPersistentStoreWithType:configuration:URL:options:error:] + 567,
13 PhotoLibraryServices 0x000000011c6a4604 +[PLManagedObjectContext _openAndMigrateStoreWithURL:options:coordinator:forceSourceModelVersion:] + 481,
14 PhotoLibraryServices 0x000000011c6a5a3e +[PLManagedObjectContext _configurePersistentStoreCoordinator:] + 312,
15 AssetsLibraryServices 0x000000011cbfb6d9 __pl_dispatch_sync_block_invoke + 25,
16 libdispatch.dylib 0x000000010f78305c _dispatch_client_callout + 8,
17 libdispatch.dylib 0x000000010f760de6 _dispatch_barrier_sync_f_invoke + 346,
18 AssetsLibraryServices 0x000000011cbfb6ba pl_dispatch_sync + 70,
19 PhotoLibraryServices 0x000000011c6a661c +[PLManagedObjectContext sharedPersistentStoreCoordinator] + 167,
20 PhotoLibraryServices 0x000000011c6a221f -[PLManagedObjectContext initWithConcurrencyType:useSharedPersistentStoreCoordinator:] + 139,
21 PhotoLibraryServices 0x000000011c6a20a4 +[PLManagedObjectContext contextForPhotoLibrary:name:] + 181,
22 PhotoLibraryServices 0x000000011c60cd88 -[PLPhotoLibrary _loadDatabase:] + 531,
23 PhotoLibraryServices 0x000000011c60295d -[PLPhotoLibrary initWithTransientContext:name:] + 587,
24 Photos 0x000000010b4468f3 __30-[PHPhotoLibrary photoLibrary]_block_invoke + 59,
25 libdispatch.dylib 0x000000010f78305c _dispatch_client_callout + 8,
26 libdispatch.dylib 0x000000010f7689a1 dispatch_once_f + 503,
27 Photos 0x000000010b4468b2 -[PHPhotoLibrary photoLibrary] + 143,
28 Photos 0x000000010b44755c -[PHPhotoLibrary registerChangeObserver:] + 189,
29 Photos 0x000000010b4317f0 -[PHImageManager init] + 419,
30 Photos 0x000000010b434163 -[PHCachingImageManager init] + 41,
31 PhotosUI 0x0000000128efa305 -[PUAlbumListViewController initWithSpec:isRootSharedAlbumList:] + 137,
32 PhotosUI 0x0000000128e91641 -[PUUIAlbumListViewController init] + 66,
33 UIKit 0x000000010be7166c -[UIImagePickerController _createInitialController] + 712,
34 UIKit 0x000000010be718ad -[UIImagePickerController _setupControllersForCurrentSourceType] + 45,
35 UIKit 0x000000010be70ca5 -[UIImagePickerController viewWillAppear:] + 67,
36 UIKit 0x000000010bc3abad -[UIViewController _setViewAppearState:isAnimating:] + 447,
37 UIKit 0x000000010bc3b3c3 -[UIViewController __viewWillAppear:] + 147,
38 UIKit 0x000000010bc10f87 __56-[UIPresentationController runTransitionForCurrentState]_block_invoke + 1041,
39 UIKit 0x000000010ba9e853 _runAfterCACommitDeferredBlocks + 318,
40 UIKit 0x000000010ba8b81c _cleanUpAfterCAFlushAndRunDeferredBlocks + 532,
41 UIKit 0x000000010babd560 _afterCACommitHandler + 137,
42 CoreFoundation 0x000000010a4c7717 __CFRUNLOOP_IS_CALLING_OUT_TO_AN_OBSERVER_CALLBACK_FUNCTION__ + 23,
43 CoreFoundation 0x000000010a4c7687 __CFRunLoopDoObservers + 391,
44 CoreFoundation 0x000000010a4ac720 __CFRunLoopRun + 1200,
45 CoreFoundation 0x000000010a4ac016 CFRunLoopRunSpecific + 406,
46 GraphicsServices 0x00000001115b2a24 GSEventRunModal + 62,
47 UIKit 0x000000010ba92134 UIApplicationMain + 159,
在调试期间在模拟器和设备中以及在 Testflight 构建中都会发生崩溃,但有趣的是 AppStore 上提供的应用程序运行良好。
【问题讨论】:
-
错误信息是什么?
-
看起来像一个核心数据问题,可能就像无效索引一样简单。不应该与隐私条目有任何关系。
-
rmaddy:我在控制台上什么也没有,只有 EXC_BAD_ACCESS。 NRith:是的,但似乎来自选择器,我没有使用核心数据......
-
可能值得删除您的派生数据并重建。也许 info.plist 没有被正确处理。它似乎与
missing privacy msgs崩溃相匹配 -
好的,我试过了,不行=D..谢谢
标签: ios uiimagepickercontroller