Qt5 error with opencv

I get this error when using openCV and Qt5 to stream camera using gStreamer. Any help?

Couldn’t create ddkvic Session: Cannot allocate memory
Using pipeline:
nvarguscamerasrc ! video/x-raw(memory:NVMM), width=(int)640, height=(int)480, format=(string)NV12, framerate=(fraction)60/1 ! nvvidconv flip-method=0 ! video/x-raw, width=(int)640, height=(int)480, format=(string)BGRx ! videoconvert ! video/x-raw, format=(string)BGR ! appsink
nvbuf_utils: Could not create Default NvBufferSession

Hi,
Please try to run the pipeline in gst-launch and fakesink:

$ gst-launch-1.0 nvarguscamerasrc ! 'video/x-raw(memory:NVMM), width=(int)640, height=(int)480, format=(string)NV12, framerate=(fraction)60/1' ! nvvidconv flip-method=0 ! 'video/x-raw, width=(int)640, height=(int)480, format=(string)BGRx' ! videoconvert ! 'video/x-raw, format=(string)BGR' ! fakesink

If it runs well, it should work by replacing fakesink with appsink. However, the error shows memory is insufficient:

Couldn't create ddkvic Session: Cannot allocate memory

So probably after installing OpenCV and Qt5, the memory is consumed too much, leading to the failure.

Thanks DaneLLL,
It worked. I uninstalled a few programs and it didn’t fail anymore.