# TrackerGOTURN sample code crash! Vector subscript out of range, Winograd

**URL:** https://forum.opencv.org/t/trackergoturn-sample-code-crash-vector-subscript-out-of-range-winograd/13400
**Category:** C++
**Tags:** dnn, tracking, winograd
**Created:** [June 4, 2023, 11:19am UTC](https://forum.opencv.org/t/trackergoturn-sample-code-crash-vector-subscript-out-of-range-winograd/13400 "2023-06-04T11:19:09Z")
**Posts on this page:** 4
**Page:** 1

<div class="post-metadata">

### Author: ![muphiri73](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.opencv.org/muphiri73/32/7693_2.png) [@muphiri73](https://forum.opencv.org/u/muphiri73)
#### Post date: [June 4, 2023, 11:19am UTC](https://forum.opencv.org/t/trackergoturn-sample-code-crash-vector-subscript-out-of-range-winograd/13400/1 "2023-06-04T11:19:09Z")

</div>

I encounter the issue when TrackGOTURN sample code crash

System information (version)  
OpenCV =\> 4.7.0  
Operating System / Platform =\> Windows 64 Bit  
Compiler =\> Visual Studio 2019

Description  
I get errors when running the application:

```auto
Ptr tracker2 = TrackerGOTURN::create();
VideoCapture video2("chaplin.mp4");
if (!video2.isOpened())
{
cout << "Could not read video file" << endl;
return EXIT_FAILURE;
}

Mat frame2;
if (!video2.read(frame2))
{
cout << "Cannot read video file" << endl;
return EXIT_FAILURE;
}

Rect bbox2(0, 0, 10, 10);

tracker2->init(frame2, bbox2);

while (video2.read(frame2))
{
bool ok = tracker2->update(frame2, bbox2); <-- sample application crashed!!!!!

[INFO:0@3.908] global videoio_registry.cpp:232 cv::`anonymous-namespace'::VideoBackendRegistry::VideoBackendRegistry VIDEOIO: Enabled backends(9, sorted by priority): FFMPEG(1000); GSTREAMER(990); INTEL_MFX(980); MSMF(970); DSHOW(960); CV_IMAGES(950); CV_MJPEG(940); UEYE(930); OBSENSOR(920)
[INFO:0@3.909] global backend_plugin.cpp:383 cv::impl::getPluginCandidates Found 3 plugin(s) for FFMPEG
[INFO:0@3.909] global plugin_loader.impl.hpp:67 cv::plugin::impl::DynamicLib::libraryLoad load C:\Users\muphi\Documents\01.???\15.DLL\TestTracking\TestTracking\x64\Debug\opencv_videoio_ffmpeg470_64d.dll => FAILED
[INFO:0@3.911] global plugin_loader.impl.hpp:67 cv::plugin::impl::DynamicLib::libraryLoad load opencv_videoio_ffmpeg470_64d.dll => FAILED
[INFO:0@3.920] global plugin_loader.impl.hpp:67 cv::plugin::impl::DynamicLib::libraryLoad load opencv_videoio_ffmpeg470_64.dll => OK
[INFO:0@3.920] global backend_plugin.cpp:50 cv::impl::PluginBackend::initCaptureAPI Found entry: 'opencv_videoio_capture_plugin_init_v1'
[INFO:0@3.920] global backend_plugin.cpp:169 cv::impl::PluginBackend::checkCompatibility Video I/O: initialized 'FFmpeg OpenCV Video I/O Capture plugin': built with OpenCV 4.7 (ABI/API = 1/1), current OpenCV version is '4.7.0' (ABI/API = 1/1)
[INFO:0@3.920] global backend_plugin.cpp:69 cv::impl::PluginBackend::initCaptureAPI Video I/O: plugin is ready to use 'FFmpeg OpenCV Video I/O Capture plugin'
[INFO:0@3.920] global backend_plugin.cpp:84 cv::impl::PluginBackend::initWriterAPI Found entry: 'opencv_videoio_writer_plugin_init_v1'
[INFO:0@3.921] global backend_plugin.cpp:169 cv::impl::PluginBackend::checkCompatibility Video I/O: initialized 'FFmpeg OpenCV Video I/O Writer plugin': built with OpenCV 4.7 (ABI/API = 1/1), current OpenCV version is '4.7.0' (ABI/API = 1/1)
[INFO:0@3.921] global backend_plugin.cpp:103 cv::impl::PluginBackend::initWriterAPI Video I/O: plugin is ready to use 'FFmpeg OpenCV Video I/O Writer plugin'
[INFO:0@30.301] global registry_parallel.impl.hpp:96 cv::parallel::ParallelBackendRegistry::ParallelBackendRegistry core(parallel): Enabled backends(3, sorted by priority): ONETBB(1000); TBB(990); OPENMP(980)
[INFO:0@30.302] global plugin_loader.impl.hpp:67 cv::plugin::impl::DynamicLib::libraryLoad load C:\Users\muphi\Documents\01.???\15.DLL\TestTracking\TestTracking\x64\Debug\opencv_core_parallel_onetbb470_64d.dll => FAILED
[INFO:0@30.305] global plugin_loader.impl.hpp:67 cv::plugin::impl::DynamicLib::libraryLoad load opencv_core_parallel_onetbb470_64d.dll => FAILED
[INFO:0@30.306] global plugin_loader.impl.hpp:67 cv::plugin::impl::DynamicLib::libraryLoad load C:\Users\muphi\Documents\01.???\15.DLL\TestTracking\TestTracking\x64\Debug\opencv_core_parallel_tbb470_64d.dll => FAILED
[INFO:0@30.310] global plugin_loader.impl.hpp:67 cv::plugin::impl::DynamicLib::libraryLoad load opencv_core_parallel_tbb470_64d.dll => FAILED
[INFO:0@30.310] global plugin_loader.impl.hpp:67 cv::plugin::impl::DynamicLib::libraryLoad load C:\Users\muphi\Documents\01.???\15.DLL\TestTracking\TestTracking\x64\Debug\opencv_core_parallel_openmp470_64d.dll => FAILED
[INFO:0@30.314] global plugin_loader.impl.hpp:67 cv::plugin::impl::DynamicLib::libraryLoad load opencv_core_parallel_openmp470_64d.dll => FAILED

```

When I run the application in release mode, there is no problem.  
but when I run the application in debug mode, I face the crash

---

<div class="post-metadata">

### Author: ![berak](https://avatars.discourse-cdn.com/v4/letter/b/85f322/32.png) [@berak](https://forum.opencv.org/u/berak)
#### Post date: [June 4, 2023, 11:51am UTC](https://forum.opencv.org/t/trackergoturn-sample-code-crash-vector-subscript-out-of-range-winograd/13400/2 "2023-06-04T11:51:09Z")

</div>

btw, those INFO messages are only shown in DEBUG mode  
(that’s normal, and unrelated to whatever problem there is with goturn)

> [@muphiri73](#):
>
> but when I run the application in debug mode, I face the crash

what exactly happens ? any output/msg ?

---

<div class="post-metadata">

### Author: ![muphiri73](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.opencv.org/muphiri73/32/7693_2.png) [@muphiri73](https://forum.opencv.org/u/muphiri73)
#### Post date: [June 4, 2023, 12:06pm UTC](https://forum.opencv.org/t/trackergoturn-sample-code-crash-vector-subscript-out-of-range-winograd/13400/3 "2023-06-04T12:06:20Z")

</div>

Thank you for the comment.  
My sample code crashed in debug mode, but works well in release mode.  
I don’t know what the problem is.

 ![image](https://us1.discourse-cdn.com/flex020/uploads/opencv/original/2X/6/6a975ca191ab4cac45c5e4868f67c11877dbf1bf.jpeg)

---

<div class="post-metadata">

### Author: ![berak](https://avatars.discourse-cdn.com/v4/letter/b/85f322/32.png) [@berak](https://forum.opencv.org/u/berak)
#### Post date: [June 4, 2023, 12:25pm UTC](https://forum.opencv.org/t/trackergoturn-sample-code-crash-vector-subscript-out-of-range-winograd/13400/4 "2023-06-04T12:25:23Z")

</div>

i see ‘Winograd’ in the call stack

> **[Search · winograd · opencv/opencv](https://github.com/opencv/opencv/search?q=winograd&type=issues)**
>
> Open Source Computer Vision Library. Contribute to opencv/opencv development by creating an account on GitHub.
