在调试 Firemonkey 应用程序(一个弹跳球)时,在球四处移动大约一分钟后,此消息开始涌入 EventLog:
模块加载:D3DCOMPILER_47.dll。没有调试信息。基址:14D50000 美元。处理 bo.exe (13824) 线程开始:线程 ID:14268。处理 bo.exe (13824)
它使调试模式几乎毫无用处。这是一个 Delphi Architect 试用版,空白表单 Firemonkey 应用程序。我想可能是因为它是试用版。
在这种情况发生之前,我确实看到大约三个线程开始了。我没有有意识地启动任何线程,但我假设一个用于用户界面,一个用于调试器?我不知道。这是一个有代表性的样本:
Module Load: imagehlp.dll. No Debug Info. Base Address: $74A30000. Process bo.exe (19228)
Module Load: GPAPI.dll. No Debug Info. Base Address: $612D0000. Process bo.exe (19228)
Module Load: CRYPTNET.dll. No Debug Info. Base Address: $60900000. Process bo.exe (19228)
Module Load: IPHLPAPI.DLL. No Debug Info. Base Address: $739B0000. Process bo.exe (19228)
Module Load: WINNSI.DLL. No Debug Info. Base Address: $72B40000. Process bo.exe (19228)
Module Load: NSI.dll. No Debug Info. Base Address: $74940000. Process bo.exe (19228)
Module Load: ltc_game32.dll. No Debug Info. Base Address: $11D60000. Process bo.exe (19228)
Thread Start: Thread ID: 16400. Process bo.exe (19228)
Thread Start: Thread ID: 19268. Process bo.exe (19228)
Thread Start: Thread ID: 18640. Process bo.exe (19228)
Thread Exit: Thread ID: 16400. Process bo.exe (19228)
Thread Start: Thread ID: 6096. Process bo.exe (19228)
Module Load: D3DCOMPILER_47.dll. No Debug Info. Base Address: $14510000. Process bo.exe (19228)
Module Unload: D3DCOMPILER_47.dll. Process bo.exe (19228)
最后两行将无限重复。
更新#1(已编辑):我不想调试 D3DCompiler。我试图找出减速的原因。
更新#2:我关闭了模块的调试器消息,这没有帮助。在同一近似点,应用程序的速度急剧下降。这仅在调试时发生。
更新#3:如何重新创建:
- 启动一个新的多设备应用程序。
- 选择空白应用程序。
- 删除一个 TTimer。
- 放下一个 TRectangle。
- 添加一个布尔公共变量“up”。
对于 Timer1Timer 添加以下代码:
procedure TForm1.Timer1Timer(Sender: TObject); begin if up then my := -1 else my := 1; if (Rectangle1.Position.Y + my < 10) or (Rectangle1.Position.Y + my > 470) then up := not up else Rectangle1.Position.Y := Rectangle1.Position.Y + my; end;
将 TTimer 间隔设置为较低的值。在我的机器上,我可以产生高达大约 60 间隔的效果。这是我能够做到的尽可能小,同时仍然得到上述调试器的磨削。