Raspberry pi V2 camera GStreamer-CRITICAL **: 10:29:55.989: gst_mini_object_set_qdata: assertion 'object != NULL' failed

I use Raspberry pi V2 camera ,when I open/close the camera, sometimes will show:
Streamer-CRITICAL **: 10:29:55.989: gst_mini_object_set_qdata: assertion ‘object != NULL’ failed

.below is my config? Is anyone have good idea?

static inline std::string gstreamer_pipeline(int capture_width, int capture_height, int display_width, int display_height, int framerate,
int flip_method)
{
//Modify for 消除遮住摄像头时红黑斑点花屏问题 by cuiep @2021.03.31 08:26:14
//return “nvarguscamerasrc ! video/x-raw(memory:NVMM), width=(int)” + std::to_string(capture_width) +
//return “nvarguscamerasrc gainrange=“1 16” ispdigitalgainrange=“1 4” exposuretimerange=“34000 358733000” ! video/x-raw(memory:NVMM), width=(int)” + std::to_string(capture_width) +
return “nvarguscamerasrc ispdigitalgainrange=“1 4” ! video/x-raw(memory:NVMM), width=(int)” + std::to_string(capture_width) +
“, height=(int)” + std::to_string(capture_height) + “, format=(string)NV12, framerate=(fraction)” +
std::to_string(framerate) + “/1 ! nvvidconv flip-method=” + std::to_string(flip_method) +
" ! video/x-raw, width=(int)" + std::to_string(display_width) + “, height=(int)” +
std::to_string(display_height) +
“, format=(string)BGRx ! videoconvert ! video/x-raw, format=(string)BGR ! appsink”;
}

supplement:

[ WARN:0] global /home/nvidia/host/build_opencv/nv_opencv/modules/videoio/src/cap_gstreamer.cpp (933) open OpenCV | GStreamer warning: Cannot query video position: status=0, value=-1, duration=-1
NvRmChannelSubmit: NvError_IoctlFailed with error code 22
NvRmPrivFlush: NvRmChannelSubmit failed (err = 196623, SyncPointIdx = 7, SyncPointValue = 0)
fence_set_name ioctl failed with 22
(Argus) Error InsufficientMemory: (propagating from src/eglstream/ImageImpl.cpp, function copyToNvBuffer(), line 513)
Error generated. /dvs/git/dirty/git-master_linux/multimedia/nvgstreamer/gst-nvarguscamera/gstnvarguscamerasrc.cpp, threadExecute:498 IImageNativeBuffer not supported by Image.
Error generated. /dvs/git/dirty/git-master_linux/multimedia/nvgstreamer/gst-nvarguscamera/gstnvarguscamerasrc.cpp, threadFunction:194 (propagating)