Skip to content

SVM->trainAuto() Segmentation fault (core dumped) #15984

@ZTFtrue

Description

@ZTFtrue
System information (version)
  • OpenCV => 4.1.2-dev
  • Operating System / Platform => ArchLinux 5.3.11-arch1-1 x86_64 GNU/Linux (31.0 GiB)
  • Compiler => Eclipse/Cmake
Detailed description

The outSVM->train(pt) can run , but the trainAuto(pt) can't work .

Steps to reproduce

Code:

outSVM = cv::ml::SVM::create();
outSVM->setType(SVM::C_SVC);
outSVM->setKernel(SVM::CHI2);
Ptr<TrainData> pt = ml::TrainData::create(samples, ml::ROW_SAMPLE,
        labels);
// bool result = outSVM->train(pt);
bool result = outSVM->trainAuto(pt);
Debug informetion:
#0  0x00007fffee4b7707 in __memmove_avx_unaligned_erms ()
    at /usr/lib/libc.so.6
#1  0x00007ffff2e41db9 in cv::ml::SVMImpl::do_train(cv::Mat const&, cv::Mat const&) () at /usr/local/lib/libopencv_ml.so.4.1
#2  0x00007ffff2e4691d in cv::ml::SVMImpl::TrainAutoBody::operator()(cv::Range const&) const () at /usr/local/lib/libopencv_ml.so.4.1
#3  0x00007fffeeb726d7 in (anonymous namespace)::ParallelLoopBodyWrapper::operator()(cv::Range const&) const ()
    at /usr/local/lib/libopencv_core.so.4.1
#4  0x00007fffeeb7358d in cv::ParallelJob::execute(bool) ()
    at /usr/local/lib/libopencv_core.so.4.1
#5  0x00007fffeeb739d9 in cv::WorkerThread::thread_body() ()
    at /usr/local/lib/libopencv_core.so.4.1
#6  0x00007fffeeb73bf9 in cv::WorkerThread::thread_loop_wrapper(void*)
    () at /usr/local/lib/libopencv_core.so.4.1
#7  0x00007fffee3354cf in start_thread () at /usr/lib/libpthread.so.0
#8  0x00007fffee4522d3 in clone () at /usr/lib/libc.so.6

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions