Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Not all file handles are closed after Cef.Shutdown #3726

Open
Mik4sa opened this issue Jun 28, 2024 · 9 comments
Open

Not all file handles are closed after Cef.Shutdown #3726

Mik4sa opened this issue Jun 28, 2024 · 9 comments
Labels
bug Bug report help wanted Issue resolution will likely require community contributions windows Windows platform

Comments

@Mik4sa
Copy link

Mik4sa commented Jun 28, 2024

Describe the bug
I'm coming from CefSharp and was told to open an issue here. I hope this is fine.
This is the original issue: cefsharp/CefSharp#4852

I have set a custom RootCache path and want to delete that cache folder after Cef.Shutdown is called (during the application shutdown). But using the (new) Chrome Bootstrap some files still have open handles so the whole folder can't be deleted. Changing the runtime back to Alloy Bootstrap (in the same version) the folder can be deleted afterwards as expected.

Note: There is a big difference in what is written to that directory (not sure if this is a problem too).
This is what I get with Alloy Bootstrap:
image

and this is what I get with Chrome Bootstrap:
image

Expected behavior
All file handles should be cleared after Cef.Shutdown was successfully called.

Versions (please complete the following information):

  • OS: Windows 11 (Version 23H2 Build 22631.3810)
  • CEF Version: 126.2.7

Additional context

Does the problem reproduce with the cefclient or cefsimple sample application at the same version?

Not tested, but I don't think so since the folder isn't deleted afaik.

Does the problem reproduce with Google Chrome at the same version?

No

@Mik4sa Mik4sa added the bug Bug report label Jun 28, 2024
@magreenblatt
Copy link
Collaborator

What are the files with open handles? See here for tools that will tell you.

@magreenblatt magreenblatt added the windows Windows platform label Jul 1, 2024
@Mik4sa
Copy link
Author

Mik4sa commented Jul 2, 2024

Everything in the orange box:
image

Note that my RootCache path is: %localappdata%/CefSharp/RootCache

@magreenblatt
Copy link
Collaborator

Are child processes still running after you call CefShutdown?

@Mik4sa
Copy link
Author

Mik4sa commented Jul 3, 2024

Doesn't look so.

Before Cef.Shutdown:
image

After Cef.Shutdown:
image

@magreenblatt
Copy link
Collaborator

OK. Some of these files (like chrome_debug.log) likely aren't closed until all child processes have terminated.

@Mik4sa
Copy link
Author

Mik4sa commented Jul 3, 2024

But all child processes are closed. The one process marked in the second screenshot is the main process (CefSharp...exe)

@magreenblatt
Copy link
Collaborator

But all child processes are closed. The one process marked in the second screenshot is the main process (CefSharp...exe)

Right, but in case they're not closed immediately after CefShutdown returns (for you or someone else), it could still be an issue.

@tomeroed
Copy link

We are also facing this exact issue, with no current solution.
The following files are being held and can not be deleted when the application exits.
2024-10-23 14_10_25-

@SASoper
Copy link

SASoper commented Oct 28, 2024

This issue still exists in CefSharp.WinForms version 128.4.9.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Bug report help wanted Issue resolution will likely require community contributions windows Windows platform
Projects
None yet
Development

No branches or pull requests

4 participants