【问题标题】:Camera crash randomly相机随机崩溃
【发布时间】:2016-07-13 12:58:50
【问题描述】:

我的应用在 99% 的情况下运行良好,但有 1% 在打开相机后崩溃,我们遇到了随机崩溃。这是来自 Crashlytics 的堆栈跟踪:

Crashed: com.apple.camera.avcapturesession
0  libobjc.A.dylib                0x194d8fbd0 objc_msgSend + 16
1  UIKit                          0x1890df21c -[UIViewAnimationState animationForLayer:forKey:forView:] + 712
2  UIKit                          0x188e55724 -[UIViewAnimationState actionForLayer:forKey:forView:] + 44
3  UIKit                          0x188e19f44 -[UIView(CALayerDelegate) actionForLayer:forKey:] + 140
4  QuartzCore                     0x188774e88 -[CALayer actionForKey:] + 104
5  QuartzCore                     0x18876a86c actionForKey(CALayer*, CA::Transaction*, NSString*) + 100
6  QuartzCore                     0x18876a6d8 CA::Layer::begin_change(CA::Transaction*, unsigned int, objc_object*&) + 176
7  QuartzCore                     0x18876d6a0 CA::Layer::setter(unsigned int, _CAValueType, void const*) + 156
8  QuartzCore                     0x188774e14 -[CALayer setOpacity:] + 48
9  UIKit                          0x188e19a5c -[UIView(Rendering) setAlpha:] + 104
10 corporate                      0x1005a3e5c -[GSDK_GTMReadMonitorInputStream .cxx_destruct]
11 corporate                      0x1005a4398 -[GSDK_GTMReadMonitorInputStream .cxx_destruct]
12 CoreFoundation                 0x184614ae4 __CFNOTIFICATIONCENTER_IS_CALLING_OUT_TO_AN_OBSERVER__ + 20
13 CoreFoundation                 0x184553220 _CFXNotificationPost + 2060
14 Foundation                     0x185452cc0 -[NSNotificationCenter postNotificationName:object:userInfo:] + 72
15 AVFoundation                   0x182efd9c4 -[AVCaptureSession _setRunning:] + 312
16 CameraKit                      0x18aac1adc __38-[CAMCaptureController _startPreview:]_block_invoke829
17 libdispatch.dylib              0x1953c13ac _dispatch_call_block_and_release + 24
18 libdispatch.dylib              0x1953c136c _dispatch_client_callout + 16
19 libdispatch.dylib              0x1953cb4c0 _dispatch_queue_drain + 1216
20 libdispatch.dylib              0x1953c4474 _dispatch_queue_invoke + 132
21 libdispatch.dylib              0x1953cd224 _dispatch_root_queue_drain + 664
22 libdispatch.dylib              0x1953ce75c _dispatch_worker_thread3 + 108
23 libsystem_pthread.dylib        0x19559d2e4 _pthread_wqthread + 816
24 libsystem_pthread.dylib        0x19559cfa8 start_wqthread + 4

我不完全了解这次崩溃的来源,但我发现我可能与 GoogleNetworkingUtilities 有关。

【问题讨论】:

    标签: ios iphone ios-camera


    【解决方案1】:

    try this

    你确定你没有做任何会影响后台线程中任何 UI 元素的事情吗?

    【讨论】:

      【解决方案2】:

      如果您使用的是 iOS 10,则需要将 Privacy - Camera Usage Description 添加到您的 Info.plist 文件中

      【讨论】:

      • 我没有用过 iOs 10,它正在 iOs 9 上发生。
      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 2014-10-17
      • 2013-08-23
      • 2013-04-21
      • 2011-08-13
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多