0

I tried to create simple program using Halide. Used first tutorial copy paste few lines of code. Then got some problem at

e = x + y;

line;

#include "stdafx.h"
#include "Halide.h"

int main()
{
    Halide::Func gradient;
    Halide::Var x, y;
    Halide::Expr e;
    e = x + y;
    return 0;

Error: Debug Assertion Failed!

Program: D:\SVN\Inzynierka\Source\HDRView\x64\Debug\test.exe File: f:\dd\vctools\crt\crtw32\misc\dbgheap.c Line: 1424

Expression: _pFirstBlock == pHead

Callstack:

>   msvcr120d.dll!_free_dbg_nolock(void * pUserData, int nBlockUse) Line 1424   C++
    msvcr120d.dll!_free_dbg(void * pUserData, int nBlockUse) Line 1265  C++
    msvcr120d.dll!operator delete(void * pUserData) Line 54 C++
    Halide.dll!00007ffe3bfc2232()   Unknown
    Halide.dll!00007ffe3bfb7a8d()   Unknown
    Halide.dll!00007ffe3bfaae28()   Unknown
    Halide.dll!00007ffe3bfabe97()   Unknown
    Halide.dll!00007ffe3c29ea9a()   Unknown
    test.exe!Halide::Internal::Variable::make(Halide::Type type, std::basic_string<char,std::char_traits<char>,std::allocator<char> > name) Line 3738   C++
    test.exe!Halide::Var::operator Halide::Expr() Line 6269 C++
    test.exe!main() Line 12 C++
    [External Code] 

Edit:

I found solution to my problem. Visual Studio 2015 was guilty. After changig Platform Toolset in project properties to Visual Studio 2013, everything works fine... Thank you all for help.

1 Answer 1

0

The problem is likely due to a mismatch between the C++ runtime library used to compile your program and that used to compile the Halide library. Try changing the C++ runtime library setting in your project settings to the 'DLL' version.

1
  • I tried changing the project -> c/c++ -> code generation ->Runtime Library to all 4 posibilities in my project, but all of them crashes same Apr 26, 2016 at 20:45

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.