I am trying to use multiple OpenCV windows in python on my Jetson TX2. However, I get the error: "ASSERT: "false" in file qasciikey.cpp, line 495"
Below is the minimum reproducible code:
import cv2
import numpy as np
img1=np.random.randn(300,400)
img2=np.random.randn(600,400)
cv2.imshow('win1', img1)
cv2.imshow('win2', img2)
And here is the error trace:
Could not initialize OpenGL for RasterGLSurface, reverting to RasterSurface.
QXcbConnection: XCB error: 145 (Unknown), sequence: 164, resource id: 0, major code: 139 (Unknown), minor code: 20
Could not initialize OpenGL for RasterGLSurface, reverting to RasterSurface.
ASSERT: "false" in file qasciikey.cpp, line 495
Aborted (core dumped)
Please help. Thanks!
EDIT: The error only happens when I ssh into the Jetson (via MobaXterm v10.5). If I run the code directly from the Jetson, I do not get this error.