我在读取地址 0xfeeefeee 时不断遇到访问冲突,其中调试器在 Ntdll.NtRaiseException 上停止,我无法进一步调试,因为我得到一个循环条件告诉我应用程序在...处出现故障...使用步骤或运行...这让我回到了起点。这显然只发生在 IDE (Delphi XE2) 32 位中。我的应用程序正在使用以下代码
Var
XMLDoc: IXMLDocument;
Begin
If FOD.Execute Then //File Open Dialog
Begin
Try
Try
XMLdoc := NewXMLDocument(); //TXMLDocument.Create(Nil);
Result := FOD.FileName;
XMLDoc.FileName := XMLFilename;
XMLDoc.Active := True;
当文件打开时,我调用从 xml 数据绑定向导 (File New Other XML) 加载的函数来解析在上面的 proc 中打开的 xml 文件。我的意图只是创建一个 csv 文件,然后使用 sqlldr 将数据导出到 oracle 数据库。在 IDE 之外找到所有工作,我可以让应用程序运行,只是在一夜之间在 sring 网格中显示数据,但在 ide 中它会在几分钟内崩溃。调用堆栈没有显示任何有用的信息。如您所见,我尝试过 TXMDocument.create 和 NewXML,但无济于事。我尝试将对象放在表单上并使用该实例无济于事。任何人请有任何想法。(Windows 7 64 位,但由于 oracle 依赖,我正在编译为 32 位)
编辑,即使打开了调试 dcus,调用堆栈也显示没有任何用处,只是对 ole32.dll 和其他与 nt 相关的 dll 的引用
该应用程序的代码如下所示(其中一些)
Function TXMLForm.OpenFile: String;
Var
XMLDoc: IXMLDocument;
Begin
If FOD.Execute Then
Begin
Try
Try
XMLdoc := NewXMLDocument(); //TXMLDocument.Create(Nil);
Result := FOD.FileName;
XMLDoc.FileName := XMLFilename;
XMLDoc.Active := True;
SB1.Panels[1].Text := FOD.Filename;
Finally
// xmldoc := nil;
End;
Except
On E: Exception Do
ShowMessage('Excpetion in Opening or creating XML Document. ' + E.Message);
End;
End
Else
Result := '';
End;
openfile 由这种类型的过程调用
Procedure TXMLForm.StandardProfile1Click(Sender: TObject);
Var
Stand: Standard.IXMLProfileData;
I, X: Integer;
Begin
XMLFileName := Openfile;
If Xmlfilename <> '' Then
Begin
Stand := Standard.LoadProfileData(XMLFileName);
SG1.RowCount := Stand.Count;
Sg1.ColCount := Stand.Device[Stand.Count - 1].Count + 7;
// SG1.ColCount := 55;
SG1.Cells[0, 0] := 'SERIALNO';
SG1.Cells[1, 0] := 'MFGSERIALNO';
SG1.Cells[2, 0] := 'SUPPLYTYPE';
SG1.Cells[3, 0] := 'SERVICEPOINTNO';
SG1.Cells[4, 0] := 'PARAMETERCODE';
SG1.Cells[5, 0] := 'INTERVALPERIOD';
SG1.Cells[6, 0] := 'STARTTIME';
// For X := 0 To 47 Do
// SG1.Cells[7 + X, 0] := 'INTERVAL' + Inttostr(X);
For X := 0 To Stand.Device[Stand.Count - 1].Count - 1 Do
SG1.Cells[7 + X, 0] := 'INTERVAL' + Inttostr(X);
For I := 0 To Stand.Count - 1 Do
Begin
SG1.Cells[0, I + 1] := Stand.Device[I].SerialNo;
SG1.Cells[1, I + 1] := Stand.Device[I].MfgSerialNo;
SG1.Cells[2, I + 1] := Stand.Device[I].SupplyType;
SG1.Cells[3, I + 1] := Stand.Device[I].ServicePointNo;
SG1.Cells[4, I + 1] := Stand.Device[I].ParameterCode;
SG1.Cells[5, I + 1] := Stand.Device[I].IntervalPeriod;
SG1.Cells[6, I + 1] := Stand.Device[I].StartTime;
// For X := 0 To 47 Do
For X := 0 To Stand.Device[Stand.Count - 1].Count - 1 Do // 47
Begin
If Stand.Device[I].Interval[X] = '' Then
SG1.Cells[7 + X, I + 1] := 'TRUE'
Else
SG1.Cells[7 + X, I + 1] := Stand.Device[I].Interval[X];
End;
End;
End;
End;
如前所述,我尝试使用 TXMDocument、IXMLDocument 并使用 Create 和 NewXMDocument,但这仍然会出现错误。DEbug dcus' 没有任何区别。我已经厌倦了在项目标题和 MadExcept 中使用 FastMM4,但他们没有发现错误。