在 Ubuntu 24.04.2 LTS 上通过 Java SDK 获取裸码流失败,登陆、获取通道等均成功,但是没有视频数据,回调显示:异常事件类型:32771
运行的是 SDK 中的 Demo,SDK 版本:CH-HCNetSDKV6.1.9.48_build20230410_linux64_20240829112751
以下是完整日志:
```bash
OpenJDK 64-Bit Server VM warning: You have loaded library /tmp/jna4278948216934714095.tmp which might have disabled stack guard. The VM will try to fix the stack guard now.
It's highly recommended that you fix the library with 'execstack -c <libfile>', or link it with '-z noexecstack'.
loop[2] find 2 mac and 2 ip
设置异常消息回调成功
[2025-06-27 16:52:43.477][DBG] CCoreGlobalCtrlBase::LoadDSo, HPR_LoadDSo Succ, Path[/usr/local/FWebSCADA/libs/hikvision/libz.so], hHandleRet[1077279216]
[2025-06-27 16:52:43.477][INF] The COM:HCCoreBase ver is 6.1.4.15, 2020_03_05. Async:1.
[2025-06-27 16:52:43.477][INF] The COM:Core ver is 6.1.9.48, 2023_04_10. Async:1.
[2025-06-27 16:52:43.477][INF] This HCNetSDK ver is 6.1.9.48 Ver 2023_04_10.
[2025-06-27 16:52:43.570][INF] Login dev 196.168.89.189:8000.
[2025-06-27 16:52:43.570][INF] dwTotalNum[2048]
[2025-06-27 16:52:43.573][INF] Private connect 196.168.89.189:8000 sock=154 this=0x40525dc4 cmd=0x10000 port=50028
[2025-06-27 16:52:43.573][INF] LogonDev1 in[196.168.89.189:8000]
[2025-06-27 16:52:43.576][DBG] CCoreGlobalCtrlBase::LoadDSo, HPR_LoadDSo Succ, Path[/home/guans/code/ClientDemo/lib/libcrypto.so.1.1], hHandleRet[1079180368]
[2025-06-27 16:52:43.577][DBG] CCoreGlobalCtrlBase::LoadDSo, HPR_LoadDSo Succ, Path[/home/guans/code/ClientDemo/lib/libssl.so.1.1], hHandleRet[1079182240]
[2025-06-27 16:52:43.577][INF] SSLTRANSAPI::LoadAPI, libeay, Load Real Path[/home/guans/code/ClientDemo/lib/libcrypto.so.1.1]
[2025-06-27 16:52:43.577][INF] SSLTRANSAPI::IsAllAPILoaded, SSL_library_init Unload
[2025-06-27 16:52:43.577][INF] OpenSSL, Not All Function Loaded!
[2025-06-27 16:52:43.577][INF] SSLTRANSAPI::PrintVersion, OpenSSL version info [OpenSSL 1.1.1l 24 Aug 2021]
[2025-06-27 16:52:43.577][INF] CSSLTrans::SSLCtxInit, dwSSLVersion[6], m_fnTLSServerMethod
[2025-06-27 16:52:43.580][ERR] CSSLTrans::SSLTrans_CTX_Load_CA, invalid path[/home/guans/code/ClientDemo/lib/cert/\]
196.168.89.189 设备登录成功!
预览起始通道号: 33
请输入您想要执行的demo实例! (退出请输入yes)
1
[Module]实时取流示例代码
取流成功
请输入您想要执行的demo实例! (退出请输入yes)
异常事件类型:32771
[2025-06-27 16:53:00.455][DBG] CComBase::Load, Load szDllPath[/home/guans/code/ClientDemo/lib/HCNetSDKCom/libHCPreview.so] SUCC
[2025-06-27 16:53:00.456][INF] AbilityAnalyze---Init-- start
[2025-06-27 16:53:00.456][DBG] AbilityAnalyze---Init-- over, DeviceList path [/usr/local/FWebSCADA/libs/hikvision/HCNetSDKCom/LocalXml/DeviceList.xml], load result[0]
[2025-06-27 16:53:00.456][INF] The COM:Preview ver is 6.1.9.48, 2023_04_10.
[2025-06-27 16:53:00.459][INF] Private connect 196.168.89.189:8000 sock=156 this=0x40525dc4 cmd=0x30000 port=53004
[2025-06-27 16:53:00.461][ERR] ID-IP-CHAN[0-196.168.89.189-1] [CGetTCPStream::LinkToDvr] struOut.dwDevState[13] dwErrCode[0xffffffff] dwMErrDevSelfEx[0xffffffff] CommandThread callback exception
[2025-06-27 16:53:00.461][ERR] ID-IP-CHAN[0-196.168.89.189-1] [CPreviewSession::AllResourceStarWork] StreamGetterStartWork Failed, UserID[0]
[2025-06-27 16:53:00.461][DBG] ID-IP-CHAN[0-196.168.89.189-1] [CPreviewSession::AllResourceStarWorkThread] EXCEPTION_PREVIEW trigger, AllResourceStarWork Failed, UserID[0] dwError[23]
2
[Module]停止实时取流示例代码
停止取流成功
请输入您想要执行的demo实例! (退出请输入yes)
3
[Module]实时获取裸码流示例代码
取流成功
异常事件类型:32771
请输入您想要执行的demo实例! (退出请输入yes)
[2025-06-27 16:54:27.143][INF] Private connect 196.168.89.189:8000 sock=157 this=0x40525dc4 cmd=0x30000 port=52752
[2025-06-27 16:54:27.144][INF] CCoreGlobalCtrl::LoadDSo, enumDllType[7], cTempPath[/home/guans/code/ClientDemo/lib/HCNetSDKCom/]
[2025-06-27 16:54:27.145][ERR] ID-IP-CHAN[1-196.168.89.189-1] [CGetTCPStream::LinkToDvr] struOut.dwDevState[13] dwErrCode[0xffffffff] dwMErrDevSelfEx[0xffffffff] CommandThread callback exception
[2025-06-27 16:54:27.145][ERR] ID-IP-CHAN[1-196.168.89.189-1] [CPreviewSession::AllResourceStarWork] StreamGetterStartWork Failed, UserID[0]
[2025-06-27 16:54:27.145][DBG] ID-IP-CHAN[1-196.168.89.189-1] [CPreviewSession::AllResourceStarWorkThread] EXCEPTION_PREVIEW trigger, AllResourceStarWork Failed, UserID[0] dwError[23]
[2025-06-27 16:54:27.146][DBG] CCoreGlobalCtrl::LoadDSo, HPR_LoadDSo, hHandleRet[1078009888], enumDllType[7], Path[libanalyzedata.so], syserror[2]
[2025-06-27 16:54:27.146][INF] [CAnalyzeDataLib::LoadLib] Load Succ
```