【问题标题】:Delphi2007: Crash when continuing paused app in debuggerDelphi2007:在调试器中继续暂停应用程序时崩溃
【发布时间】:2011-07-08 01:54:08
【问题描述】:

在 D2007 调试器中启动应用程序、暂停应用程序并继续(按 F9)时,我们经常会遇到崩溃。例如

  • 创建一个 VCL 应用程序
  • 在主窗体上放置一个 TButton 和一个 TEdit
  • 为 Button1 添加这个 OnClick 处理程序:

    procedure TForm1.Button1Click(Sender: TObject);
    var
      i: Integer;
    begin
      while True do
      begin
        for i := 0 to 9999 do
          Edit1.Text := IntToStr(Random(i));
        Application.ProcessMessages;
      end;
    end;
    
  • 保存并调试应用程序
  • 按下按钮1
  • 关注 IDE
  • 点击“暂停”按钮
  • 按 F9。

我们几乎总是遇到访问冲突。我在Windows 7/64bit下测试过这个,我的同事在XP/32bit下。在我同事的 D2006 中,我们无法重现此错误。

你能重现这个吗?任何想法如何解决它?

【问题讨论】:

  • 我在 XP/32 位上使用 delphi 2007,无法重现错误
  • 看看 QC。如果找不到类似的内容,请提交报告。
  • @David:我已经搜索了 QC 并没有发现任何相关内容。
  • Delphi 2007 和 2010、XP 32 位、Windows 7 32 位、Windows 7 64 位、Server 2003 32 位、Server 2008 64 位。无法重现抱歉。
  • 在我使用 Windows 7 和 Delphi 2007 时经常发生这种情况

标签: delphi crash debugging delphi-2007


【解决方案1】:

我们在 D2010(和之前的 D2007)中也时不时地有这个,但我无法重现这个。 (我们也使用Win7 64bit) 我会尝试用你的测试应用程序重现这个,谢谢!现在希望能以某种方式解决这个问题...

编辑:无法在 D2010 中重现此问题...将尝试 D2007

Edit2:但我可以在 D2007 中重现这个!
我还在事件日志中收到一些奇怪的错误:

Debug Output:    *** A stack buffer overrun occurred in   "C:\test\Project7.exe" :   Process Project7.exe (2584)
Debug Output: This is usually the result of a memory copy to a local buffer or structure where the size is not properly calculated/checked.  Process Project7.exe (2584)
Debug Output: If this bug ends up in the shipping product, it could be a severe security hole.  Process Project7.exe (2584)
Debug Output: The stack trace should show the guilty function (the function directly above __report_gsfailure).  Process Project7.exe (2584)
Debug Output:  *** enter .exr 772B43D0 for the exception record  Process Project7.exe (2584)
Debug Output:  *** then kb to get the faulting stack   Process Project7.exe (2584)

当我使用堆栈查看器 (http://code.google.com/p/asmprofiler/wiki/ProcessStackViewer) 和当前 Delphi 线程的原始堆栈跟踪(导致错误?)时,我看到以下堆栈:

[772791B3]{ntdll.dll   } RtlUnhandledExceptionFilter + $12
[7725CDF4]{ntdll.dll   } Unknown function at CsrVerifyRegion + $1B0
[771D28A6]{ntdll.dll   } memcpy + $5E6
[7725CDE4]{ntdll.dll   } Unknown function at CsrVerifyRegion + $1A0
[7725CDF4]{ntdll.dll   } Unknown function at CsrVerifyRegion + $1B0
[77243509]{ntdll.dll   } Unknown function at RtlUlonglongByteSwap + $16299
[771F6AC9]{ntdll.dll   } Unknown function at RtlDosSearchPath_Ustr + $ADA
[771F6ADD]{ntdll.dll   } Unknown function at RtlDosSearchPath_Ustr + $AEE
[771F6A9B]{ntdll.dll   } Unknown function at RtlDosSearchPath_Ustr + $AAC
[77220AE5]{ntdll.dll   } Unknown function at WinSqmSetIfMaxDWORD + $35
[771F6A3D]{ntdll.dll   } Unknown function at RtlDosSearchPath_Ustr + $A4E
[77220AE5]{ntdll.dll   } Unknown function at WinSqmSetIfMaxDWORD + $35
[6E931AE0]{AcLayers.DLL} Unknown function at NotifyShims + $73B6
[771C010F]{ntdll.dll   } KiUserExceptionDispatcher + $F
[6E931AE0]{AcLayers.DLL} Unknown function at NotifyShims + $73B6
[771E9960]{ntdll.dll   } Unknown function at RtlQueryEnvironmentVariable + $241
[6E8E0000]{AcLayers.DLL}  + $0
[771EA172]{ntdll.dll   } Unknown function at RtlAllocateActivationContextStack + $1CF
[6E8E1FFF]{AcLayers.DLL}  + $0
[6E8E0000]{AcLayers.DLL}  + $0
[768F4AF9]{ole32.dll   } Unknown function at ObjectStublessClient31 + $4AF6
[772B206C]{ntdll.dll   } NlsAnsiCodePage + $205C
[771EA14C]{ntdll.dll   } Unknown function at RtlAllocateActivationContextStack + $1A9
[6E8E1FFF]{AcLayers.DLL}  + $0
[77220AE5]{ntdll.dll   } Unknown function at WinSqmSetIfMaxDWORD + $35
[771E9E5C]{ntdll.dll   } Unknown function at RtlDecodePointer + $F7
[768F4B4D]{ole32.dll   } Unknown function at ObjectStublessClient31 + $4B4A
[77220AE5]{ntdll.dll   } Unknown function at WinSqmSetIfMaxDWORD + $35
[771E9E89]{ntdll.dll   } LdrInitializeThunk + $10
[771B0000]{ntdll.dll   }  + $0
[771B0000]{ntdll.dll   }  + $0
[7720EAB0]{ntdll.dll   } RtlExitUserThread + $0
[771C0190]{ntdll.dll   } RtlUserThreadStart + $0

我搜索了“AcLayers.DLL”(因为它对我来说有点奇怪)我找到了一篇关于 Vista 兼容模式和奇怪崩溃的文章 (http://www.nynaeve.net/?p=62)。 ..大概D2007不兼容Win7?

编辑 3:当我在没有兼容模式的情况下运行 D2007 时(?,只是运行 exe,不使用任务栏中的固定项目!)我得到同样的错误的频率降低了,堆栈不再显示 AcLayers.DLL,但我看不出当时出了什么问题(需要更多调查,现在没有更多时间)

【讨论】:

  • 感谢调查! Re Vista: 这个问题也出现在我同事的 XP 机器上。我会看看你的堆栈查看器。
  • 我没有看到“调试输出”行。你知道它们来自哪里吗? - 我在谷歌上找不到那个。
猜你喜欢
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
相关资源
最近更新 更多