kikipoulet / SukiUI

UI Theme for AvaloniaUI
MIT License
1.38k stars 124 forks source link

[Bug] JetBrains Rider still cannot preview SukiWindow #301

Open KaranocaVe opened 1 week ago

KaranocaVe commented 1 week ago

Check the following items

Description of the issue

With the default template of avaloniaui mvvm project(reactiveui), I have edited all files following this guide but it didn't work, throwing the same error like plugin upgrade. There must be something wrong with the guide or the plugin. Of course I know the SukiDemo works well, but why? `Fatal error. System.Runtime.InteropServices.SEHException (0x80004005): External component has thrown an exception. Repeat 2 times:

at SkiaSharp.SkiaApi.sk_canvas_draw_rect(IntPtr, SkiaSharp.SKRect*, IntPtr)

at SkiaSharp.SKCanvas.DrawRect(SkiaSharp.SKRect, SkiaSharp.SKPaint) at SukiUI.Utilities.Effects.EffectBackgroundDraw.Render(SkiaSharp.SKCanvas, SkiaSharp.SKRect) at SukiUI.Utilities.Effects.EffectDrawBase.Render(Avalonia.Media.ImmediateDrawingContext) at Avalonia.Rendering.Composition.Drawing.Nodes.RenderDataCustomNode.Invoke(Avalonia.Rendering.Composition.Drawing.Nodes.RenderDataNodeRenderContext ByRef) at Avalonia.Rendering.Composition.Drawing.ServerCompositionRenderData.Render(Avalonia.Platform.IDrawingContextImpl) at Avalonia.Rendering.Composition.Server.ServerCompositionDrawListVisual.RenderCore(Avalonia.Rendering.Composition.Server.ServerVisualRenderContext, Avalonia.Platform.LtrbRect) at Avalonia.Rendering.Composition.Server.ServerCompositionVisual.Render(Avalonia.Rendering.Composition.Server.ServerVisualRenderContext, System.Nullable1<Avalonia.Platform.LtrbRect>) at Avalonia.Rendering.Composition.Server.ServerCompositionContainerVisual.RenderCore(Avalonia.Rendering.Composition.Server.ServerVisualRenderContext, Avalonia.Platform.LtrbRect) at Avalonia.Rendering.Composition.Server.ServerCompositionDrawListVisual.RenderCore(Avalonia.Rendering.Composition.Server.ServerVisualRenderContext, Avalonia.Platform.LtrbRect) at Avalonia.Rendering.Composition.Server.ServerCompositionVisual.Render(Avalonia.Rendering.Composition.Server.ServerVisualRenderContext, System.Nullable1) at Avalonia.Rendering.Composition.Server.ServerCompositionContainerVisual.RenderCore(Avalonia.Rendering.Composition.Server.ServerVisualRenderContext, Avalonia.Platform.LtrbRect)`

Package Version

6.0.0-beta8

Environment

Windows 11 24H2

Expected Behavior

Display something

Reproduction

With the default template of avaloniaui mvvm project(reactiveui), edit all files following this guide, and try to preview

Additional Information

No response

sirdoombox commented 1 week ago

The fix hasn't yet been included in a release on nuget if that's what you're still using, it's only available if you build from source and include the assembly reference manually. I don't have a precise timeframe for the next release and whether it will be a release candidate or 6.0 proper, maybe @kikipoulet can confirm.

kikipoulet commented 1 week ago

I plan to release 6.0 next week indeed, if we have no major issue until then 👀

sirdoombox commented 1 week ago

I will add that there is still a bug with Loading, I haven't included a software rendering fallback implementation for that yet so that will cause issues in the previewer when it throws NotImplementedException. I can't think of a reasonable fallback yet because there are some cases where software rendering might be used in production (though it is unlikely)