Skip to content

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 👍🏻

@cmb69 cmb69 closed this in e75061b Nov 25, 2024
@cmb69 cmb69 deleted the cmb/gh16849 branch November 25, 2024 22:10
charmitro pushed a commit to wasix-org/php that referenced this pull request Mar 13, 2025
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>

Closes phpGH-16850.
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