【已解决】【TuyaOS SDK】tuya mqtt上线后,程序执行段错误的问题

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


19926824531
Posts: 196

上面发错文件了,重新发一下

Last edited by 19926824531 on 2024年 Jan 17日 10:17, edited 1 time in total.

Tags:
19926824531
Posts: 196

Re: 【求助】【TuyaOS SDK】tuya mqtt上线后,程序执行段错误的问题

主业务接入流程有啥问题吗

User avatar
pippin-bobo
Posts: 236

Re: 【求助】【TuyaOS SDK】tuya mqtt上线后,程序执行段错误的问题

tuya_handle_dp_cmd_jsons
tuya_handle_dp_query_jsons
initTuyaMediaService
startTuyaService
这部分代码看不到,还有一点流媒体初始化最好是放在mqtt上线之后调用,但是这个和崩溃无关

19926824531
Posts: 196

Re: 【求助】【TuyaOS SDK】tuya mqtt上线后,程序执行段错误的问题

缺失的流程看下附件
另外TUYA_IPC_av_start是在mqtt上线之后才会执行操作的

Last edited by 19926824531 on 2024年 Jan 22日 10:54, edited 1 time in total.
User avatar
pippin-bobo
Posts: 236

Re: 【求助】【TuyaOS SDK】tuya mqtt上线后,程序执行段错误的问题

流程没看出什么问题 ,可以尝试
1)tuya_handle_dp_cmd_jsons tuya_handle_dp_query_jsons 相关处理直接返回
2)mqtt上线后,直接sleep,不要做任何主动操作看看
3)捕捉一下SIGSEGV,直接退出程序,不要继续运行了
多复现几次提供下日志附件

19926824531
Posts: 196

Re: 【求助】【TuyaOS SDK】tuya mqtt上线后,程序执行段错误的问题

做了上面说的问题尝试,还是崩溃
附件是对应的问题log

Attachments
mqtt上线后崩溃问题日志.rar
(23.86 KiB) Downloaded 162 times
User avatar
pippin-bobo
Posts: 236

Re: 【求助】【TuyaOS SDK】tuya mqtt上线后,程序执行段错误的问题

有多次崩溃得日志?看上去涂鸦服务运行得没什么问题;有没有启动和涂鸦无关得任何业务,可以全部关闭掉(包括音视频数据采集部分)

19926824531
Posts: 196

Re: 【求助】【TuyaOS SDK】tuya mqtt上线后,程序执行段错误的问题

按照上面的要求,抓了3次

Attachments
2024-01-17_130403.log
(236.83 KiB) Downloaded 165 times
19926824531
Posts: 196

Re: 【求助】【TuyaOS SDK】tuya mqtt上线后,程序执行段错误的问题

你好,我这边有试过用gdbserver来调试程序,但是libtuyaos.a去掉了符号表,看不到信息,链接时加-rdynamic参数也会编译不过。

Code: Select all

/vm_disk/Code/D2PT_Compare/09_T23N_D2PT/Cam/dependence/tuya/lib/libtuyaos.a(tuya_ipc_ss_util.c.o): In function `ss_util_make_test_dirs':
tuya_ipc_ss_util.c:(.text.ss_util_make_test_dirs+0x11c): undefined reference to `tuya_ipc_sd_get_capacity'
/vm_disk/Code/D2PT_Compare/09_T23N_D2PT/Cam/dependence/tuya/lib/libtuyaos.a(tuya_ipc_stream_storage.c.o): In function `__thread_disk_monitor':
tuya_ipc_stream_storage.c:(.text.__thread_disk_monitor+0xa0): undefined reference to `tuya_ipc_sd_get_status'
tuya_ipc_stream_storage.c:(.text.__thread_disk_monitor+0x2f0): undefined reference to `tuya_ipc_sd_get_mode_config'
tuya_ipc_stream_storage.c:(.text.__thread_disk_monitor+0x324): undefined reference to `tuya_ipc_sd_get_mode_config'
tuya_ipc_stream_storage.c:(.text.__thread_disk_monitor+0x374): undefined reference to `tuya_ipc_sd_get_capacity'
tuya_ipc_stream_storage.c:(.text.__thread_disk_monitor+0x43c): undefined reference to `tuya_ipc_sd_remount'
tuya_ipc_stream_storage.c:(.text.__thread_disk_monitor+0x444): undefined reference to `tuya_ipc_sd_get_mode_config'
/vm_disk/Code/D2PT_Compare/09_T23N_D2PT/Cam/dependence/tuya/lib/libtuyaos.a(tuya_ipc_album.c.o): In function `tuya_ipc_album_delete_by_file_info':
tuya_ipc_album.c:(.text.tuya_ipc_album_delete_by_file_info+0x98): undefined reference to `tuya_ipc_sd_get_status'
/vm_disk/Code/D2PT_Compare/09_T23N_D2PT/Cam/dependence/tuya/lib/libtuyaos.a(tuya_ipc_album.c.o): In function `tuya_ipc_album_write_file_start':
tuya_ipc_album.c:(.text.tuya_ipc_album_write_file_start+0x50): undefined reference to `tuya_ipc_sd_get_status'
/vm_disk/Code/D2PT_Compare/09_T23N_D2PT/Cam/dependence/tuya/lib/libtuyaos.a(wf_protect.c.o): In function `tuya_wifi_protect_mng_frame_reg':
wf_protect.c:(.text.tuya_wifi_protect_mng_frame_reg+0x0): undefined reference to `tuya_wifi_protect_ap_scan_mgnt_cb'
wf_protect.c:(.text.tuya_wifi_protect_mng_frame_reg+0x8): undefined reference to `tuya_wifi_protect_ap_scan_mgnt_cb'
/vm_disk/Code/D2PT_Compare/09_T23N_D2PT/Cam/dependence/tuya/lib/libtuyaos.a(wf_protect.c.o): In function `tuya_wifi_protect_mng_frame_unreg':
wf_protect.c:(.text.tuya_wifi_protect_mng_frame_unreg+0x0): undefined reference to `tuya_wifi_protect_ap_scan_mgnt_cb'
wf_protect.c:(.text.tuya_wifi_protect_mng_frame_unreg+0x8): undefined reference to `tuya_wifi_protect_ap_scan_mgnt_cb'
/vm_disk/Code/D2PT_Compare/09_T23N_D2PT/Cam/dependence/tuya/lib/libtuyaos.a(tuya_ipc_ss_encrypt.c.o): In function `ss_sync_encrypt_key':
tuya_ipc_ss_encrypt.c:(.text.ss_sync_encrypt_key+0xac): undefined reference to `tuya_ipc_sd_get_mode_config'
collect2: error: ld returned 1 exit status
Makefile:204: recipe for target 'EasyCam' failed
make[1]: *** [EasyCam] Error 1
Makefile:59: recipe for target 'app' failed
make: *** [app] Error 2
root@ubuntu:/vm_disk/Code/D2PT_Compare/09_T23N_D2PT/Cam# 
Attachments
gdb执行.png
19926824531
Posts: 196

Re: 【求助】【TuyaOS SDK】tuya mqtt上线后,程序执行段错误的问题

和应用层status_changed_cb没啥关系,我初始化时把这个置为NULL,程序运行到下图这个地方还是照样崩溃
麻烦检查一下SDK这个操作附近的代码逻辑,看崩溃可能和哪个因素有关。

Attachments
崩溃.png
Post Reply