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

Class not registered 0x80040154 when using Gaussian blur #4815

Closed
2 of 14 tasks
rocksdanister opened this issue Dec 18, 2022 · 8 comments
Closed
2 of 14 tasks

Class not registered 0x80040154 when using Gaussian blur #4815

rocksdanister opened this issue Dec 18, 2022 · 8 comments
Labels
brush 🖌️ bug 🐛 An unexpected issue that highlights incorrect behavior external ⤴️ Requires an update to an external dependency or due to code outside the Toolkit.

Comments

@rocksdanister
Copy link

Describe the bug

One of my users reports dialogs and settings menu not opening rocksdanister/lively#1496

I reported the original issue in WindowsAppSDK repo microsoft/WindowsAppSDK#3105

This time one of the error logs entries show CommunityToolkit:

2022-12-17 22:50:43.7049|ERROR|Lively.UI.WinUI.App|System.Reflection.TargetInvocationException: Exception has been thrown by the target of an invocation.
 ---> System.Runtime.InteropServices.COMException (0x80040154): Class not registered (0x80040154 (REGDB_E_CLASSNOTREG))
   at WinRT.BaseActivationFactory..ctor(String typeNamespace, String typeFullName)
   at WinRT.ActivationFactory`1..ctor()
   at System.RuntimeType.CreateInstanceOfT()
   --- End of inner exception stack trace ---
   at System.RuntimeType.CreateInstanceOfT()
   at System.Activator.CreateInstance[T]()
   at WinRT.WeakLazy`1.get_Value()
   at WinRT.ActivationFactory`1.ActivateInstance[I]()
   at Microsoft.Graphics.Canvas.Effects.GaussianBlurEffect..ctor()
   at CommunityToolkit.WinUI.UI.Media.Pipelines.PipelineBuilder.<>c__DisplayClass13_0.<<Blur>g__Factory|0>d.MoveNext()
--- End of stack trace from previous location ---
   at CommunityToolkit.WinUI.UI.Media.Pipelines.PipelineBuilder.BuildAsync()
   at CommunityToolkit.WinUI.UI.Media.XamlCompositionEffectBrushBase.OnConnected()
   at System.Threading.Tasks.Task.<>c.<ThrowAsync>b__128_0(Object state)
   at Microsoft.UI.Dispatching.DispatcherQueueSynchronizationContext.<>c__DisplayClass2_0.<Post>b__0()

I am using Gaussian blur in some of the dialogs.

Regression

No response

Reproducible in sample app?

  • This bug can be reproduced in the sample app.

Steps to reproduce

Unable to reproduce on my end, according to the user clicking on the "Active Wallpaper" dialog which has the Gaussian blur component causes the exception.

You can try asking @HarshGandhi01 directly.

Expected behavior

No exception.

Screenshots

No response

Windows Build Number

  • Windows 10 1809 (Build 17763)
  • Windows 10 1903 (Build 18362)
  • Windows 10 1909 (Build 18363)
  • Windows 10 2004 (Build 19041)
  • Windows 10 20H2 (Build 19042)
  • Windows 10 21H1 (Build 19043)
  • Windows 11 21H2 (Build 22000)
  • Other (specify)

Other Windows Build number

No response

App minimum and target SDK version

  • Windows 10, version 1809 (Build 17763)
  • Windows 10, version 1903 (Build 18362)
  • Windows 10, version 1909 (Build 18363)
  • Windows 10, version 2004 (Build 19041)
  • Other (specify)

Other SDK version

No response

Visual Studio Version

2022

Visual Studio Build Number

No response

Device form factor

Desktop

Nuget packages

CommunityToolkit.WinUI" Version=7.1.2
CommunityToolkit.WinUI.UI Version=7.1.2
CommunityToolkit.WinUI.UI.Animations Version=7.1.2
CommunityToolkit.WinUI.UI.Controls Version=7.1.2
CommunityToolkit.WinUI.UI.Behaviors" Version=7.1.2
CommunityToolkit.WinUI.UI.Controls.Primitives Version=7.1.2
CommunityToolkit.WinUI.UI.Media Version=7.1.2

Additional context

No response

Help us help you

No.

@rocksdanister rocksdanister added the bug 🐛 An unexpected issue that highlights incorrect behavior label Dec 18, 2022
@ghost ghost added the needs triage 🔍 label Dec 18, 2022
@ghost
Copy link

ghost commented Dec 18, 2022

Hello rocksdanister, 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 🙌

@ghost ghost added the needs attention 👋 label Jan 2, 2023
@ghost
Copy link

ghost commented Jan 2, 2023

This issue has been marked as "needs attention 👋" due to no activity for 15 days. Please triage the issue so the fix can be established.

1 similar comment
@ghost
Copy link

ghost commented Jan 17, 2023

This issue has been marked as "needs attention 👋" due to no activity for 15 days. Please triage the issue so the fix can be established.

@ivicamil
Copy link

I think I am experiencing the same issue. My app usesAcrylicBrush in one of its views and it's crashing only for one user who uses Windows 10 Enterprise LTSC. Here is the stack trace:

System.Reflection.TargetInvocationException
Exception has been thrown by the target of an invocation.
   at System.RuntimeType.CreateInstanceOfT()
   at System.Activator.CreateInstance[T]()
   at WinRT.WeakLazy`1.get_Value()
   at WinRT.ActivationFactory`1.ActivateInstance[I]()
   at Microsoft.Graphics.Canvas.Effects.GaussianBlurEffect..ctor()
   at CommunityToolkit.WinUI.UI.Media.Pipelines.PipelineBuilder.<>c__DisplayClass13_0.<<Blur>g__Factory|0>d.MoveNext()
--- End of stack trace from previous location ---
   at CommunityToolkit.WinUI.UI.Media.Pipelines.PipelineBuilder.BuildAsync()
   at CommunityToolkit.WinUI.UI.Media.XamlCompositionEffectBrushBase.OnConnected()
   at System.Threading.Tasks.Task.<>c.<ThrowAsync>b__128_0(Object state)
   at Microsoft.UI.Dispatching.DispatcherQueueSynchronizationContext.<>c__DisplayClass2_0.<Post>b__0()

Inner exception: 
System.Runtime.InteropServices.COMException
Class not registered (0x80040154 (REGDB_E_CLASSNOTREG))
   at WinRT.BaseActivationFactory..ctor(String typeNamespace, String typeFullName)
   at WinRT.ActivationFactory`1..ctor()
   at System.RuntimeType.CreateInstanceOfT()

@michael-hawker
Copy link
Member

@Sergio0694 any ideas? I would assume this has to do with Win2D and possibly some down-level API support or something?

@zhuxb711
Copy link

Solution: #4963 (comment)

rocksdanister added a commit to rocksdanister/lively that referenced this issue May 16, 2024
@rocksdanister
Copy link
Author

rocksdanister commented May 16, 2024

Can confirm, upgrading Microsoft.Graphics.Win2D to v1.2 fixed crashes on my side.

On release unpackaged published build of winui3 with the latest winappsdk v1.5.240428000 started getting TypeInitializationException with old version of Win2D library.

@michael-hawker michael-hawker added the external ⤴️ Requires an update to an external dependency or due to code outside the Toolkit. label May 16, 2024
@michael-hawker
Copy link
Member

Thanks for confirming @rocksdanister, will close this issue then.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
brush 🖌️ bug 🐛 An unexpected issue that highlights incorrect behavior external ⤴️ Requires an update to an external dependency or due to code outside the Toolkit.
Projects
None yet
Development

No branches or pull requests

4 participants