opencv: Crash in net.forward()

System Information

OpenCV version: 4.7.0 Operating System / Platform: windows10 x64 Compiler & compiler version: Code::Blocks 20.03 gcc 8.1.0

Detailed description

software crash in net.forward() function and show this : Process returned -1073741819 (0xC0000005) execution time : 24.258 s

Steps to reproduce

    net = cv::dnn::readNetFromCaffe(caffeConfigFile, caffeWeightFile);
    net.setPreferableBackend(DNN_TARGET_CPU);
    source.read(frame);
    inputBlob = cv::dnn::blobFromImage(frame, inScaleFactor, cv::Size(inWidth, inHeight), meanVal, false, false);
    net.setInput(inputBlob, "data");
    cv::Mat detection = net.forward("detection_out");

Issue submission checklist

  • I report the issue, it’s not a question
  • I checked the problem with documentation, FAQ, open issues, forum.opencv.org, Stack Overflow, etc and have not found any solution
  • I updated to the latest OpenCV version and the issue is still there
  • There is reproducer code and related data files (videos, images, onnx, etc)

About this issue

  • Original URL
  • State: closed
  • Created a year ago
  • Comments: 16 (7 by maintainers)

Most upvoted comments

Can this issue be closed?

It work fine with VisualStudio and opencv 4.5.1

Thank you for taking the time to investigate.

I didn’t customize the example. Now, based on the links you sent, I will use Visual Studio instead of codebooks. I will also check my system settings beforehand.

Thanks

My tests were conducted using CPU. I need to check it on Windows platform. Let me investigate it