Operating System / Platform => Raspbian Buster/Raspberry Pi4
Compiler => gcc 8.3
Detailed description
Mosse tracker causes a segmentation fault with the following example. Accessing the property getDefaultName cause the segfault, only using mosse.
The fact that it only occurs on ARM (Raspberry) and not in my computer (x86_64), let me think can be a bug. This example from the documentation works as expected, but as soon as I put a tracker in my class, invoking whatever method cause a segmentation fault (only in ARM).
OpenCV is version 4.3.0 built from source with inference engine support (using the docker as indicated in the documentation for raspberry). Also on my computer the same version.
Steps to reproduce
main.cpp
#include <iostream>
#include "person.h"
using namespace std;
int main()
{
cout << "Hello";
person p;
p.createTracker("mosse");
if (p.tracker){
cout << "not null" << endl;
}
else {
cout << "null" << endl;
}
cout << p.tracker->getDefaultName();
return 0;
}
#include "person.h"
person::person()
{
}
void person::createTracker(std::string type)
{
if(type== "mosse") {
tracker = cv::TrackerMOSSE::create();
} else if(type == "csrt")
tracker = cv::TrackerCSRT::create();
else if(type == "kcf")
tracker = cv::TrackerKCF::create();
else if(type == "tld")
tracker = cv::TrackerTLD::create();
else {
std::cout << "Tracking type not specified! This should not happen.";
}
GDB
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/lib/arm-linux-gnueabihf/libthread_db.so.1".
[New Thread 0xb34a1250 (LWP 10220)]
Hello
not null
Thread 1 "testTrackerSF" received signal SIGSEGV, Segmentation fault.
0x00010ff0 in main () at main.cpp:21
21 cout << p.tracker->getDefaultName();
(gdb) bt
0 0x00010ff0 in main() () at main.cpp:21
Issue submission checklist
[x] I report the issue, it's not a question
[x] I checked the problem with documentation, FAQ, open issues,
answers.opencv.org, Stack Overflow, etc and have not found solution
[x] I updated to latest OpenCV version and the issue is still there
[x] There is reproducer code and related data files: videos, images, onnx, etc
System information (version)
Detailed description
Mosse tracker causes a segmentation fault with the following example. Accessing the property getDefaultName cause the segfault, only using mosse. The fact that it only occurs on ARM (Raspberry) and not in my computer (x86_64), let me think can be a bug. This example from the documentation works as expected, but as soon as I put a tracker in my class, invoking whatever method cause a segmentation fault (only in ARM). OpenCV is version 4.3.0 built from source with inference engine support (using the docker as indicated in the documentation for raspberry). Also on my computer the same version.
Steps to reproduce
main.cpp
person.h
person.cpp
GDB
Issue submission checklist