cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
anom217
Level 8

CA did not close MSIHANDLE

I have a Basic MSI project. During an installation, the install skipped over some of my custom actions. Upon inspection of the log, it appears the last CA to execute did not close the MSIHANDLE. The next few CA's that were supposed to be called were instead rejected.

[CODE]
InstallShield 15:47:09: CallScriptFunctionFromMsiCA() ends
MSI (s) (F8:F0) [15:47:10:024]: Leaked MSIHANDLE (381) of type 790531 for thread 2192
MSI (s) (F8:F0) [15:47:10:024]: Note: 1: 2769 2: ExecuteAppServerAntTasks 3: 1
Info 2769.Custom Action ExecuteAppServerAntTasks did not close 1 MSIHANDLEs.
MSI (s) (F8!90) [15:47:10:118]: API call rejected - No actions in Context
MSI (s) (F8:F8) [15:47:10:149]: Executing op: ActionStart(Name=DatabaseInstall,Description=Installing DOEHRS database. Please wait...,)
Action 15:47:10: DatabaseInstall. Installing DOEHRS database. Please wait...
MSI (s) (F8:F8) [15:47:10:180]: Executing op: CustomActionSchedule(Action=DatabaseInstall,ActionType=1025,Source=BinaryData,Target=f43,CustomActionData=C:\Program Files\DOEHRS-IH-T\Version 1.0.1.1\;ora4DOEHRS;ldb)
MSI (s) (F8!90) [15:47:10:211]: API call rejected - No actions in Context
MSI (s) (F8:28) [15:47:10:227]: Invoking remote custom action. DLL: C:\Windows\Installer\MSI4D9C.tmp, Entrypoint: f43
MSI (s) (F8:F8) [15:47:10:243]: Executing op: ActionStart(Name=VerifyDatabaseInstall,Description=Installing DOEHRS database. Please wait...,)
Action 15:47:10: VerifyDatabaseInstall. Installing DOEHRS database. Please wait...
MSI (s) (F8:F8) [15:47:10:305]: Executing op: CustomActionSchedule(Action=VerifyDatabaseInstall,ActionType=1025,Source=BinaryData,Target=f12,CustomActionData=C:\Program Files\DOEHRS-IH-T\Version 1.0.1.1\;ora4DOEHRS;ldb)
MSI (s) (F8!90) [15:47:10:305]: API call rejected - No actions in Context
MSI (s) (F8:AC) [15:47:10:336]: Invoking remote custom action. DLL: C:\Windows\Installer\MSI4E1A.tmp, Entrypoint: f12
MSI (s) (F8:F8) [15:47:10:352]: Executing op: ActionStart(Name=RegisterUser,Description=Registering user,Template=[1])
[/CODE]

This happens inconsistently and is hard to reproduce. Sometimes the msiexec process hangs instead of just continuing.

I have attached the verbose log. Can someone please elucidate this issue for me?
Labels (1)
0 Kudos
(3) Replies
anom217
Level 8

I believe I found the issue. After creating a MSI record I was calling CloseHandle instead of MsiCloseHandle. Apparently there are some memory leak issues with CloseHandle.
0 Kudos
anom217
Level 8

That is useful. I haven't seen that information anywhere else, and it certainly helps in debugging. For my issue, I knew where I was opening the handle and I saw I was closing it, but I was following an example that was using the incorrect function to close the handle (CloseHandle when I should have used MsiCloseHandle). Thanks for the tip though.
0 Kudos