WindowsCommunityToolkit
WindowsCommunityToolkit copied to clipboard
RadialGauge Crashes when version 2004 new Custom Text Cursor enabled
Describe the bug
RadialGauge Crashes when version 2004 Ease of Use Text Cursor is enabled Try it out in the Toolkit Sample App and see it happen.
- [ ] Is this bug a regression in the toolkit? If so, what toolkit version did you last see it work:
Steps to Reproduce
Steps to reproduce the behavior:
- Go to 'Ease of Use Settings/ Text cursor'
- Click on 'Turn on Text Cursor.'
- Scroll down to '....'
- See error
Expected behavior
A clear and concise description of what you expected to happen.
Screenshots
If applicable, add screenshots to help explain your problem.
Environment
NuGet Package(s):
Package Version(s):
Windows 10 Build Number:
- [ ] Fall Creators Update (16299)
- [ ] April 2018 Update (17134)
- [ ] October 2018 Update (17763)
- [ ] May 2019 Update (18362)
- [ ] Insider Build (build number: )
App min and target version:
- [ ] Fall Creators Update (16299)
- [ ] April 2018 Update (17134)
- [ ] October 2018 Update (17763)
- [ ] May 2019 Update (18362)
- [ ] Insider Build (xxxxx)
Device form factor:
- [ ] Desktop
- [ ] Xbox
- [ ] Surface Hub
- [ ] IoT
Visual Studio
- [ ] 2017 (version: )
- [ ] 2019 (version: )
- [ ] 2019 Preview (version: )
Additional context
Add any other context about the problem here.
Hello buccaneerjim, thank you for opening an issue with us!
I have automatically added a "needs triage" label to help get things started. Our team will analyze and investigate the issue, and escalate it to the relevant team if possible. Other community members may also look into the issue and provide feedback 🙌
@buccaneerjim I am not able to follow the process. Can you please provide more detailed information on this? Screenshot or gif would also be great to highlight the error you see.
Turn on Text Cursor in Windows 10 version 2004 [cid:[email protected]]
Control is missing in the ToolKit Sample App.
Apps fail that have that use RadialGauge Control when it’s value changes. If the new Enhanced Text Cursor is enabled.
[cid:[email protected]]
Turn off the Enhanced Text Cursor option and it’s back After reloading the Demo App.
[cid:[email protected]]
@Kyaa-dost it's this setting here:
I turned it on my 2004 machine after loading the Radial Gauge sample, as soon as I went back and clicked in the sample after turning it on, I hit the exception.
System.InvalidCastException
HResult=0x80004002
Message=Specified cast is not valid.
Source=<Cannot evaluate the exception source>
StackTrace:
<Cannot evaluate the exception stack trace>
It's on coming from L774 in RadialGauge:
https://github.com/windows-toolkit/WindowsCommunityToolkit/blob/b31c819301811c415f8974630f154b5c92ae25ca/Microsoft.Toolkit.Uwp.UI.Controls/RadialGauge/RadialGauge.cs#L774
Which makes no sense, the method is performing the calculation and returning a double, I can't see a reason why this logic should be effected by a graphic overlay...
If I restart the sample app with the feature on from the beginning, it runs the constructor of the control, but doesn't hit OnApplyTemplate.
I'm curious if this repros on an older OS version (or is this a new OS feature?) and if it repros outside of the sample app (as we do special magic, though that normally isn't a problem, but that's where it's failing). I can turn the text feature back on, edit the XAML and it comes back. This really feels like an underlying platform issue...
FYI @ranjeshj who would be good to talk to about this?
@ranjeshj @stephenlpeters any thoughts on this issue? Does this sound like anything that could be related to an OS issue? Who'd be a good person to connect with as this doesn't seem particularly specific to anything RadialGauge should be trying to do?
Unable to repro on 21H1 (19043.1415) and the latest version of the toolkit.