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

Mac: Exception message sometimes not printed, an issue with cef.ExceptHook #382

Closed
cztomczak opened this issue Aug 3, 2017 · 1 comment
Milestone

Comments

@cztomczak
Copy link
Owner

Exception message is sometimes not printed on Mac. In examples the default Python exception handler is overwritten with CEF Python's exception handler using this code:

sys.excepthook = cef.ExceptHook

This is required so that all CEF processes are shutdown on error. Otherwise in some cases zombie processes may be left running in background. Noticed this issue many years ago, but I don't remember which OS was that exactly. ExceptHook was to fix that, but whether using this handler is still required would need further testing using latest CEF. There have been many changes in upstream Chromium and maybe this ain't issue anymore?

Getting back to the core of the issue. It seems that calling cef.Shutdown() on Mac may prevent further execution of the Python code, because the code in ExceptHook looked like this:

cef.QuitMessageLoop()
cef.Shutdown()
print exception
os._exit(1)

So the exception won't be printed if cef Shutdown procedure kills the process immediately which apparently occurs sometimes on Mac.

This issue was already fixed in master some time ago in commit 87123af . Creating this issue to track this bug.

@cztomczak
Copy link
Owner Author

As explained earlier this is already fixed in master, so closing.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant