Open file fails in MSVC debug mode.
Posted: 2014-03-28T11:39:08-07:00
Using MSVC Visual Express 2013 under Windows 8.1 with Magick++ 6.8.8-9 in debug mode, the following program fails with error:
The program works correctly when compiled in release mode.
c:\temp\clue.bmp is a valid bmp file.
The file name in the error message varies but always contains garbage characters.
ImageMagick-6.8.8-9-Q16-x86-dll.exeCaught exception: img1.exe: unable to open image `Lùš': No such file or directory @ error/blob.c/OpenBlob/2645
The program works correctly when compiled in release mode.
The exception fails in line: Image im("c:/temp/clue.bmp");#include "targetver.h"
#include <tchar.h>
#include "Magick++.h"
#include <iostream>
using namespace Magick;
using namespace std;
int _tmain(int argc, _TCHAR* argv[])
{
try {
InitializeMagick("c:/temp/im");
Image im("c:/temp/clue.bmp");
}
catch (Exception &error_)
{
cout << "Caught exception: " << error_.what() << endl;
return 1;
}
return 0;
}
c:\temp\clue.bmp is a valid bmp file.
The file name in the error message varies but always contains garbage characters.