camera_calibration opens gui window but freezes
I'm trying to run the camera_calibration node. I run this command:
rosrun camera_calibration cameracalibrator.py --size 8x7 --square 0.023 --approximate=0.1 --no-service-check image:=/camera/color/image_raw
I see a window opening but then it freezes indefinitely. I tried to debug cameracalibrator.py and saw that the freeze occurs at the cv2.namedWindow("display", cv2.WINDOW_NORMAL) in the run() method of DisplayThread which is created in the OpenCVCalibrationNode __init__(). I have tried to move the cv2.namedWindow somewhere else but it also freezes. In fact after trying a few times the freeze transforms into a segmentation fault when executing the cv2.namedWindow statement.
Any idea what could the problem be?
I'm running Ubuntu 16.04, ROS kinetic, opencv version is 3.3