【求助】【TuyaOS SDK】【ty_ipc_wr_wl_linux_sdk_arm-rockchip830-linux-uclibcgnueabihf】概率性出现调用tuya_ipc_tranfser_init死机

IPC/NVR/可视门铃等具备多媒体能力的设备,扫地机/AGV等机器人设备


Post Reply
you.xu
Posts: 7

【问题描述】:
我们在测试时会出现程序运行到tuya_ipc_tranfser_init这个函数时捕获到signal 11,我们通过addr2line定位到函数为tuya_os_adapt_mutex_lock函数,如
截图附件《企业微信截图_16849799255043.png》
设备启动日志,如log附件《signal_11.txt.txt》,log等级为3
相关代码如下:
OPERATE_RET TUYA_APP_Enable_P2PTransfer(IN TUYA_IPC_SDK_P2P_S *p2p_infos)
{
OPERATE_RET ret = -1;

Code: Select all

if (s_p2p_mgr.enabled == TRUE) {
	DEBUG_INFO("P2P Is Already Inited");
	return OPRT_OK;
}

if (p2p_infos == NULL) {
	DEBUG_INFO("Init P2PTransfer fail. Param is null");
	return OPRT_INVALID_PARM;
}

if (p2p_infos->enable == FALSE) {
	return OPRT_OK;
}

IPC_MEDIA_INFO_S *p_media_info = IPC_APP_Get_Media_Info();
if (p_media_info == NULL) {
	return OPRT_COM_ERROR;
}

s_p2p_mgr.enabled = TRUE;
DEBUG_INFO("Init P2P With Max Users:%u", p2p_infos->max_p2p_client);
s_p2p_mgr.max_users = p2p_infos->max_p2p_client;
s_p2p_mgr.p2p_audio_codec = p_media_info->audio_codec[E_IPC_STREAM_AUDIO_MAIN];

TUYA_IPC_TRANSFER_VAR_S p2p_var = {0};
p2p_var.online_cb = __depereated_online_cb;
p2p_var.on_rev_audio_cb = p2p_infos->rev_audio_cb;

/*speak data format  app->ipc*/
p2p_var.rev_audio_codec = p_media_info->audio_codec[E_IPC_STREAM_AUDIO_MAIN];
p2p_var.audio_sample = p_media_info->audio_sample[E_IPC_STREAM_AUDIO_MAIN];
p2p_var.audio_databits = p_media_info->audio_databits[E_IPC_STREAM_AUDIO_MAIN];
p2p_var.audio_channel = p_media_info->audio_channel[E_IPC_STREAM_AUDIO_MAIN];
/*end*/
p2p_var.on_event_cb = p2p_infos->transfer_event_cb;
p2p_var.live_quality = TRANS_LIVE_QUALITY_MAX;
p2p_var.max_client_num = p2p_infos->max_p2p_client;
p2p_var.lowpower = p2p_infos->is_lowpower;
memcpy(&p2p_var.AVInfo, p_media_info, sizeof(IPC_MEDIA_INFO_S));
ret = tuya_ipc_tranfser_init(&p2p_var);
if (ret != OPRT_OK) {
    DEBUG_ERROR("tuya_ipc_tranfser_init fail");
    s_p2p_mgr.enabled = FALSE;
}

DEBUG_INFO("%s: tuya_ipc_tranfser_init over, ret:%d\n", get_time_string(), ret);

return ret;

}

【复现步骤】:
低功耗设备:休眠然后唤醒设备,不断循环
常电:断电然后上电,不断循环

Attachments
signal_11.txt.txt
(18.38 KiB) Downloaded 356 times
企业微信截图_16849799255043.png

Tags:
Post Reply