Open mysteryx93 opened 8 months ago
When it's "God knows", it's often about threading. And this error message confirms it. Can it be that your app interacts with Avalonia APIs from multiple threads?
Specifically, AvaloniaPropertyRegistry.Register
might have been executed in parallel from different static constructors, while being accidentally accessed from the thread pool thread.
We probably should add Dispatcher.CheckAccess
to the Register method https://github.com/AvaloniaUI/Avalonia/blob/master/src/Avalonia.Base/AvaloniaPropertyRegistry.cs, so it would fail earlier.
This kind of problem would be very hard to diagnose, especially since I only saw it once. Adding some fail-early checks would help make sure it doesn't happen again.
I've also had some people complain that the app wasn't working anymore in some Windows 11... haven't investigated that yet. But in that case it doesn't even launch to give an error message or anything. But that's a totally separate issue. Did you see any issue with Avalonia on Windows 11?
No, I don't think anything major was reported about Win11.
We probably should add Dispatcher.CheckAccess to the Register method https://github.com/AvaloniaUI/Avalonia/blob/master/src/Avalonia.Base/AvaloniaPropertyRegistry.cs, so it would fail earlier.
At some point we want to have proper support for multiple dispatchers to make things like HostVisual and VisualTarget to work
11.0.6 is pretty outdated imo. Does the same happen in 11.1.0-beta1?
I haven't re-published the app since. I'll probably re-publish it when 11.1 comes out.
Describe the bug
Got this error while opening my published app on Linux. This is the first time I see this error; just updated to Plasma 6. Relaunched the app and it works.
App was published with .NET 8 and Avalonia 11.0.6
Has anyone seen this error before?
To Reproduce
God knows
Expected behavior
App runs
Avalonia version
11.0.6
OS
Linux
Additional context
No response