Share

NAnt - A .NET Build Tool

Tracker: Bugs

5 comregister handle leak - ID: 2853031
Last Update: Comment added ( thetoejoe )

If DLL cannot be loaded into memory due to missing DLLs, comregister will
fail as expected.
But it does not let go of the handle, so any operations to follow fail due
to access denied problems.

<comregister unregister="true" failonerror="false"
file="C:\Projects\Receiver\bin\PSFileStore.dll" />
<delete file="C:\Projects\Receiver\bin\PSFileStore.dll" />

C:\Projects\Receiver\Components\PSFileStore>nant
NAnt 0.86 (Build 0.86.2898.0; beta1; 12/8/2007)
Copyright (C) 2001-2007 Gerry Shaw
http://nant.sourceforge.net

Buildfile:
file:///C:/Projects/Receiver/Components/PSFileStore/PSFileStore.build
Target framework: Microsoft .NET Framework 3.5
Target(s) specified: release

[property] Target framework changed to "Microsoft .NET Framework 2.0".
[loadtasks] Scanning assembly "GigaTrust.NAntExtensions" for extensions.
[loadtasks] Scanning assembly "NAnt.Contrib.Tasks" for extensions.

release:


compile:


buildVC:


_unregisteronbuild:

[echo] deleting
[comregister] Unregistering 1 files
[comregister] C:\Projects\Receiver\NAnt\default.include.build(305,4):
[comregister] Error while unregistering
'C:\Projects\Receiver\bin\PSFileStore.dll'
[comregister] Error accessing the OLE registry. (Exception from
HRESULT: 0x8002801C (TYPE_E_REGISTRYACCESS))
[delete] Deleting file C:\Projects\Receiver\bin\PSFileStore.dll.

BUILD FAILED - 1 non-fatal error(s), 0 warning(s)

C:\Projects\Receiver\NAnt\default.include.build(306,4):
Cannot delete file 'C:\Projects\Receiver\bin\PSFileStore.dll'.
Access to the path 'C:\Projects\Receiver\bin\PSFileStore.dll' is
denied.

Total time: 0.3 seconds.


Tom DeMay ( thetoejoe ) - 2009-09-06 16:57

5

Open

None

Nobody/Anonymous

Tasks

0.86

Public


Comments ( 2 )

Date: 2009-09-06 22:21
Sender: thetoejoe

I can't send you the DLL I used. Code provided in original post. Just use
ANY com dll and make sure dependent DLLs are not in the path.


Date: 2009-09-06 18:30
Sender: driesengProject AdminAccepting Donations

Please attach a small repro to this bug report.

Thanks!


Attached File

No Files Currently Attached

Change

No changes have been made to this artifact.