Rocket Division Software http://www.starburnsoftware.com/forum/ |
|
UDFDataburner not releasing file locks http://www.starburnsoftware.com/forum/starburn-sdk-f3/udfdataburner-not-releasing-file-locks-t2166.html |
Page 1 of 2 |
Author: | Jason [ Wed Apr 20, 2011 7:28 pm ] |
Post subject: | UDFDataburner not releasing file locks |
After burning files with the UDFDataBurner we are releasing the file tree with UDFDataburner.Files.Clear() but it is not releasing the files (Trying to delete a file gives a error that the file is locked). We are using C# (.net 3.5) on Windows 7 64bit. In the DataBurner9.sln sample app supplied with the SDK we switched the DataBurner object to a UDFDataBurner object and experienced that same problem after burning a CD and clicking the Clear button. This did not release the file handle. Jason |
Author: | anton (staff) [ Thu Apr 21, 2011 5:17 am ] |
Post subject: | Re: UDFDataburner not releasing file locks |
What version of SDK do you use? Please supply complete log with version header uncut. Thanks! |
Author: | Jason [ Thu Apr 21, 2011 1:54 pm ] | ||
Post subject: | Re: UDFDataburner not releasing file locks | ||
Here are the logs and the versions Starburn.dll is 12.0.0.272 with product version v12 Trident II Build 20100110 StarburnX12.dll is 12.0.0.0 If you need anything else let me know.
|
Author: | anton (staff) [ Thu Apr 21, 2011 5:38 pm ] |
Post subject: | Re: UDFDataburner not releasing file locks |
OK, got the log, checking the issue on our side. |
Author: | Jason [ Fri Apr 29, 2011 4:19 pm ] |
Post subject: | Re: UDFDataburner not releasing file locks |
Just wondering what the status of this issue is. |
Author: | dima (staff) [ Mon May 02, 2011 3:07 pm ] |
Post subject: | Re: UDFDataburner not releasing file locks |
Hello, Jason You should release the DataBurner(UDFDataBurner) object to release all locked files! The calling of the "Files.Clear" function makes sense until your disc is not burned!! Regards, Dmitry |
Author: | Jason [ Mon May 02, 2011 4:13 pm ] | ||
Post subject: | Re: UDFDataburner not releasing file locks | ||
We are still unable to free the files after burning. I've included your sample app Databurner9.sln which I've modified to use the UDFDataburner. Nothing that I've add to the Clear button event unlocks the files. Only closing the app does this. Could you please show me what I need to change to free the files. Jason
|
Author: | dima (staff) [ Wed May 04, 2011 5:39 am ] |
Post subject: | Re: UDFDataburner not releasing file locks |
Hello, Jason You should also release all local IDataFile/IDataFolder objects: m_crossThreadParam_CurFolder = null; m_crossThreadParam_AddedFolder = null; Regards, Dmitry |
Author: | Jason [ Fri May 06, 2011 3:19 pm ] | ||
Post subject: | Re: UDFDataburner not releasing file locks | ||
I've add the two lines of code you suggested to the btnClear_Click event. Again this did not release the file lock. This is getting really frustrating as we are unable to use your burning library without a fix to this problem. Could you please look at your modified sample app that I have attached and reply with a working solution. Thanks Jason
|
Author: | dima (staff) [ Mon May 09, 2011 5:22 am ] |
Post subject: | Re: UDFDataburner not releasing file locks |
Hello, Jason I will check this issue today! Thanx, Dmitry |
Author: | dima (staff) [ Wed May 11, 2011 7:42 am ] |
Post subject: | Re: UDFDataburner not releasing file locks |
Hello, Jason It seems this is the 'C# example' issue! The C++ example release all used files! Dmitry |
Author: | Jason [ Wed May 11, 2011 4:01 pm ] |
Post subject: | Re: UDFDataburner not releasing file locks |
This is not a solution for us. Our project is written in C# so we need a C# solution. Please let me know when I can expect a fix for this issue. We would like to use your solution but with pending deadlines we may have to consider other vendors. Jason |
Author: | dima (staff) [ Thu May 12, 2011 4:29 am ] |
Post subject: | Re: UDFDataburner not releasing file locks |
Hello, Jason I will redesign the DataBurner C# example today and send it to you today. Regards, Dmitry |
Author: | dima (staff) [ Mon May 16, 2011 6:45 am ] |
Post subject: | Re: UDFDataburner not releasing file locks |
Hello, Jason When you set the COM interface object to null you make the interface object eligible for garbage collection, but the object doesn't get garbage collected right then and there!!! The .Net Garbage Collector tries to minimize overhead by running in the background which means you can never be sure when any particular object will be finalized!! So, you should release your Burning object manually by calling the System.Runtime.InteropServices.Marshal.ReleaseComObject(your_burning_object) method; private void OnStopBurningProgress() { ... // Now, we should release the current DataBurner object System.Runtime.InteropServices.Marshal.ReleaseComObject(m_udfDataBurner); // Create new DataBurner object m_udfDataBurner = new UDFDataBurnerClass(); ... } You should be very careful when using this approach ( ReleaseComObject ). Since this basically force the COM reference count to zero, this can have the effect of deactivating the COM server even when the server should not be deactivated - for example when other references to the COM object still exist. So, you should set the all DataBurner, DataFolder and DataFile members(variables) to null before calling the ReleaseComObject method. Regards, Dmitry |
Author: | Jason [ Mon May 16, 2011 3:16 pm ] |
Post subject: | Re: UDFDataburner not releasing file locks |
Thanks for your support. I finally got the file locks to be released. Your code sent us on the right path to fixing our issue. I did however have to add a force garbage collection to finally get the file locks released. //Final working sample private void OnStopBurningProgress() { ... // FinalReleaseComObject sets the reference count to 0; ReleaseComObject decrements it by 1; System.Runtime.InteropServices.Marshal.FinalReleaseComObject(m_udfDataBurner); GC.Collect(); // Create new DataBurner object m_udfDataBurner = new UDFDataBurnerClass(); ... } Thanks again for the timely support, Jason |
Page 1 of 2 | All times are UTC |
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group http://www.phpbb.com/ |