OpenCV Error: Bad argument (Invalid pointer to file storage) in cvGetRootFileNode

Hi all, I am using Ubuntu 18.04 and my OpenCV version is 4.1.1. When I want to roslaunch I get the error like this:

OpenCV Error: Bad argument (Invalid pointer to file storage) in cvGetRootFileNode, file /build/opencv-XDqSFW/opencv-3.2.0+dfsg/modules/core/src/persistence.cpp, line 926
terminate called after throwing an instance of 'cv::Exception'
  what():  /build/opencv-XDqSFW/opencv-3.2.0+dfsg/modules/core/src/persistence.cpp:926: error: (-5) Invalid pointer to file storage in function cvGetRootFileNode

Does anyone know how to solve this error?

Hi,
I’m sorry for not being much help on this, but you might also want to check if there’s similar question in ROS Answers.

Is ok, thank you Will