Bug 5295 - Process cannot access file after debug restarting
Summary: Process cannot access file after debug restarting
Status: VERIFIED INVALID
Alias: None
Product: Xamarin Studio
Classification: Desktop
Component: Debugger ()
Version: 3.0.x
Hardware: PC Windows
: --- normal
Target Milestone: ---
Assignee: Jeffrey Stedfast
URL:
: 5455 ()
Depends on:
Blocks:
 
Reported: 2012-05-23 16:52 UTC by Marek
Modified: 2012-08-20 08:37 UTC (History)
3 users (show)

Tags:
Is this bug a regression?: ---
Last known good build:

Notice (2018-05-24): bugzilla.xamarin.com is now in read-only mode.

Please join us on Visual Studio Developer Community and in the Xamarin and Mono organizations on GitHub to continue tracking issues. Bugzilla will remain available for reference in read-only mode. We will continue to work on open Bugzilla bugs, copy them to the new locations as needed for follow-up, and add the new items under Related Links.

Our sincere thanks to everyone who has contributed on this bug tracker over the years. Thanks also for your understanding as we make these adjustments and improvements for the future.


Please create a new report on Developer Community or GitHub with your current version information, steps to reproduce, and relevant error messages or log files if you are hitting an issue that looks similar to this resolved bug and you do not yet see a matching new report.

Related Links:
Status:
VERIFIED INVALID

Description Marek 2012-05-23 16:52:59 UTC
Description of Problem:
After debug restarting included dll file is locked and cannot be overwritten.

Warning:
C:\Program Files (x86)\MSBuild\Novell\Novell.MonoDroid.Common.targets(2,2): Warning: The process cannot access the file 'D:\praca\SOURCE\QMobileAndro\ClassPrint\bin\Debug\ClassPrint.dll.mdb' because it is being used by another process.




Steps to reproduce the problem:
1. Create library
2. Change something to make compiler to rebuild it.


Actual Results:
Mono has to be restarted after every change in code

Expected Results:


How often does this happen? 
Always

Additional Information:
Comment 1 Mikayla Hutchinson [MSFT] 2012-05-23 17:21:13 UTC
I think the file lock is held by SoftDebuggerSession. It keeps references to a set of MonoSymbolFile instances, each of which keeps a reference to a reader on a mdb file stream. I guess SoftDebuggerSession needs to dispose all its MonoSymbolFile instances when the session ends.
Comment 2 Jeffrey Stedfast 2012-05-25 10:58:17 UTC
Fixed in git master and 3.0-series branch (will be in 3.0.3)
Comment 3 Marek 2012-05-25 17:13:48 UTC
It is OK now, thanks!
Comment 4 Marek 2012-05-26 03:15:17 UTC
Sorry, problem still appears :(
Comment 5 Mikayla Hutchinson [MSFT] 2012-06-01 12:26:28 UTC
*** Bug 5455 has been marked as a duplicate of this bug. ***