Cinder samples weird error related to memory allocation

Hi,

I’ve got fresh install of VS2015 (Windows 10) and Cinder and I have built library itself and then also all the samples.

But I’m getting weird errors related to memory allocation. For example FallingGears:

|verbose| SceneController::reConfigIslandGroup[314] f0: 57
|verbose| SceneController::reConfigIslandGroup[314] f0: 52
Exception thrown at 0x73F708B2 in FallingGears.exe: Microsoft C++ exception: cinder::app::AssetLoadExc at memory location 0x0019E630.
|error | Config::reload[29] exception caught: class cinder::app::AssetLoadExc, what: Failed to load asset with relative path: config.json
Exception thrown at 0x73F708B2 in FallingGears.exe: Microsoft C++ exception: cinder::JsonTree::ExcChildNotFound at memory location 0x0019DFC0.
|error | Config::getBackgroundImage[51] exception caught: class cinder::JsonTree::ExcChildNotFound, what: Could not find child: background for node:
|verbose| SceneController::reConfigIslandGroup[314] f0: 59
|verbose| SceneController::reConfigIslandGroup[314] f0: 54

Exception thrown at 0x73F708B2 in FallingGears.exe: Microsoft C++ exception: _com_error at memory location 0x05A7C88C.
Exception thrown at 0x73F708B2 in FallingGears.exe: Microsoft C++ exception: [rethrow] at memory location 0x00000000.

Exception thrown at 0x73F708B2 in FallingGears.exe: Microsoft C++ exception: std::out_of_range at memory location 0x0019BDFC.
|fatal | cinder::app::AppBase::executeLaunch[197] Uncaught exception, type: class std::out_of_range, what: invalid vector subscript
Exception thrown at 0x73F708B2 in FallingGears.exe: Microsoft C++ exception: [rethrow] at memory location 0x00000000.
Unhandled exception at 0x73F708B2 in FallingGears.exe: Microsoft C++ exception: std::out_of_range at memory location 0x0019BDFC.

Run-Time Check Failure #0 - The value of ESP was not properly saved across a function call. This is usually a result of calling a function declared with one calling convention with a function pointer declared with a different calling convention.


Also I tried create simple app that load json file from assests:

DataSourceRef ref = loadAsset(filename);
JsonTree jsonTree = JsonTree(ref);

And I’m getting:

Exception thrown at 0x73F708B2 in VGenApp.exe: Microsoft C++ exception: std::bad_alloc at memory location 0x0019C704.
Exception thrown at 0x73F708B2 in VGenApp.exe: Microsoft C++ exception: std::bad_alloc at memory location 0x0019BBB8.
Exception thrown at 0x73F708B2 in VGenApp.exe: Microsoft C++ exception: [rethrow] at memory location 0x00000000.
|error | cinder::app::AppBase::executeLaunch[137] Uncaught exception, type: class std::bad_alloc, what : bad allocation
Exception thrown at 0x73F708B2 in VGenApp.exe: Microsoft C++ exception: [rethrow] at memory location 0x00000000.
Unhandled exception at 0x73F708B2 in VGenApp.exe: Microsoft C++ exception: std::bad_alloc at memory location 0x0019BBB8.


When I try to check if asset exists:

fs::path pathToFile = getAssetPath(“timetable.json”);
if (fs::exists(pathToFile)) {
cout << "File Exists = " << pathToFile << std::endl;
}
else {
cout << “Cannot find file.” << std::endl;
}

I get:

Run-Time Check Failure #0 - The value of ESP was not properly saved across a function call. This is usually a result of calling a function declared with one calling convention with a function pointer declared with a different calling convention.

Does anybody know what I’m doing wrong?

Thanks!

Could it be that you mixed up a static Cinder build with a dynamic (DLL) sample build or vice versa?

Hm, Cinder is built as static library (.lib) and samples are using this library. I don’t see any conflict.

Well, I solved it by using latest Boost library.