德尔福表格不会显示 - 怀疑停止加载

时间:2012-12-12 08:06:43

标签: delphi-xe2 vcl

我遇到了我的Delphi项目(MyProject)。在没有我参与的情况下(一如既往)出现过夜的问题,基本上归结为没有显示的形式。我检查了.dpr文件,它看起来像这样:

// Removed code above for brevity
begin
  Application.Initialize;
  Application.MainFormOnTaskbar := True;
  Application.CreateForm(TfrmMain, frmMain);
  Application.Run;
end.

我检查了.dfm,表单对我来说没问题(我之前从未意识到表单的可见性的默认设置是错误的,所以我认为就是这样 - 只是发现设置可见为true不解决我的问题。)

换句话说,我已经检查了我所知道的所有相关设置。所以我创建了一个新的,新创建的项目(NewProject)。新项目的事件日志如下所示:

Thread Start: Thread ID: 6460. Process NewProject.exe (1776)
Process Start: C:\code\NewProject.exe. Base Address: $00400000. Process NewProject.exe (1776)
Module Load: NewProject.exe. Has Debug Info. Base Address: $00400000. Process NewProject.exe (1776)
Module Load: ntdll.dll. No Debug Info. Base Address: $778A0000. Process NewProject.exe (1776)
Module Load: KERNEL32.dll. No Debug Info. Base Address: $76470000. Process NewProject.exe (1776)
Module Load: KERNELBASE.dll. No Debug Info. Base Address: $765C0000. Process NewProject.exe (1776)
Module Load: OLEAUT32.dll. No Debug Info. Base Address: $76830000. Process NewProject.exe (1776)
Module Load: ole32.dll. No Debug Info. Base Address: $752C0000. Process NewProject.exe (1776)
Module Load: msvcrt.dll. No Debug Info. Base Address: $76E70000. Process NewProject.exe (1776)
Module Load: GDI32.dll. No Debug Info. Base Address: $76DE0000. Process NewProject.exe (1776)
Module Load: USER32.dll. No Debug Info. Base Address: $76730000. Process NewProject.exe (1776)
Module Load: ADVAPI32.dll. No Debug Info. Base Address: $768C0000. Process NewProject.exe (1776)
Module Load: SECHOST.dll. No Debug Info. Base Address: $752A0000. Process NewProject.exe (1776)
Module Load: RPCRT4.dll. No Debug Info. Base Address: $754F0000. Process NewProject.exe (1776)
Module Load: SspiCli.dll. No Debug Info. Base Address: $74F80000. Process NewProject.exe (1776)
Module Load: CRYPTBASE.dll. No Debug Info. Base Address: $74F70000. Process NewProject.exe (1776)
Module Load: LPK.dll. No Debug Info. Base Address: $77870000. Process NewProject.exe (1776)
Module Load: USP10.dll. No Debug Info. Base Address: $76BE0000. Process NewProject.exe (1776)
Module Load: MSIMG32.dll. No Debug Info. Base Address: $74320000. Process NewProject.exe (1776)
Module Load: VERSION.dll. No Debug Info. Base Address: $74310000. Process NewProject.exe (1776)
Module Load: COMCTL32.dll. No Debug Info. Base Address: $74170000. Process NewProject.exe (1776)
Module Load: SHLWAPI.dll. No Debug Info. Base Address: $76D00000. Process NewProject.exe (1776)
Module Load: SHELL32.dll. No Debug Info. Base Address: $75740000. Process NewProject.exe (1776)
Module Load: WINSPOOL.DRV. No Debug Info. Base Address: $74110000. Process NewProject.exe (1776)
Module Load: IMM32.dll. No Debug Info. Base Address: $76960000. Process NewProject.exe (1776)
Module Load: MSCTF.dll. No Debug Info. Base Address: $75420000. Process NewProject.exe (1776)
Module Load: UxTheme.dll. No Debug Info. Base Address: $74040000. Process NewProject.exe (1776)
Module Load: dwmapi.dll. No Debug Info. Base Address: $706E0000. Process NewProject.exe (1776)
Module Load: WTSAPI32.dll. No Debug Info. Base Address: $740F0000. Process NewProject.exe (1776)
Module Load: WINSTA.dll. No Debug Info. Base Address: $740C0000. Process NewProject.exe (1776)
Thread Start: Thread ID: 6928. Process NewProject.exe (1776)
Thread Start: Thread ID: 484. Process NewProject.exe (1776)
Module Load: BtMmHook.dll. No Debug Info. Base Address: $10000000. Process NewProject.exe (1776)
Module Load: PSAPI.DLL. No Debug Info. Base Address: $755E0000. Process NewProject.exe (1776)
Module Load: ole32.dll. No Debug Info. Base Address: $04150000. Process NewProject.exe (1776)
Module Unload: ole32.dll. Process NewProject.exe (1776)
Module Load: ole32.dll. No Debug Info. Base Address: $04150000. Process NewProject.exe (1776)
Module Unload: ole32.dll. Process NewProject.exe (1776)
Module Load: CLBCatQ.DLL. No Debug Info. Base Address: $76F20000. Process NewProject.exe (1776)

当行为不端项目输出以下事件日志时:

