You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Describe the bug
I tried to use an opacity mask, everything worked fine in the Preview as expected (Rider). But running the application, causes a null reference exception. I can reproduce this behaviour under Mac OS and Linux:
System.NullReferenceException: Object reference not set to an instance of an object.
at Avalonia.Rendering.DeferredRenderer.Avalonia.Rendering.IVisualBrushRenderer.GetRenderTargetSize(IVisualBrush brush) in /_/src/Avalonia.Visuals/Rendering/DeferredRenderer.cs:line 263
at Avalonia.Skia.DrawingContextImpl.ConfigureVisualBrush(PaintWrapper& paintWrapper, IVisualBrush visualBrush, IVisualBrushRenderer visualBrushRenderer, IDrawableBitmapImpl& tileBrushImage) in /_/src/Skia/Avalonia.Skia/DrawingContextImpl.cs:line 763
at Avalonia.Skia.DrawingContextImpl.CreatePaint(SKPaint paint, IBrush brush, Size targetSize, Boolean disposePaint) in /_/src/Skia/Avalonia.Skia/DrawingContextImpl.cs:line 899
at Avalonia.Skia.DrawingContextImpl.PushOpacityMask(IBrush mask, Rect bounds) in /_/src/Skia/Avalonia.Skia/DrawingContextImpl.cs:line 536
at Avalonia.Rendering.SceneGraph.VisualNode.BeginRender(IDrawingContextImpl context, Boolean skipOpacity) in /_/src/Avalonia.Visuals/Rendering/SceneGraph/VisualNode.cs:line 328
at Avalonia.Rendering.DeferredRenderer.Render(IDrawingContextImpl context, VisualNode node, IVisual layer, Rect clipBounds) in /_/src/Avalonia.Visuals/Rendering/DeferredRenderer.cs:line 410
at Avalonia.Rendering.DeferredRenderer.Render(IDrawingContextImpl context, VisualNode node, IVisual layer, Rect clipBounds) in /_/src/Avalonia.Visuals/Rendering/DeferredRenderer.cs:line 427
at Avalonia.Rendering.DeferredRenderer.Render(IDrawingContextImpl context, VisualNode node, IVisual layer, Rect clipBounds) in /_/src/Avalonia.Visuals/Rendering/DeferredRenderer.cs:line 427
at Avalonia.Rendering.DeferredRenderer.Render(IDrawingContextImpl context, VisualNode node, IVisual layer, Rect clipBounds) in /_/src/Avalonia.Visuals/Rendering/DeferredRenderer.cs:line 427
at Avalonia.Rendering.DeferredRenderer.Render(IDrawingContextImpl context, VisualNode node, IVisual layer, Rect clipBounds) in /_/src/Avalonia.Visuals/Rendering/DeferredRenderer.cs:line 427
at Avalonia.Rendering.DeferredRenderer.RenderToLayers(Scene scene) in /_/src/Avalonia.Visuals/Rendering/DeferredRenderer.cs:line 455
at Avalonia.Rendering.DeferredRenderer.UpdateRenderLayersAndConsumeSceneIfNeeded(IDrawingContextImpl& context, Boolean recursiveCall) in /_/src/Avalonia.Visuals/Rendering/DeferredRenderer.cs:line 359
at Avalonia.Rendering.DeferredRenderer.Render(Boolean forceComposite) in /_/src/Avalonia.Visuals/Rendering/DeferredRenderer.cs:line 304
at Avalonia.Rendering.DeferredRenderer.Paint(Rect rect) in /_/src/Avalonia.Visuals/Rendering/DeferredRenderer.cs:line 224
at Avalonia.Controls.TopLevel.HandlePaint(Rect rect) in /_/src/Avalonia.Controls/TopLevel.cs:line 333
at Avalonia.Native.WindowBaseImpl.WindowBaseEvents.Avalonia.Native.Interop.IAvnWindowBaseEvents.Paint() in /_/src/Avalonia.Native/WindowImplBase.cs:line 172
at Avalonia.Native.Interop.Impl.__MicroComIAvnWindowBaseEventsVTable.Paint(IntPtr this) in /_/src/Avalonia.Native/Interop.Generated.cs:line 3055
--- End of stack trace from previous location ---
at Avalonia.Native.PlatformThreadingInterface.RunLoop(CancellationToken cancellationToken) in /_/src/Avalonia.Native/PlatformThreadingInterface.cs:line 59
at Avalonia.Threading.Dispatcher.MainLoop(CancellationToken cancellationToken) in /_/src/Avalonia.Base/Threading/Dispatcher.cs:line 61
at Avalonia.Controls.ApplicationLifetimes.ClassicDesktopStyleApplicationLifetime.Start(String[] args) in /_/src/Avalonia.Controls/ApplicationLifetimes/ClassicDesktopStyleApplicationLifetime.cs:line 116
at Avalonia.ClassicDesktopStyleApplicationLifetimeExtensions.StartWithClassicDesktopLifetime[T](T builder, String[] args, ShutdownMode shutdownMode) in /_/src/Avalonia.Controls/ApplicationLifetimes/ClassicDesktopStyleApplicationLifetime.cs:line 148
at Opacity.Program.Main(String[] args) in ...
To Reproduce
Place this snippet in a fresh application, to crash it. Preview in Rider will display it just fine (a pixelated red dot, depending on you preview / window size).
Describe the bug
I tried to use an opacity mask, everything worked fine in the Preview as expected (Rider). But running the application, causes a null reference exception. I can reproduce this behaviour under Mac OS and Linux:
To Reproduce
Place this snippet in a fresh application, to crash it. Preview in Rider will display it just fine (a pixelated red dot, depending on you preview / window size).
Expected behavior
The ellipse should work as an opacity mask and render the red fill of the rectangle visible.
Screenshots
If applicable, add screenshots to help explain your problem.
Desktop (please complete the following information):
The text was updated successfully, but these errors were encountered: