我的 Delphi 项目 (MyProject) 遇到问题。在没有我参与的情况下(一如既往)出现的问题基本上归结为未显示的表格。我检查了 .dpr 文件,它看起来像这样:
// Removed code above for brevity
begin
Application.Initialize;
Application.MainFormOnTaskbar := True;
Application.CreateForm(TfrmMain, frmMain);
Application.Run;
end.
我检查了.dfm,表单对我来说看起来不错(我之前从未意识到表单的可见性默认设置是假的,所以我认为就是这样 - 只是发现设置为真可见并没有解决我的问题问题)。
换句话说,我已经检查了我所知道的所有相关设置。所以我创建了一个新的、新鲜的项目(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。
这对任何人都意味着什么?我还能做些什么来进一步挖掘问题?谢谢!