In addition to accessing RTSP and gb28181, it also completes the docking with the equipment and video stream transmission through private protocols such as hiksdk and EHOME.
The client server deployed the easycvr project and crashed after running for a period of time. Open the log. The error message is as follows: “runtime error: invalid memory address or nil pointer dereference”.
This error is a typical error caused by the direct use of the go pointer without initializing the pointer after it is declared. See the addstream function in line 516 of the error information view code. The following code indicates that this function is the key to the error and is saved as the error file information, so this is not the key to the error.
Check the error message at line 606:
The parameters in line 606 represent: channel name, stream address, channel ID, handle using SDK, channelnum and stream type. Therefore, compared with the previous error message, it will be associated with the problem of calling the SDK handle. Then view the local. DB database for comparison:
Field Dahua_ device_ Handle has two values of 0 and – 1. All these two values are only available when login fails or errors occur. The program uses this value directly. This will cause the call to. DLL and. So to crash.
Before calling the SDK, make the following judgment when passing in the handle:
If loginHandle <=0 {
Return -1, fmt.Errorf(“handle param error:%d”, loginHandle)
}
Or directly make if judgment in the encapsulated DLL. This is for double insurance.
if (loginHandle <= 0) {
return -1;
}
Read More:
- [Solved] Goland sdk Error: The selected directory is not a valid home for Go SDK
- [Solved] Hikvision SDK: NET_DVR_GetDVRConfig failed Device does not support this function
- [Solved] Android Studio Error:SDK location not found.
- You have not accepted the license agreements of the following SDK components
- [Solved] ERROR: ./depthai_sdk is not a valid editable requirement.
- [Solved] Flutter SDK constraint error: pub get failed (65; See…
- [Go] Solve panic: runtime error: invalid memory address or nil pointer dereference in golang
- [Solved] MindSpore Error: Should not use Python in runtime
- [Solved] Failed to install the following Android SDK packages as some licences have not been accepted
- [Solved] Android Studio 4 Error: The application could not be installed: INSTALL_FAILED_OLDER_SDK
- [Solved] CXF Call webservice Client Error: 2 counts of InaccessibleWSDLException
- [Solved] the SDK location is inside Studio‘s install location
- [Solved] leetcode Common Error: :runtime error: member access within misaligned address 0xbebebebebebebebe for type ‘str
- [Solved] OpenGL PowerVR SDK Compiling Error: Could NOT find X11 (missing: X11_X11_INCLUDE_PATH X11_X11_LIB)
- [Solved] Fabric_sdk_go:QueryBlockConfig failed: QueryBlockConfig failed: target(s) required
- [Solved] Tsingsee green rhinoceros video pedestrian intelligence detection test error panic: runtime error
- Go Slice Error: panic:runtime error:index out of range [0] with length 0 [Solved]
- [Solved] panic: runtime error: invalid memory address or nil pointer dereference
- [Solved] Linux Install Xilinx_SDK but Failed to Login Error: Authentication error: Xilinx
- The SDK of Android webrtc compiled with Ninja – C out / release command reported an error, and the Android NDK processing method could not be found