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

Preferences crash when debugging in Windows #18385

Closed
AndersenBell opened this issue Oct 26, 2023 · 2 comments
Closed

Preferences crash when debugging in Windows #18385

AndersenBell opened this issue Oct 26, 2023 · 2 comments
Labels
area-essentials Essentials: Device, Display, Connectivity, Secure Storage, Sensors, App Info platform/windows 🪟 s/triaged Issue has been reviewed s/try-latest-version Please try to reproduce the potential issue on the latest public version t/bug Something isn't working

Comments

@AndersenBell
Copy link

Description

When I attach a breakpoint on a line that will be reading from the Preferences and debug a windows instance of the app, the application throws an error:
System.TypeInitializationException: 'The type initializer for 'WinRT.ActivationFactory`1' threw an exception.'
Inner Exception:
COMException: ClassFactory cannot supply requested class

If I don't have a breakpoint on the line, it works successfully

Steps to Reproduce

MauiApp3 - Microsoft Visual Studio Preview 2023-10-26 11-42-08.zip

Link to public reproduction project repository

https://github.com/AndersenBell/MAUI-Preferenes-Win-Bug

Version with bug

8.0.0-rc.2.9373

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

net8.0-windows10.0.19041.0

Did you find any workaround?

if you don't debug, then it works, or if you call Preferences.ContainsKey first

Relevant log output

System.TypeInitializationException: 'The type initializer for 'WinRT.ActivationFactory`1' threw an exception.'
Inner Exception:
COMException: ClassFactory cannot supply requested class
@AndersenBell AndersenBell added the t/bug Something isn't working label Oct 26, 2023
@jsuarezruiz jsuarezruiz added the area-essentials Essentials: Device, Display, Connectivity, Secure Storage, Sensors, App Info label Oct 27, 2023
@Zhanglirong-Winnie Zhanglirong-Winnie added s/triaged Issue has been reviewed s/try-latest-version Please try to reproduce the potential issue on the latest public version labels Apr 19, 2024
Copy link
Contributor

Hi @AndersenBell. We have added the "s/try-latest-version" label to this issue, which indicates that we'd like you to try and reproduce this issue on the latest available public version. This can happen because we think that this issue was fixed in a version that has just been released, or the information provided by you indicates that you might be working with an older version.

You can install the latest version by installing the latest Visual Studio (Preview) with the .NET MAUI workload installed. If the issue still persists, please let us know with any additional details and ideally a reproduction project provided through a GitHub repository.

This issue will be closed automatically in 7 days if we do not hear back from you by then - please feel free to re-open it if you come back to this issue after that time.

@Zhanglirong-Winnie
Copy link

Zhanglirong-Winnie commented Apr 19, 2024

Verified this issue with Visual Studio 17.10.0 Preview 3(8.0.7&8.0.0-rc.2.9373). Not repro on windows platform.
image

@github-actions github-actions bot locked and limited conversation to collaborators May 26, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
area-essentials Essentials: Device, Display, Connectivity, Secure Storage, Sensors, App Info platform/windows 🪟 s/triaged Issue has been reviewed s/try-latest-version Please try to reproduce the potential issue on the latest public version t/bug Something isn't working
Projects
None yet
Development

No branches or pull requests

4 participants