我在 Windows 10 x64、VisualStudio 2019 上构建了Shogun toolbox ML master。我运行了 classifier_minimal_svm 示例;它有效,但每次SGVector
超出范围时我都会收到此错误
{
SGVector<float64_t> y_values(100);
}
有这个错误:
Critical error detected c0000374
classifier_minimal_svm.exe has triggered a breakpoint.
Exception thrown at 0x00007FFC395DB0B9 (ntdll.dll) in classifier_minimal_svm.exe: 0xC0000374: A heap has been corrupted
(parameters: 0x00007FFC396427F0).
Unhandled exception at 0x00007FFC395DB0B9 (ntdll.dll) in classifier_minimal_svm.exe: 0xC0000374: A heap has been corrupted (parameters: 0x00007FFC396427F0).
classifier_minimal_svm.exe!shogun::sg_free(void * ptr) Line 186 C++
classifier_minimal_svm.exe!shogun::sg_generic_free<double,0>(double * ptr) Line 124 C++
classifier_minimal_svm.exe!shogun::SGVector<double>::free_data() Line 405 C++
classifier_minimal_svm.exe!shogun::SGReferencedData::unref() Line 102 C++
classifier_minimal_svm.exe!shogun::SGVector<double>::~SGVector<double>() Line 173 C++
我编辑了一个示例,仅使用这些代码行就出现了错误:
#include <shogun/lib/SGVector.h>
int main(int argc, char** argv)
{
shogun::SGVector<float64_t> y_values1(100);
return 0;
}