Re: linux 3.4.2SDK 打开设备后无论是在中控还是手机涂鸦APP上控制设备死机
静态库是不会进行strip的
静态库是不会进行strip的
可以试下用addr2line找下0x44e2e308对应的函数名
addr2line也查找不出,有没有什么其他方法。
是否需要我们这边寄个机器给你们跑源码,这样感觉快一点
死机的时候,gdb输入bt打印一下堆栈。
此外,死机的程序,是直接跑的demo,还是基于SDK开发的应用
死机是直接跑你们的demo,不是自己开发的应用;我试着打印堆栈看一下
这个是死机时用bt参数打印的信息:
Thread 8 "cmmod" received signal SIGSEGV, Segmentation fault.
[Switching to LWP 1019]
0x00000184 in ?? ()
(gdb) bt
#0 0x00000184 in ?? ()
#1 0x0010627c in __dp_event_cb (data=0x43b2fbd4)
at /root/workspace_temp/EmbedSDKs/ty_integrated_sdk/ty_integrated_sdk/sdk/home_ctrl_dev/src/tuya_home_ctrl_dev/tuya_home_ctrl_dev.c:1395
#2 0x000936f8 in _event_node_dispatch (event=0x45634e60, data=0x43b2fbd4)
at /root/workspace_temp/EmbedSDKs/ty_integrated_sdk/ty_integrated_sdk/sdk/base_event/src/base_event.c:155
#3 0x00093c28 in ty_publish_event (
name=0x43b2fbfc "dp-vdevo166968855516264", data=0x43b2fbd4)
at /root/workspace_temp/EmbedSDKs/ty_integrated_sdk/ty_integrated_sdk/sdk/base_event/src/base_event.c:342
#4 0x0012b718 in __frame_recv_std_dp_finish (
dev_id=0x43b2fd58 "vdevo166968855516264", dp=0x45637610, cnt=1,
time=2147483647)
at /root/workspace_temp/EmbedSDKs/ty_integrated_sdk/ty_integrated_sdk/sdk/svc_ctrl_center/src/tuya_ctrl_frame.c:68
#5 0x0012d954 in __frame_handle_recv_dp (pRcvCmd=0x45620940, cid=0x0,
mbid=0x0, dps_js=0x456344a8)
at /root/workspace_temp/EmbedSDKs/ty_integrated_sdk/ty_integrated_sdk/sdk/svc_ctrl_center/src/tuya_ctrl_frame.c:645
#6 0x0012deb8 in __frame_recv_cb (msg=0x4562ce48)
at /root/workspace_temp/EmbedSDKs/ty_integrated_sdk/ty_integrated_sdk/sdk/svc_ctrl_center/src/tuya_ctrl_frame.c:747
--Type <RET> for more, q to quit, c to continue without paging--
从GDB运行情况来看确实是死在SDK里面的,是否这边寄机器过来方便你们调试??
这个问题还在吗?有没有环境,把我加到你的APP的家庭下,操作下
在涂鸦tuya_home_control_sync.c里面的tuya_home_control_dev_room_sync_event函数打开设备(如下面代码),跑demo就会死。图片是代码修改的地方和死机的的gdb打印。
OPERATE_RET tuya_home_control_dev_room_sync_event(TY_INFO_SYNC_TP_E* sync_type)
{
TUYA_CHECK_NULL_RETURN(sync_type, OPRT_INVALID_PARM);
Code: Select all
if ((*sync_type != TY_SYNC_TP_ROOM) && (*sync_type != TY_SYNC_TP_DEV)) {
return OPRT_OK;
}
TUYA_DEV_BRIEF_INFO_S* dev_list;
UINT_T dev_count = 0;
OPERATE_RET result = tuya_get_dev_brief_info_list(&dev_list, &dev_count);
if (OPRT_OK != result) {
PR_ERR("tuya_get_dev_brief_info_list failed %d", result);
return OPRT_COM_ERROR;
}
test_devices_dp(dev_list, dev_count);
TY_HOME_CTRL_DEV_CB cb;
TY_HOME_CTRL_DEV_T des = NULL;
for(UINT_T level1 = 0; level1 < dev_count; ++level1)
{
des = tuya_home_ctrl_dev_open(dev_list[level1].id, &cb);
printf("--%d-- --%s-- 打开设备:%s des:%d name:%s\n", __LINE__, __FILE__, dev_list[level1].id, (int)des,dev_list[level1].name);
}
tuya_dev_brief_info_list_free(dev_list, dev_count);
return OPRT_OK;
}