Thread Start: Thread ID: 6880. Process MyProject.exe (7296)
Process Start: C:\code\MyProject\MyProject.exe. Base Address: $00400000. Process MyProject.exe (7296)
Module Load: MyProject.exe. Has Debug Info. Base Address: $00400000. Process MyProject.exe (7296)
Module Load: ntdll.dll. No Debug Info. Base Address: $778A0000. Process MyProject.exe (7296)
Module Load: KERNEL32.dll. No Debug Info. Base Address: $76470000. Process MyProject.exe (7296)
Module Load: KERNELBASE.dll. No Debug Info. Base Address: $765C0000. Process MyProject.exe (7296)
Module Load: OLEAUT32.dll. No Debug Info. Base Address: $76830000. Process MyProject.exe (7296)
Module Load: ole32.dll. No Debug Info. Base Address: $752C0000. Process MyProject.exe (7296)
Module Load: msvcrt.dll. No Debug Info. Base Address: $76E70000. Process MyProject.exe (7296)
Module Load: GDI32.dll. No Debug Info. Base Address: $76DE0000. Process MyProject.exe (7296)
Module Load: USER32.dll. No Debug Info. Base Address: $76730000. Process MyProject.exe (7296)
Module Load: ADVAPI32.dll. No Debug Info. Base Address: $768C0000. Process MyProject.exe (7296)
Module Load: SECHOST.dll. No Debug Info. Base Address: $752A0000. Process MyProject.exe (7296)
Module Load: RPCRT4.dll. No Debug Info. Base Address: $754F0000. Process MyProject.exe (7296)
Module Load: SspiCli.dll. No Debug Info. Base Address: $74F80000. Process MyProject.exe (7296)
Module Load: CRYPTBASE.dll. No Debug Info. Base Address: $74F70000. Process MyProject.exe (7296)
Module Load: LPK.dll. No Debug Info. Base Address: $77870000. Process MyProject.exe (7296)
Module Load: USP10.dll. No Debug Info. Base Address: $76BE0000. Process MyProject.exe (7296)
Module Load: MSIMG32.dll. No Debug Info. Base Address: $74320000. Process MyProject.exe (7296)
Module Load: VERSION.dll. No Debug Info. Base Address: $74310000. Process MyProject.exe (7296)
Module Load: SHFOLDER.dll. No Debug Info. Base Address: $70A10000. Process MyProject.exe (7296)
Module Load: SHELL32.dll. No Debug Info. Base Address: $75740000. Process MyProject.exe (7296)
Module Load: SHLWAPI.dll. No Debug Info. Base Address: $76D00000. Process MyProject.exe (7296)
Module Load: COMCTL32.dll. No Debug Info. Base Address: $74170000. Process MyProject.exe (7296)
Module Load: WININET.dll. No Debug Info. Base Address: $75180000. Process MyProject.exe (7296)
Module Load: Normaliz.dll. No Debug Info. Base Address: $76CF0000. Process MyProject.exe (7296)
Module Load: iertutil.dll. No Debug Info. Base Address: $769C0000. Process MyProject.exe (7296)
Module Load: urlmon.dll. No Debug Info. Base Address: $76610000. Process MyProject.exe (7296)
Module Load: COMDLG32.dll. No Debug Info. Base Address: $76D60000. Process MyProject.exe (7296)
Module Load: WINSPOOL.DRV. No Debug Info. Base Address: $74110000. Process MyProject.exe (7296)
Module Load: IMM32.dll. No Debug Info. Base Address: $76960000. Process MyProject.exe (7296)
Module Load: MSCTF.dll. No Debug Info. Base Address: $75420000. Process MyProject.exe (7296)
Module Load: UxTheme.dll. No Debug Info. Base Address: $74040000. Process MyProject.exe (7296)
Module Load: dwmapi.dll. No Debug Info. Base Address: $706E0000. Process MyProject.exe (7296)
Module Load: WTSAPI32.dll. No Debug Info. Base Address: $740F0000. Process MyProject.exe (7296)
Module Load: WINSTA.dll. No Debug Info. Base Address: $740C0000. Process MyProject.exe (7296)
Thread Start: Thread ID: 7888. Process MyProject.exe (7296)
Thread Start: Thread ID: 6236. Process MyProject.exe (7296)
Module Load: BtMmHook.dll. No Debug Info. Base Address: $10000000. Process MyProject.exe (7296)
Module Load: PSAPI.DLL. No Debug Info. Base Address: $755E0000. Process MyProject.exe (7296)

我意识到两个事件日志看起来不一样的原因很充分,因此这可能是最好的方向。具体来说,失败的项目(MyProject)包含更多的库,这会导致更多的DLL被加载。

有一件事让我思考:失败的项目在加载PSAPI.DLL后停止加载,而工作项目在显示表单之前做的最后一件事就是加载CLBCatQ.DLL。

这对任何人都意味着什么吗?我还能做些什么来进一步深入研究这个问题?谢谢!

1 个答案:

答案 0 :(得分:0)

经典PEBKAC。主窗体构造函数有问题,因此没有显示任何形式。

带回家信息:不要用简单的问题制造复杂的问题。