dotnet / winforms

Windows Forms is a .NET UI framework for building Windows desktop applications.
MIT License
4.38k stars 971 forks source link

Nuance's Dragon Professional fails to function with NET 8 & 9 but works with NET 7 and earlier #11120

Closed efm5 closed 6 months ago

efm5 commented 6 months ago

Description

Nuance's Dragon Professional fails to exercise Controls (menu item, button etc.) when apps are compiled with with NET 8 & 9 but works with NET 7 and earlier. When Dragon is running, it should be possible to say "click" followed by the text/label of a Control and have the handler procedure linked to that Control entered (and actions performed).

Reproduction Steps

0) Make sure Dragon 15.x or 16.x (the most recent versions) is running and listening. 1) Create a simple Windows Form app with a button whose text is "Horse". 1a) add a Click handler to the Button with its only code: MessageBox.Show("horse"); 2) Compile with NET 7 (for Windows 7.0) 3) Run the app and say "click horse" 4) Close the app 5) Compile with NET 8 (I also tested NET 9 - both fail) 6) Run the app and say "click horse"

Expected behavior

A built-in Dialog should open displaying "horse" as the message (with default title, buttons and icon).

Actual behavior

With NET 7 (and all previous going back to early Net Framework versions) the expected behavior occurs.

With both NET 8 & 9 nothing happens at all - the button is not exercised.

Regression?

Works perfectly in NET 7 but started failing sometime in NET 8 development.

Known Workarounds

Compile with NET 7 accepting all associated restrictions.

Configuration

NET 7 - works NET 8 & 9 - fails VS 2019 (tested a few versions), 2022 (tested at least 10 versions) & 2022 Preview (only tested Preview 2) - all act the same OS Win10 & Win 11 tested with identical results Tested with both "AnyCPU" and x64 - not specific works or fails in both Not using Blaxor

Other information

This is a major regression for developers working with the disabled community. I would be extremely happy to beta test NETs to help resolve this issue. I am a hands-free coder and have nothing but time on my hands! I am fairly experienced in NET Windows Form and Console coding and am the sole author on more than 10 major applications highly used by folks who use Dragon to operate their computers and dictate text. I would be willing to do remote desktop sessions at most any time of the day or night.

filipnavara commented 6 months ago

Hi! This should be filed in the https://github.com/dotnet/winforms repository. I'm sure eventually someone would move the issue over but if you want to speed things up you probably should file the issue directly there.

efm5 commented 6 months ago

Thanks for the transfer!

elachlan commented 6 months ago

@efm5 can you please provide a reproduction project in the issue description? Do you have the same issue with Accessibility Insights for Windows? You might also want to report this to Nuance and provide them with a link to this issue.

@Olina-Zhang can your team please test this?

efm5 commented 6 months ago

https://github.com/dotnet/winforms/assets/9344405/eca75f96-4157-4bfd-81b7-e0d49c4a00a0

NET9broken.zip here is a very simple project and a very brief video which demonstrates the problem

efm5 commented 6 months ago

I do not believe that Nuance accepts bug reports; that may have changed since its recent acquisition by Microsoft. They only offer telephone support for their software.

elachlan commented 6 months ago

Thank you so much for the video! The team will comment here soon and we will find out the next steps.

elachlan commented 6 months ago

@merriemcgaw this is an accessibility regression issue you might be interested in.

Olina-Zhang commented 6 months ago

There is a feedback with the same issue when using Nuance's Dragon Professional: https://developercommunity.visualstudio.com/t/NET-8-changed-breaking-Nuance%E2%80%99s-Dragon-P/10623024

Here is a clear video with sound from that feedback about describing the issue:

https://github.com/dotnet/winforms/assets/26474449/5216f0f8-c117-4010-be7b-180631c3be6f

merriemcgaw commented 6 months ago

@elachlan you're absolutely right we want to look into this ASAP! @efm5 thank you so much for bringing this up to our attention. Are there other scenarios that still work, or is WinForms completely non responsive to Dragon commands? @LeafShi1 can your team take a look at this issue and see if you can root cause it?

Tanya-Solyanik commented 6 months ago

@LeafShi1 - please investigate if Inspect can execute default action on a button under MSAA or Invoke.Invoke under UIA.

@Olina-Zhang - could you please search for any bugs related to timeouts in Invoke pattern, I seem to remember a customer report.

Tanya-Solyanik commented 6 months ago

@Olina-Zhang - please experiment with voice access on windows 11 - https://support.microsoft.com/topic/get-started-with-voice-access-bd2aa2dc-46c2-486c-93ae-3d75f7d053a4

Olina-Zhang commented 6 months ago

@Olina-Zhang - could you please search for any bugs related to timeouts in Invoke pattern, I seem to remember a customer report.

Is this one: https://github.com/dotnet/winforms/issues/10244? Which is regressed from .Net framework 4.8.

LeafShi1 commented 6 months ago

@LeafShi1 - please investigate if Inspect can execute default action on a button under MSAA or Invoke.Invoke under UIA.

@Olina-Zhang - could you please search for any bugs related to timeouts in Invoke pattern, I seem to remember a customer report.

Yes, Inspect can execute default action on a button under MSAA and Invoke.Invoke under UIA Result

Olina-Zhang commented 6 months ago

@Olina-Zhang - please experiment with voice access on windows 11 - https://support.microsoft.com/topic/get-started-with-voice-access-bd2aa2dc-46c2-486c-93ae-3d75f7d053a4

I tested winforms menuItem and button with voice access on windows 11, .Net 7 and .Net 9 behaviors are same: all can be invoked by Voice access commands, see the video as below:

https://github.com/dotnet/winforms/assets/26474449/c5992de0-573d-49fe-aceb-97e28faea211

Tanya-Solyanik commented 6 months ago

Thank you, Olina, for finding #10244! I believe this is a duplicate of this bug. We don't have source code for Nuance's Dragon tool, but InvokePattern.Invoke method is the way to open a named UIA Element, it's reasonable to assume that the root cause of the two bug is the same. @LeafShi1 - please prioritize #10244 within your team.