Visual studio 2010 VS2008到VS2010-配置和升级有问题-新手
我在下面的开头用一个执行摘要更新了这个问题。然后,如果需要的话,会有大量的细节。谢谢你的建议 执行摘要: 我是VS的新手。我对一些继承的代码有问题。代码在VS2008(XP64)上构建和执行良好。使用VS2008和/或VS2010在XP64或W7上生成和不运行相同的代码,或者生成失败。在更改了一些编译器选项之后,我设法让它在XP64上的VS2010上运行而没有问题;然而,在W7,没有运气 我最终发现堆正在被破坏 ae312i3.3.exe中0x76e540f2(ntdll.dll)处未处理的异常:0xC0000374:堆已损坏 我不熟悉如何考虑解决堆问题;可能现有代码中指向另一个线程或程序正在使用的内存的指针存在问题,ntdll.dll文件损坏,其他 重新启动电脑检查ntdll.dll是否已损坏没有帮助。已更改调试设置,并收到以下反馈: 堆[ae312i3.3.exe]:为RtlSizeHeap指定的地址无效(0000000000 220000,00000000 2BC8BE58) Windows已在ae312i3.3.exe中触发断点 这可能是由于堆损坏,这表明ae312i3.3.exe或其加载的任何DLL中存在错误。这也可能是由于ae312i3.3.exe具有焦点时用户按F12造成的Visual studio 2010 VS2008到VS2010-配置和升级有问题-新手,visual-studio-2010,debugging,upgrade,Visual Studio 2010,Debugging,Upgrade,我在下面的开头用一个执行摘要更新了这个问题。然后,如果需要的话,会有大量的细节。谢谢你的建议 执行摘要: 我是VS的新手。我对一些继承的代码有问题。代码在VS2008(XP64)上构建和执行良好。使用VS2008和/或VS2010在XP64或W7上生成和不运行相同的代码,或者生成失败。在更改了一些编译器选项之后,我设法让它在XP64上的VS2010上运行而没有问题;然而,在W7,没有运气 我最终发现堆正在被破坏 ae312i3.3.exe中0x76e540f2(ntdll.dll)处未处理的异常
<强>当崩溃时,C++将布尔变量返回到窗体>/P>的表达式
While(myQueryFcn(inputvars))
- 问题:
With FormMain
WriteComment("")
WriteComment("Generated by :")
WriteComment("")
WriteComment(" Program : " & .PROGRAM.ToUpper) // THIS IS WARNING LINE!!!
警告4的代码:
' Compare material against the material table
For iRowMat As Integer = 0 To matCount - 1
' Ignore new row
If Not .Rows(iRowMat).IsNewRow Then
' Check material description
// LINE BELOW IS WARNING LINE!!!
If .Item("ColMatDesc", iRowMat).Value = matDesc Then
DataGridMatProp.Item("ColMatIdx", iRow).Value = .Item("ColMatFile", iRowMat).Value
Exit For
End If ' Check description
End If ' Check new row
Next iRowMat
当我构建解决方案时,它将成功构建,没有错误(但有许多警告),当我运行可执行文件时,它成功加载GUI,但在执行查询或读取器项目(使用GUI按钮执行操作后)时(在执行以下信息后)会崩溃:
C:\Users\mcgrete\AppData\Local\Temp\WER5D31.tmp.WERInternalMetadata.xml
C:\Users\mcgrete\AppData\Local\Temp\WER68E6.tmp.appcompat.txt
C:\Users\mcgrete\AppData\Local\Temp\WER722A.tmp.mdmp
我无法利用上面三个文件中的信息(不知如何考虑)。
我在W7中收到的警告与XP64中的警告非常相似/如果不完全相同的话;它们大致有以下几种类型,有1600多种。将上面列出的4个原始警告添加到下面的警告类型中。由于我成功地在XP64上运行,而不是在W7上运行,我假设/希望这些问题不需要单独解决,而只是警告
OdbQueryGetIncrement(str_out, vec_ptr)
//Gets the next item in a list.
// Returns false if there is the vector is empty.
// NOTE: Once an element is returned it is removed from the list.
bool __stdcall OdbQueryGetItem(
char* &str_out, // RETURN Next item in list.
void * vec_ptr, // Pointer to the vector of pointers.
int index) // Index of pointers vector to return next item of.
{
// Cast the point into an array of pointers
std::vector<std::string>* *vec_temp = (std::vector<std::string>* *) vec_ptr;
bool bool_out = false;
char vectempsize[1000];
int TEM1;
char temp[1000];
TEM1 = vec_temp[index]->size();
// Check vector is valid
if (vec_temp) {
if(vec_temp[index]->size() >= index)
{
sprintf(temp,"value: %d\n",(int)bool_out);
::MessageBoxA(0, (LPCSTR) temp, (LPCSTR) "OdbQuery.dll - bool_out", MB_ICONINFORMATION);
sprintf(temp,"value: %d\n",(int)index);
::MessageBoxA(0, (LPCSTR) temp, (LPCSTR) "OdbQuery.dll - index", MB_ICONINFORMATION);
sprintf(vectempsize,"value: %d\n",(int)TEM1);
::MessageBoxA(0, (LPCSTR) temp, (LPCSTR) "OdbQuery.dll - index", MB_ICONINFORMATION);
}
if (!vec_temp[index]->empty()) {
// Get the next item in the list
std::string item = vec_temp[index]->front();
// Initialise ouput string
str_out = (char*)malloc( item.size()*sizeof(char) );
sprintf(str_out, "%s", item.c_str());
::MessageBoxA(0,(LPCSTR) str_out, (LPCSTR) "hello", 0);
// Remove first item from the vector
vec_temp[index]->erase(vec_temp[index]->begin());
bool_out = true;
}
}
sprintf(temp,"value: %d\n",(int)bool_out);
::MessageBoxA(0, (LPCSTR) temp, (LPCSTR) "OdbQuery.dll - bool_out", MB_ICONINFORMATION);
return bool_out;
}
str_out=(char*)malloc( (item.size()+1)*sizeof(char) );