-
-
Notifications
You must be signed in to change notification settings - Fork 56.5k
Closed
Labels
bugcategory: coreconfirmedThere is stable reproducer / investigation completeThere is stable reproducer / investigation complete
Milestone
Description
System information (version)
- OpenCV => 4.3.0 (homebrew)
- Operating System / Platform => macos 10.15
- Compiler => Clang 10.0.1
Detailed description
When a cv::FileStorage object is assigned, the object cannot be used and causes a segfault with every access.
Steps to reproduce
CMakeLists.txt
find_package(OpenCV 4.0 REQUIRED)
set(CMAKE_CXX_STANDARD 14)
cmake_minimum_required(VERSION 3.15.0)
project(test)
add_executable(test test.cpp)
include_directories(${OpenCV_INCLUDE_DIRS})
target_link_libraries(test ${OpenCV_LIBRARIES})
test.cpp
#include <iostream>
#include <opencv2/core/persistence.hpp>
int main(int argc, char *argv[]) {
// crash:
cv::FileStorage fs;
fs = cv::FileStorage("test.yml", cv::FileStorage::READ);
// no crash
/* cv::FileStorage fs("test.yml", cv::FileStorage::READ); */
std::string s;
fs["string"] >> s;
std::cout << "read value '" << s << "'" << std::endl;
return 0;
}
test.yml
%YAML:1.0
string: "wat"
Issue submission checklist
- I report the issue, it's not a question
- I checked the problem with documentation, FAQ, open issues,
answers.opencv.org, Stack Overflow, etc and have not found solution
The issue has been raised here, but so far as I can see, no bug report submitted - I updated to latest OpenCV version and the issue is still there. I checked with current master, the problem persists.
- There is reproducer code and related data files: videos, images, onnx, etc
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
bugcategory: coreconfirmedThere is stable reproducer / investigation completeThere is stable reproducer / investigation complete