我正在通过使用MFC观看图像处理程序来逐一学习。 如果加载存储在PC中的图像文件进行图像处理,则会出现如下所示的错误。 原因远吗?
Visual Studio中的调试器生成的错误日志如下所示。
'Image_Tool.exe'(Win32): 'C:\Windows\SysWOW64\xmllite.dll' unloaded
0x161c thread is closed (code : 0 (0x0)).
'Image_Tool.exe'(Win32): 'C:\Windows\SysWOW64\WMASF.DLL' unloaded
'Image_Tool.exe'(Win32): 'C:\Windows\SysWOW64\mfperfhelper.dll' unloaded
'Image_Tool.exe'(Win32): 'C:\Windows\SysWOW64\WMVCORE.DLL' unloaded
'Image_Tool.exe'(Win32): 'C:\Windows\SysWOW64\audiodev.dll' unloaded
'Image_Tool.exe'(Win32): 'C:\Windows\SysWOW64\wpdshext.dll' unloaded
Debug Assertion Failed!
Program: C:\WINDOWS\SYSTEM32\mfc120ud.dll
File: f:\dd\vctools\vc7libs\ship\atlmfc\src\mfc\filecore.cpp
Line: 302
在Visual Studio中,我被告知程序结束的位置
void CImage_ToolDoc::OnReverseImg()
{
for (int i = 0; i < 256; i++)
{
for (int j = 0; j < 256; j++)
{
m_OutImg[i][j] = 255 - m_InImg[i][j];
}
UpdateAllViews(NULL);
}
}
void CImage_ToolDoc::TwoImgLoad()
{
CFile file;
CFileDialog opendlg1(TRUE, NULL, NULL, OFN_ALLOWMULTISELECT, NULL);
if (opendlg1.DoModal() == IDOK)
{
file.Open(opendlg1.GetFileName(), CFile::modeRead);
file.Read(m_InImg1, sizeof(m_InImg1));
file.Close();
}
CFileDialog opendlg2(TRUE, NULL, NULL, OFN_ALLOWMULTISELECT, NULL);
if (opendlg2.DoModal() == IDOK)
{
file.Open(opendlg2.GetFileName(), CFile::modeRead);
file.Read(m_InImg2, sizeof(m_InImg2));
file.Close();
}
}
调试断言对话框: