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

Get System.ArgumentException error when exiting net 8 or 9 mobile windows app that used border.shadow #25014

Open
davefxy opened this issue Sep 30, 2024 · 5 comments
Assignees
Labels
area-controls-border Border i/regression This issue described a confirmed regression on a currently supported version platform/windows 🪟 s/triaged Issue has been reviewed s/verified Verified / Reproducible Issue ready for Engineering Triage t/bug Something isn't working
Milestone

Comments

@davefxy
Copy link

davefxy commented Sep 30, 2024

Description

When I use <Border.Shadow> on a .Net Maui Net8 or later mobile app running on Windows 11, upon exiting the app I see numerous instances of :
Exception thrown: 'System.ArgumentException' in System.Private.CoreLib.dll
WinRT information: The caller is not allowed to perform this operation on this object.

Steps to Reproduce

On Windows compile and runthe "Windows Machine" debug version of the https://github.com/CommunityToolkit/Maui/tree/main/samples/CommunityToolkit.Maui.Sample.
Select Views, then select Avatar Views Shadows
Exit the app and view the Output window.
You will see at the bottom, multiple instances of 👍
Exception thrown: 'System.ArgumentException' in System.Private.CoreLib.dll
WinRT information: The caller is not allowed to perform this operation on this object.

Link to public reproduction project repository

https://github.com/CommunityToolkit/Maui/tree/main/samples/CommunityToolkit.Maui.Sample.

Version with bug

9.0.0-rc.1.24453.9

Is this a regression from previous behavior?

Not sure, did not test other versions

Last version that worked well

Unknown/Other

Affected platforms

Windows

Affected platform versions

Windows 11

Did you find any workaround?

No

Relevant log output

OnAppearing: Views
'CommunityToolkit.Maui.Sample.exe' (CoreCLR: clrhost): Loaded 'C:\Program Files\dotnet\shared\Microsoft.NETCore.App\8.0.8\System.Runtime.Intrinsics.dll'. 
OnDisappearing: Views
OnAppearing: AvatarView Shadows
OnDisappearing: AvatarView Shadows
Exception thrown: 'System.ArgumentException' in System.Private.CoreLib.dll
WinRT information: The caller is not allowed to perform this operation on this object.
Exception thrown: 'System.ArgumentException' in System.Private.CoreLib.dll
WinRT information: The caller is not allowed to perform this operation on this object.
Exception thrown: 'System.ArgumentException' in System.Private.CoreLib.dll
WinRT information: The caller is not allowed to perform this operation on this object.
Exception thrown: 'System.ArgumentException' in System.Private.CoreLib.dll
WinRT information: The caller is not allowed to perform this operation on this object.
Exception thrown: 'System.ArgumentException' in System.Private.CoreLib.dll
WinRT information: The caller is not allowed to perform this operation on this object.
Exception thrown: 'System.ArgumentException' in System.Private.CoreLib.dll
WinRT information: The caller is not allowed to perform this operation on this object.
Exception thrown: 'System.ArgumentException' in System.Private.CoreLib.dll
WinRT information: The caller is not allowed to perform this operation on this object.
Exception thrown: 'System.ArgumentException' in System.Private.CoreLib.dll
WinRT information: The caller is not allowed to perform this operation on this object.
Exception thrown: 'System.ArgumentException' in System.Private.CoreLib.dll
WinRT information: The caller is not allowed to perform this operation on this object.
Exception thrown: 'System.ArgumentException' in System.Private.CoreLib.dll
WinRT information: The caller is not allowed to perform this operation on this object.
The program '[35900] CommunityToolkit.Maui.Sample.exe' has exited with code 0 (0x0).
@davefxy davefxy added the t/bug Something isn't working label Sep 30, 2024
@jfversluis
Copy link
Member

Can you reproduce this without the Community Toolkit? Why do you think this is something in .NET MAUI and not in the .NET MAUI Community Toolkit?

@jfversluis jfversluis added platform/windows 🪟 s/needs-info Issue needs more info from the author area-controls-border Border labels Sep 30, 2024
@davefxy
Copy link
Author

davefxy commented Sep 30, 2024

Yes I reproduced it with a simple mod to the default new app created with vs 2022 Preview
ShadowTest.zip

@dotnet-policy-service dotnet-policy-service bot added s/needs-attention Issue has more information and needs another look and removed s/needs-info Issue needs more info from the author labels Sep 30, 2024
@jfversluis
Copy link
Member

You mention this starting to happen as of .NET 8, are you able to retrace what version is the latest version where this didn't happen?

@jfversluis jfversluis added potential-regression This issue described a possible regression on a currently supported version., verification pending and removed s/needs-attention Issue has more information and needs another look labels Oct 1, 2024
@jfversluis jfversluis added this to the Backlog milestone Oct 1, 2024
@davefxy
Copy link
Author

davefxy commented Oct 1, 2024

I started noticing this issue when working on a new Net 8 app. I didn't notice this issue until Net 8. I started making more of an effort to use Borders instead of Frames during the move to Net 8.

@Foda Foda self-assigned this Oct 11, 2024
@ninachen03 ninachen03 added s/verified Verified / Reproducible Issue ready for Engineering Triage s/triaged Issue has been reviewed i/regression This issue described a confirmed regression on a currently supported version and removed potential-regression This issue described a possible regression on a currently supported version., verification pending labels Oct 17, 2024
@ninachen03
Copy link

This issue has been verified using Visual Studio 17.12.0 Preview 3.0(9.0.0-rc.1.24453.9 & 8.0.92 & 8.0.3). Can repro it. but works fine on17.11.5 (7.0.101).
Note : We should disable the 'Just My Code' Option in Debug setting to repro this issue.

Image

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area-controls-border Border i/regression This issue described a confirmed regression on a currently supported version platform/windows 🪟 s/triaged Issue has been reviewed s/verified Verified / Reproducible Issue ready for Engineering Triage t/bug Something isn't working
Projects
None yet
Development

No branches or pull requests

4 participants