你好,请问只是出现报错还是直接闪退?报错是必现的吗
onshow中使用cameraContext.startRecord 报错,闪退先贴代码: [代码]onShow: [代码][代码]function[代码] [代码]() {[代码][代码] [代码][代码]var[代码] [代码]that = [代码][代码]this[代码][代码];[代码][代码] [代码][代码]that.ctx = wx.createCameraContext()[代码][代码] [代码][代码]that.ctx.startRecord({[代码][代码] [代码][代码]success: (res) => {[代码][代码] [代码][代码]console.log([代码][代码]'startRecord'[代码][代码])[代码][代码] [代码][代码]setTimeout([代码][代码]function[代码] [代码]() {[代码][代码] [代码][代码]that.ctx.stopRecord({[代码][代码] [代码][代码]success: (res) => {[代码][代码] [代码][代码]that.setData({[代码][代码] [代码][代码]src: res.tempVideoPath[代码][代码] [代码][代码]})[代码][代码] [代码][代码]}[代码][代码] [代码][代码]})[代码][代码] [代码][代码]}, 5000)[代码][代码] [代码][代码]}[代码][代码] [代码][代码]})[代码][代码] [代码][代码]},[代码],这种写法在某一个版本库更新之后,突然如下错误报错: [图片] 然后在onshow中做了1秒延时,初步解决了这个问题,代码如下: [代码]onShow: [代码][代码]function[代码] [代码]() {[代码][代码] [代码][代码]var[代码] [代码]that = [代码][代码]this[代码][代码];[代码][代码] [代码][代码]that.ctx = wx.createCameraContext()[代码][代码] [代码][代码]setTimeout([代码][代码]function[代码][代码](){[代码][代码] [代码][代码]that.ctx.startRecord({[代码][代码] [代码][代码]success: (res) => {[代码][代码] [代码][代码]console.log([代码][代码]'startRecord'[代码][代码])[代码][代码] [代码][代码]setTimeout([代码][代码]function[代码] [代码]() {[代码][代码] [代码][代码]that.ctx.stopRecord({[代码][代码] [代码][代码]success: (res) => {[代码][代码] [代码][代码]that.setData({[代码][代码] [代码][代码]src: res.tempVideoPath[代码][代码] [代码][代码]})[代码][代码] [代码][代码]}[代码][代码] [代码][代码]})[代码][代码] [代码][代码]}, 5000)[代码][代码] [代码][代码]}[代码][代码] [代码][代码]})[代码][代码] [代码][代码]},1000)[代码][代码] [代码][代码]},[代码],但是经过多次真机测试,发现华为p9plus中,每次就会有一次微信闪退,小米机器未发现闪退现象,oppo中有闪退,但是几率特别小,可能几十次出现一次。请问这种情况该怎么解决? 还有,现在联系官方是在是太费劲了,能不能有客服保证开发人员能联系上呢。
2018-05-14