fxiels 发表于 2016-9-14 13:41:09

数据采集后台提示,[cameraDeviceArray objectAtIndex:1]数据越界的问题

    NSMutableArray* cameraDeviceArray = ;
    if (cameraDeviceArray.count > 0)
    {
      ];
    }

    这行代码];出现越界
出现问题的机器为iphone6s plus系统版本是9.2.1,可以排除是用户摄像头权限没有打开的问题。

佰锐科技-刘洋 发表于 2016-9-14 14:17:17

看看摄像头是不是被占用了 把你上面的代码改为: ];

fxiels 发表于 2016-9-14 15:51:58

下载了 美颜相机和faceu 在后台同时打开AnyChat视频都正常,应该不是摄像头占用的问题,三个app我用的都是是前置摄像头

佰锐科技-刘洋 发表于 2016-9-14 17:36:17

发日志上来 我们分析一下

fxiels 发表于 2016-9-19 10:29:59

本帖最后由 fxiels 于 2016-9-19 10:39 编辑

reason: *** -: index 1 beyond bounds
callStackSymbols: (
0 CoreFoundation 0x0000000180c25918 <redacted> + 148
1 libobjc.A.dylib 0x0000000180293f80 objc_exception_throw + 56
2 CoreFoundation 0x0000000180b0b828 <redacted> + 0
3 iIndustrial 0x00000001000bf318 iIndustrial + 422680
4 iIndustrial 0x000000010040f21c iIndustrial + 3895836
5 CoreFoundation 0x0000000180bcafc4 <redacted> + 20
6 CoreFoundation 0x0000000180bca7e4 <redacted> + 396
7 CoreFoundation 0x0000000180bca564 <redacted> + 60
8 CoreFoundation 0x0000000180c2fde4 <redacted> + 1532
9 CoreFoundation 0x0000000180b0b0f4 _CFXNotificationPost + 368
10 Foundation 0x00000001815e7e20 <redacted> + 340
11 CoreFoundation 0x0000000180bdcefc <redacted> + 24
12 CoreFoundation 0x0000000180bdc990 <redacted> + 540
13 CoreFoundation 0x0000000180bda690 <redacted> + 724
14 CoreFoundation 0x0000000180b09680 CFRunLoopRunSpecific + 384
15 GraphicsServices 0x0000000182018088 GSEventRunModal + 180
16 UIKit 0x0000000185980d90 UIApplicationMain + 204
17 iIndustrial 0x000000010006db8c iIndustrial + 88972
18 libdyld.dylib 0x00000001806aa8b8 <redacted> + 4
)
Process name: iIndustrial
dSYM UUID: FFFB9B18-2E79-35FA-9434-581B90AB21CC
Architecture: arm64
Start Address: 0x100058000
Slide Address: 0x58000



使用dsym文件分析工具 定位到代码282行具体代码 如下


281      if (cameraDeviceArray.count > 0) {
282          ];
283      }

有空帮忙分析一下 多谢出现问题的机器暂时就1台iphone6splus   ios 9.2.1版本

佰锐科技-刘洋 发表于 2016-9-19 13:41:42

你好 你用这台出现问题的机器跑下我们的demo 切换下 前后摄像头试试

fxiels 发表于 2016-9-19 13:44:29

你好 机器是用户的,我们用talkingdata收集到的奔溃日志具体是哪个客户没办法知道 也不可能让用户去跑demo

佰锐科技-刘洋 发表于 2016-9-19 14:17:56

282行这段代码改为:];   试一试

AlanWithHX 发表于 2017-7-21 11:29:10

这个问题遇到过,demo方法默认选择第二项,但是用户如果后置摄像头坏掉了,就只有一项了,改成0是可以的
页: [1]
查看完整版本: 数据采集后台提示,[cameraDeviceArray objectAtIndex:1]数据越界的问题