Unable to cancel SendMessage when switching apps in some cases #3825

Closed
nvaccessAuto opened this Issue Jan 28, 2014 · 10 comments

2 participants

@nvaccessAuto

Reported by jteh on 2014-01-28 08:57
We hook SendMessage and SendMessageTimeout so that we can cancel them from watchdog. The hook uses SendMessageTimeout in a loop with a pretty short timeout. Unfortunately, it seems that SendMessageTimeout blocks until the window responds when switching apps in some cases, regardless of the timeout. SMTO_BLOCK fixes this, but it also breaks PowerPoint (#2900). I guess it gets stuck handling some sort of nonqueued message, but I can't see that in the stack.

Str:
1. Find an app that you can cause to freeze on demand. A manufactured test case is probably easiest. :)
2. Open that app and Notepad++.
3. Ensure you can switch from the freezing app to Notepad++ with one keystroke; e.g. fiddle with the alt+tab order.
4. Cause the freeze.
5. Switch to Notepad++.
Watchdog can't recover from this freeze, no matter how hard it tries.

We can get around this by running SendMessageTimeout in a background thread.
Blocked by #3801, #3859

@nvaccessAuto

Comment 2 by jteh on 2014-01-29 04:43
Changes:
Milestone changed from None to next

@nvaccessAuto

Comment 3 by James Teh <jamie@... on 2014-01-29 04:44
In [3c44d74]:
```CommitTicketReference repository="" revision="3c44d744d50a45012abd094324fd2eaaafbd7eed"
Merge branch 't3825' into next: NVDA now recovers in more cases when switching away from applications that stop responding.

Incubates #3825.

Changes:
Added labels: incubating
@nvaccessAuto

Comment 4 by James Teh <jamie@... on 2014-01-31 08:02
In [043b984]:
```CommitTicketReference repository="" revision="043b984d12876139c06822d6997c94dccc25fab4"
Merge branch 't3825' into next

Incubates #3825.

@nvaccessAuto

Comment 5 by James Teh <jamie@... on 2014-02-03 10:39
In [2b2fd0a]:
```CommitTicketReference repository="" revision="2b2fd0ae21d2ccff8bcf73aa3ff0732cf7d1e267"
Merge branch 't3825' into next

Incubates #3825.

@nvaccessAuto

Comment 6 by jteh on 2014-02-04 04:45
This branch now depends on the code for #3801.

@nvaccessAuto

Comment 7 by James Teh <jamie@... on 2014-02-04 05:54
In [74c3fb4]:
```CommitTicketReference repository="" revision="74c3fb43998596de719e179cf6c0ba03c60250de"
Merge branch 't3825' into next

Incubates #3825, #3801.

@nvaccessAuto

Comment 9 by James Teh <jamie@... on 2014-02-10 08:57
In [b590520]:
```CommitTicketReference repository="" revision="b5905203599957de8e3ca1e43b7283f249c4938a"
Merge branch 't3825' into next

Incubates #3825.

@nvaccessAuto

Comment 10 by James Teh <jamie@... on 2014-02-11 06:12
In [e145bbc]:
```CommitTicketReference repository="" revision="e145bbcaca343bce55b554ef0f831d9fa21b57fd"
Merge branch 't3825' into next

Incubates #3825.

@nvaccessAuto

Comment 11 by James Teh <jamie@... on 2014-05-01 06:24
In [9b97de0]:
```CommitTicketReference repository="" revision="9b97de0d20eb4720230771d301e3f2e486f6b0a5"
NVDA now recovers in more cases when switching away from applications that stop responding.

Fixes #3825.

Changes:
Removed labels: incubating
State: closed
@nvaccessAuto

Comment 12 by jteh on 2014-05-01 06:25
Changes:
Milestone changed from next to 2014.2

@jcsteh jcsteh was assigned by nvaccessAuto Nov 10, 2015
@nvaccessAuto nvaccessAuto added this to the 2014.2 milestone Nov 10, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment