嗨,我在尝试运行iOS平台的更新源代码时出错了。
没有修改源代码中的任何内容。
一切正常,除了我打开传感器融合页面。它冻结后,我打开该页和下面的错误显示出来。
下面是Xcode中输出到命令行的内容。
=================================================================
主线程检查器:在后台线程上调用的UI API:—[UIView setNeedsDisplay]
PID:6667,TID:2264582,线程名称:(无),队列名称:com.apple.root.default-qos,qos:21
回溯:
4对话框\u IoT \u ios 0x000000010403594c-[GLModelView setModel:]+140
5对话框\u IoT \u ios 0x0000000104028170 \u 35-[TeapotViewController viewDidLoad]\u块\u调用+388
6 libdispatch.dylib 0x00000001056d12cc调度调用块释放+24
7 libdispatch.dylib 0x00000001056d128c\u dispatch\u client\u callout+16
8 libdispatch.dylib 0x00000001056dd3dc\u dispatch\u queue\u override\u invoke+984
9 libdispatch.dylib 0x00000001056e29d0\u dispatch\u root\u queue\u drain+624
10 libdispatch.dylib 0x00000001056e26f4\u调度\u工作线程3+136
11 libsystem\u pthread.dylib 0x0000000185c0f06c\u pthread\u wqthread+1268
12 libsystem_pthread.dylib 0x0000000185c0eb6c启动\u wqthread+4
2018-03-13 18:11:56.476348+0800 dialog\u IoT\u ios[6667:2264582][报告]主线程检查器:在后台线程上调用的UI API:-[UIView setNeedsDisplay]
PID:6667,TID:2264582,线程名称:(无),队列名称:com.apple.root.default-qos,qos:21
回溯:
4对话框\u IoT \u ios 0x000000010403594c-[GLModelView setModel:]+140
5对话框\u IoT \u ios 0x0000000104028170 \u 35-[TeapotViewController viewDidLoad]\u块\u调用+388
6 libdispatch.dylib 0x00000001056d12cc调度调用块释放+24
7 libdispatch.dylib 0x00000001056d128c\u dispatch\u client\u callout+16
8 libdispatch.dylib 0x00000001056dd3dc\u dispatch\u queue\u override\u invoke+984
9 libdispatch.dylib 0x00000001056e29d0\u dispatch\u root\u queue\u drain+624
10 libdispatch.dylib 0x00000001056e26f4\u调度\u工作线程3+136
11 libsystem\u pthread.dylib 0x0000000185c0f06c\u pthread\u wqthread+1268
12 libsystem_pthread.dylib 0x0000000185c0eb6c启动\u wqthread+4
2018-03-13 18:11:56.561553+0800 dialog\u IoT\u ios[6667:2264582]-[AGXA11FamilyCommandBuffer renderCommandEncoderWithDescriptor:],第114行:错误“命令编码器已编码到此命令缓冲区”
-[AGXA11FamilyCommandBuffer renderCommandEncoderWithDescriptor:]:114:失败的断言“命令编码器已编码到此命令缓冲区”
嗨,pureform,
感谢您指出,请查找以下问题的解决方法:
在TeapotViewController.m中,使用viewDidLoad方法(第43行)。
替换:
dispatch\u async(dispatch\u get\u global\u queue(dispatch\u queue\u PRIORITY\u DEFAULT,0)^{
if([[SensorController sharedSensorController]getDeviceType]==1){
self.modelView.model=[GLModel modelWithContentsOfFile:@“Dialog\u Watch2.obj”];
}其他{
self.modelView.model=[GLModel modelWithContentsOfFile:@“DIAGR\u DW\u Final\u Dcase.obj”];
}
[self.modelView显示];
});
使用:
dispatch\u async(dispatch\u get\u global\u queue(dispatch\u queue\u PRIORITY\u DEFAULT,0)^{
GLModel*模型;
if([[SensorController sharedSensorController]getDeviceType]==1){
model=[GLModel modelWithContentsOfFile:@“Dialog_Watch2.obj”];
}其他{
model=[GLModel modelWithContentsOfFile:@“DIAGR_DW_Final_Dcase.obj”];
}
dispatch\u async(dispatch\u get\u main\u queue()^{
self.modelView.model=模型;
});
});
谢谢你的对话