OpenCV 4.0.1 cannot parse XML file anymore
Hi,
I just upgraded my projects dependencies from OpenCV 3.4.4 to 4.0.1. I have a XML and YAML wrapper for the persistence module in OpenCV and it did work before without problems. Now, I have the following problem, when I try to read a node from the XML file:
terminate called after throwing an instance of 'cv::Exception'
what(): OpenCV(4.0.1) opencv/modules/core/src/persistence.cpp:1716: error: (-215:Assertion failed) blockIdx < fs_data_ptrs.size() in function 'getNodePtr'
Both, blockIdx and fs_data_ptrs.size() are 0, when I try to read ANY node and then it fails. I'm thought it might be a problem with the XML format, but I reformated it in many ways: tabs, 2 spaces, 4 spaces, different indendations, without the "opencv_storage" tag etc. but nothing seems to work. My XML looks like this:
<?xml version="1.0"?>
<opencv_storage>
<logging>
<logFile>recorder.log</logFile>
<logLevel>warning</logLevel>
<logDir>../output</logDir>
<logType>file</logType>
</logging>
</opencv_storage>
I'm reading from the file like this:
cv::FileStorage base_node_ = cv::FileStorage(file_path, cv::FileStorage::READ);
if(!base_node_.isOpened())
throw SomeException("text");
cv::FileNode category_node = base_node_["logging"];
And in the last line here, it crashes already. I have no idea what to try anymore. Can anyone help me?
Thanks!