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

Fix GH-16849: Error dialog causes process to hang #16850

Open
wants to merge 1 commit into
base: PHP-8.2
Choose a base branch
from

Conversation

cmb69
Copy link
Member

@cmb69 cmb69 commented Nov 18, 2024

If _DEBUG is set, assertion failures and errors are directed to a debug message window by default[1]. That causes a process to hang, since these dialogs are modal. While we already cater to assertion failures, errors have apparently been overlooked.

We choose a minimal fix for BC reasons; although passing 0 as reportMode is undocumented, it obviously works fine for a long time. We may consider to improve on this for the master branch.

[1] https://learn.microsoft.com/en-us/cpp/c-runtime-library/reference/crtsetreportmode

If `_DEBUG` is set, assertion failures and errors are directed to a
debug message window by default[1].  That causes a process to hang,
since these dialogs are modal.  While we already cater to assertion
failures, errors have apparently been overlooked.

We choose a minimal fix for BC reasons; although passing `0` as
`reportMode` is undocumented, it obviously works fine for a long time.
We may consider to improve on this for the `master` branch.

[1] <https://learn.microsoft.com/en-us/cpp/c-runtime-library/reference/crtsetreportmode>
@cmb69 cmb69 requested a review from bukka as a code owner November 18, 2024 22:01
@cmb69 cmb69 linked an issue Nov 18, 2024 that may be closed by this pull request
@dktapps
Copy link
Contributor

dktapps commented Nov 18, 2024

Yep, this fixes the issue I was having 👍🏻

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

Successfully merging this pull request may close these issues.

Error dialog causes process to hang
2 participants