#1 Burning Software

It is currently Wed Dec 18, 2024 10:12 pm

All times are UTC




Post new topic Reply to topic  [ 16 posts ]  Go to page 1, 2  Next
Author Message
 Post subject: UDFDataburner not releasing file locks
PostPosted: Wed Apr 20, 2011 7:28 pm 
Offline

Joined: Wed Apr 20, 2011 7:10 pm
Posts: 7
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


Top
 Profile  
 
 Post subject: Re: UDFDataburner not releasing file locks
PostPosted: Thu Apr 21, 2011 5:17 am 
Offline
Site Admin

Joined: Fri Jun 18, 2004 12:03 am
Posts: 4089
Location: British Virgin Islands
What version of SDK do you use? Please supply complete log with version header uncut. Thanks!


Top
 Profile  
 
 Post subject: Re: UDFDataburner not releasing file locks
PostPosted: Thu Apr 21, 2011 1:54 pm 
Offline

Joined: Wed Apr 20, 2011 7:10 pm
Posts: 7
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.


Attachments:
File comment: Logs
starburn_log.zip [8.8 KiB]
Downloaded 1197 times
Top
 Profile  
 
 Post subject: Re: UDFDataburner not releasing file locks
PostPosted: Thu Apr 21, 2011 5:38 pm 
Offline
Site Admin

Joined: Fri Jun 18, 2004 12:03 am
Posts: 4089
Location: British Virgin Islands
OK, got the log, checking the issue on our side.


Top
 Profile  
 
 Post subject: Re: UDFDataburner not releasing file locks
PostPosted: Fri Apr 29, 2011 4:19 pm 
Offline

Joined: Wed Apr 20, 2011 7:10 pm
Posts: 7
Just wondering what the status of this issue is.


Top
 Profile  
 
 Post subject: Re: UDFDataburner not releasing file locks
PostPosted: Mon May 02, 2011 3:07 pm 
Offline

Joined: Thu Dec 13, 2007 8:44 am
Posts: 609
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


Top
 Profile  
 
 Post subject: Re: UDFDataburner not releasing file locks
PostPosted: Mon May 02, 2011 4:13 pm 
Offline

Joined: Wed Apr 20, 2011 7:10 pm
Posts: 7
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


Attachments:
DataBurnerSampleApp.zip [90.44 KiB]
Downloaded 1180 times
Top
 Profile  
 
 Post subject: Re: UDFDataburner not releasing file locks
PostPosted: Wed May 04, 2011 5:39 am 
Offline

Joined: Thu Dec 13, 2007 8:44 am
Posts: 609
Hello, Jason

You should also release all local IDataFile/IDataFolder objects:

m_crossThreadParam_CurFolder = null;
m_crossThreadParam_AddedFolder = null;


Regards,

Dmitry


Top
 Profile  
 
 Post subject: Re: UDFDataburner not releasing file locks
PostPosted: Fri May 06, 2011 3:19 pm 
Offline

Joined: Wed Apr 20, 2011 7:10 pm
Posts: 7
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


Attachments:
DataBurnerSampleApp2.zip [255.15 KiB]
Downloaded 1160 times
Top
 Profile  
 
 Post subject: Re: UDFDataburner not releasing file locks
PostPosted: Mon May 09, 2011 5:22 am 
Offline

Joined: Thu Dec 13, 2007 8:44 am
Posts: 609
Hello,

Jason I will check this issue today!

Thanx,

Dmitry


Top
 Profile  
 
 Post subject: Re: UDFDataburner not releasing file locks
PostPosted: Wed May 11, 2011 7:42 am 
Offline

Joined: Thu Dec 13, 2007 8:44 am
Posts: 609
Hello, Jason

It seems this is the 'C# example' issue! The C++ example release all used files!

Dmitry


Top
 Profile  
 
 Post subject: Re: UDFDataburner not releasing file locks
PostPosted: Wed May 11, 2011 4:01 pm 
Offline

Joined: Wed Apr 20, 2011 7:10 pm
Posts: 7
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


Top
 Profile  
 
 Post subject: Re: UDFDataburner not releasing file locks
PostPosted: Thu May 12, 2011 4:29 am 
Offline

Joined: Thu Dec 13, 2007 8:44 am
Posts: 609
Hello, Jason

I will redesign the DataBurner C# example today and send it to you today.

Regards,

Dmitry


Top
 Profile  
 
 Post subject: Re: UDFDataburner not releasing file locks
PostPosted: Mon May 16, 2011 6:45 am 
Offline

Joined: Thu Dec 13, 2007 8:44 am
Posts: 609
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


Top
 Profile  
 
 Post subject: Re: UDFDataburner not releasing file locks
PostPosted: Mon May 16, 2011 3:16 pm 
Offline

Joined: Wed Apr 20, 2011 7:10 pm
Posts: 7
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


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 16 posts ]  Go to page 1, 2  Next

All times are UTC


Who is online

Users browsing this forum: No registered users and 21 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group