cefsharp / CefSharp

.NET (WPF and Windows Forms) bindings for the Chromium Embedded Framework
http://cefsharp.github.io/
Other
9.75k stars 2.92k forks source link

Deleting the RootCache directory after Cef.Shutdown doesn't work with the Chrome Bootstrap #4852

Open Mik4sa opened 1 week ago

Mik4sa commented 1 week ago

Is there an existing issue for this?

CefSharp Version

126.2.70

Operating System

Windows 11

Architecture

x64

.Net Version

.Net 4.8

Implementation

WinForms

Reproduction Steps

Checkout my example: https://github.com/Mik4sa/CefSharp.MinimalExample I took the current MinimalExample, upgraded it to the latest version 126.2.70 and made a small change which reflects our situation: https://github.com/Mik4sa/CefSharp.MinimalExample/commit/28c9693673d1d784af68157f53ba852740712229

Expected behavior

Calling Cef.Shutdown should release all resources / handles so that deleting the RootCache directory works.

Actual behavior

After calling Cef.Shutdown some handles are still kept (for example to the debug.log file). The RootCache directory can't be deleted.

Regression?

This worked in the previous version 125.0.210. Also this works when changing back to Alloy Bootstrap

Known Workarounds

This works when changing back to Alloy Bootstrap

Does this problem also occur in the CEF Sample Application

Not Tested

Other information

In our application we want to delete the custom configured RootCache directory. Doing so worked until 126.2.70. With this version and the Chrome Bootstrap this is no longer possible. The reason is that there are still some handles to some files in that directory. For example the debug.log file. So the whole directory can't be deleted. I also noticed that way more files are written as before. Is this expected? Or is this maybe already the underlaying reason?

With Alloy Bootstrap: image

With Chrome Bootstrap: image

amaitland commented 1 week ago

You'll need to raise your issue on https://github.com/chromiumembedded/cef/issues (post a link back here for reference)

Mik4sa commented 1 week ago

Thanks. Wasn't sure if this is really upstream. Will do later this day :)

Mik4sa commented 1 week ago

Do you think it's okay to write basically the same and that I'm coming from CefSharp? Or do I need to write more generally?