[G-API] Assertion failure when trying to GOut multiple data types

The OpenCV issue template suggested asking in the forum, since I’m not sure if this is a bug of OpenCV itself or it’s just the problem of my code, I decide to post it here too.

GitHub issue: Assertion failure when trying to GOut multiple data types. · Issue #19711 · opencv/opencv · GitHub
(The reproducible source code is attached in the GitHub issue)

Description: assertion failed when trying to pull processed data to out_vector from the pipeline. cv::GOut outputs four results of two different data types, which are cv::GArray<cv::GArray<cv::Point>> contour_point_1, contour_point_2 and cv::GArray<cv::Vec4i> hierarchy_1, hierarchy_2.
out_vector receives four results, which are std::vector<std::vector<cv::Point>> contours_light, contours_dim and std::vector<cv::Vec4i> hierarchy_light, hierarchy_dim.

I’ve ran the findContoursH unit test (without using dedicated pipeline, but simply calling .apply()) of OpenCV, which returns two result of two different data types and it worked fine.

Thanks for the help!