Fix: Build fails when appicon is an empty (but valid) SVG#35305
Conversation
|
🚀 Dogfood this PR with:
curl -fsSL https://raw.githubusercontent.com/dotnet/maui/main/eng/scripts/get-maui-pr.sh | bash -s -- 35305Or
iex "& { $(irm https://raw.githubusercontent.com/dotnet/maui/main/eng/scripts/get-maui-pr.ps1) } 35305" |
|
Hey there @@Shalini-Ashokan! Thank you so much for your PR! Someone from the team will get assigned to your PR shortly and we'll get it reviewed. |
There was a problem hiding this comment.
Pull request overview
This PR updates Resizetizer’s SVG rendering path so empty-but-valid SVG app icons can build successfully, and adds regression coverage plus a fixture for that scenario. The title/description match the implementation.
Changes:
- Moves the empty-SVG size check so it only runs in the downscale branch of
SkiaSharpSvgTools.DrawUnscaled. - Adds a unit test covering an empty SVG used as an app icon.
- Adds a new empty SVG test asset.
Reviewed changes
Copilot reviewed 2 out of 3 changed files in this pull request and generated 1 comment.
| File | Description |
|---|---|
src/SingleProject/Resizetizer/src/SkiaSharpSvgTools.cs |
Changes SVG draw-path validation behavior for empty-size pictures. |
src/SingleProject/Resizetizer/test/UnitTests/ResizetizeImagesTests.cs |
Adds a regression test for empty SVG app icon processing. |
src/SingleProject/Resizetizer/test/UnitTests/images/appicon_empty.svg |
Adds the empty SVG fixture used by the new test. |
MauiBot
left a comment
There was a problem hiding this comment.
🤖 Automated review — alternative fix proposed
The expert-reviewer evaluation compared the PR fix against #4 automatically generated candidates and selected try-fix-4 as the strongest fix.
Why: try-fix-4 wins by centralizing empty-CullRect handling in a new ResolveOriginalSize() base method (SkiaSharpTools.cs), which eliminates the NaN/∞ float arithmetic bug, simplifies DrawUnscaled with a clean 'scale >= 1 || size.IsEmpty' pattern, requires no XML parsing overhead, and includes comprehensive tests. The PR fix failed Gate and silently drops PR #33194's MAUIR0001 protection for malformed SVGs at scale >= 1, which all 4 try-fix candidates address.
Please consider applying the candidate diff below (or use it as guidance). Once you push an update, this workflow will re-trigger and re-evaluate.
Candidate diff (`try-fix-4`)
diff --git a/src/SingleProject/Resizetizer/src/SkiaSharpAppIconTools.cs b/src/SingleProject/Resizetizer/src/SkiaSharpAppIconTools.cs
index 9969b4864c..a78510ad76 100644
--- a/src/SingleProject/Resizetizer/src/SkiaSharpAppIconTools.cs
+++ b/src/SingleProject/Resizetizer/src/SkiaSharpAppIconTools.cs
@@ -116,7 +116,7 @@ namespace Microsoft.Maui.Resizetizer
// draw foreground
if (foregroundTools is not null)
{
- var foregroundOriginalSize = foregroundTools.GetOriginalSize();
+ var foregroundOriginalSize = foregroundTools.ResolveOriginalSize(foregroundTools.GetOriginalSize(), unscaledCanvasSize);
var (fgScaledSize, fgScale) = foregroundTools.GetScaledSize(foregroundOriginalSize, dpi, unscaledCanvasSize);
// center the foreground
diff --git a/src/SingleProject/Resizetizer/src/SkiaSharpSvgTools.cs b/src/SingleProject/Resizetizer/src/SkiaSharpSvgTools.cs
index eb84b18632..dbf4e0c99c 100644
--- a/src/SingleProject/Resizetizer/src/SkiaSharpSvgTools.cs
+++ b/src/SingleProject/Resizetizer/src/SkiaSharpSvgTools.cs
@@ -27,7 +27,7 @@ namespace Microsoft.Maui.Resizetizer
Logger?.Log($"Open SVG took {sw.ElapsedMilliseconds}ms ({filename})");
if (pic.CullRect.Size.IsEmpty)
- Logger?.Log($"SVG picture did not have a size and will fail to generate. ({Filename})");
+ Logger?.Log($"SVG picture has empty render bounds; requested output size will be used for scaling when available. ({Filename})");
}
public override SKSize GetOriginalSize() =>
@@ -36,32 +36,26 @@ namespace Microsoft.Maui.Resizetizer
public override void DrawUnscaled(SKCanvas canvas, float scale)
{
var size = GetOriginalSize();
- if (size.IsEmpty)
+ if (scale >= 1 || size.IsEmpty)
{
- throw new InvalidOperationException($"Cannot draw SVG file '{Filename}'. The SVG has no size. Ensure the SVG includes a viewBox attribute or both width and height attributes with valid dimensions.");
- }
- if (scale >= 1)
- {
- // draw using default scaling
canvas.DrawPicture(svg.Picture, Paint);
+ return;
}
- else
- {
- // vector scaling has rounding issues, so first draw as intended
- var info = new SKImageInfo((int)size.Width, (int)size.Height);
- using var surface = SKSurface.Create(info);
- var cvn = surface.Canvas;
- // draw to a larger canvas first
- cvn.Clear(SKColors.Transparent);
- cvn.DrawPicture(svg.Picture, Paint);
+ // vector scaling has rounding issues, so first draw as intended
+ var info = new SKImageInfo((int)size.Width, (int)size.Height);
+ using var surface = SKSurface.Create(info);
+ var cvn = surface.Canvas;
- // convert it all into an image
- using var img = surface.Snapshot();
+ // draw to a larger canvas first
+ cvn.Clear(SKColors.Transparent);
+ cvn.DrawPicture(svg.Picture, Paint);
- // draw to the main canvas using the correct quality settings
- canvas.DrawImage(img, 0, 0, SamplingOptions, Paint);
- }
+ // convert it all into an image
+ using var img = surface.Snapshot();
+
+ // draw to the main canvas using the correct quality settings
+ canvas.DrawImage(img, 0, 0, SamplingOptions, Paint);
}
public void Dispose()
diff --git a/src/SingleProject/Resizetizer/src/SkiaSharpTools.cs b/src/SingleProject/Resizetizer/src/SkiaSharpTools.cs
index 4e29cc317b..f984f86567 100644
--- a/src/SingleProject/Resizetizer/src/SkiaSharpTools.cs
+++ b/src/SingleProject/Resizetizer/src/SkiaSharpTools.cs
@@ -118,12 +118,13 @@ namespace Microsoft.Maui.Resizetizer
var originalSize = GetOriginalSize();
var absoluteSize = dpiSizeIsAbsolute ? dpi.Size : null;
- var (scaledSize, scale) = GetScaledSize(originalSize, dpi, absoluteSize);
+ var resolvedOriginalSize = ResolveOriginalSize(originalSize, absoluteSize);
+ var (scaledSize, scale) = GetScaledSize(resolvedOriginalSize, dpi, absoluteSize);
var (canvasSize, _) = GetCanvasSize(dpi, null, this);
using (var tempBitmap = new SKBitmap(canvasSize.Width, canvasSize.Height))
{
- Draw(tempBitmap, additionalScale, originalSize, scale, scaledSize);
+ Draw(tempBitmap, additionalScale, resolvedOriginalSize, scale, scaledSize);
Save(destination, tempBitmap);
}
@@ -158,7 +159,7 @@ namespace Microsoft.Maui.Resizetizer
{
var baseOriginalSize = baseTools.GetOriginalSize();
var (baseScaledSize, _) = baseTools.GetScaledSize(baseOriginalSize, dpi.Scale);
- return (baseScaledSize, baseOriginalSize);
+ return (baseScaledSize, baseTools.ResolveOriginalSize(baseOriginalSize));
}
throw new InvalidOperationException("The canvas size cannot be calculated if there is no size to start from (DPI size, BaseSize or image size).");
@@ -239,11 +240,24 @@ namespace Microsoft.Maui.Resizetizer
public abstract void DrawUnscaled(SKCanvas canvas, float scale);
+ internal SKSize ResolveOriginalSize(SKSize originalSize, SKSize? absoluteSize = null)
+ {
+ if (!originalSize.IsEmpty)
+ return originalSize;
+
+ if ((absoluteSize ?? BaseSize) is SKSize fallbackSize && !fallbackSize.IsEmpty)
+ return fallbackSize;
+
+ throw new InvalidOperationException($"Cannot scale image '{Filename}' because it has no render bounds and no requested output size. For SVG files, ensure a viewBox or explicit width and height are present, or set BaseSize in the project file.");
+ }
+
public (SKSizeI, float) GetScaledSize(SKSize originalSize, DpiPath dpi, SKSize? absoluteSize = null) =>
GetScaledSize(originalSize, dpi.Scale, absoluteSize ?? dpi.Size);
public (SKSizeI, float) GetScaledSize(SKSize originalSize, decimal resizeRatio, SKSize? absoluteSize = null)
{
+ originalSize = ResolveOriginalSize(originalSize, absoluteSize);
+
var sourceNominalWidth = (int)(absoluteSize?.Width ?? BaseSize?.Width ?? originalSize.Width);
var sourceNominalHeight = (int)(absoluteSize?.Height ?? BaseSize?.Height ?? originalSize.Height);
diff --git a/src/SingleProject/Resizetizer/test/UnitTests/SkiaSharpSvgToolsTests.cs b/src/SingleProject/Resizetizer/test/UnitTests/SkiaSharpSvgToolsTests.cs
index b549619e89..227d7c3b36 100644
--- a/src/SingleProject/Resizetizer/test/UnitTests/SkiaSharpSvgToolsTests.cs
+++ b/src/SingleProject/Resizetizer/test/UnitTests/SkiaSharpSvgToolsTests.cs
@@ -148,6 +148,44 @@ namespace Microsoft.Maui.Resizetizer.Tests
Assert.Equal(SKColors.Blue, pixmap.GetPixelColor(125, 137));
}
+ [Fact]
+ public void EmptySvgWithBaseSizeAndScaleResizesToBlankImage()
+ {
+ var info = new ResizeImageInfo();
+ info.Filename = "images/appicon_empty.svg";
+ info.BaseSize = new SKSize(456, 456);
+ var tools = new SkiaSharpSvgTools(info, Logger);
+ var dpiPath = new DpiPath("", 0.5m);
+
+ // SVG with a viewport but no drawing commands: Svg.Skia reports an empty CullRect.
+ Assert.True(tools.GetOriginalSize().IsEmpty);
+
+ tools.Resize(dpiPath, DestinationFilename);
+
+ using var resultImage = SKBitmap.Decode(DestinationFilename);
+ Assert.Equal(228, resultImage.Width);
+ Assert.Equal(228, resultImage.Height);
+
+ using var pixmap = resultImage.PeekPixels();
+ Assert.Equal(SKColors.Empty, pixmap.GetPixelColor(10, 10));
+ Assert.Equal(SKColors.Empty, pixmap.GetPixelColor(114, 114));
+ }
+
+ [Fact]
+ public void EmptySvgWithNoBaseSizeThrows()
+ {
+ var info = new ResizeImageInfo();
+ info.Filename = "images/appicon_empty.svg";
+ var tools = new SkiaSharpSvgTools(info, Logger);
+ var dpiPath = new DpiPath("", 0.5m);
+
+ var exception = Assert.Throws<InvalidOperationException>(() => tools.Resize(dpiPath, DestinationFilename));
+
+ Assert.Contains("appicon_empty.svg", exception.Message, StringComparison.Ordinal);
+ Assert.Contains("viewBox", exception.Message, StringComparison.Ordinal);
+ Assert.Contains("BaseSize", exception.Message, StringComparison.Ordinal);
+ }
+
[Fact]
public void ColorizedReturnsColored()
{
The fix is invalid because when the SVG has no content, the scale becomes NaN (due to divide-by-zero), and NaN >= 1 is always false — so the code never reaches the safe path and still throws the same error |
MauiBot
left a comment
There was a problem hiding this comment.
🤖 Automated review — alternative fix proposed
The expert-reviewer evaluation compared the PR fix against #4 automatically generated candidates and selected try-fix-4 as the strongest fix.
Why: try-fix-4 wins by fixing the root cause in GetOriginalSize() rather than working around it in DrawUnscaled. By parsing declared SVG width/height/viewBox attributes at construction time, it returns the true declared dimensions (e.g., 456×456) for empty-but-valid SVGs, eliminating NaN/Infinity in GetScaledSize and fully restoring MAUIR0001 protection for both scale branches. The PR's own fix (moving the guard to the else-branch only) correctly handles the reported app-icon scenario but silently drops the diagnostic for truly malformed SVGs at scale >= 1 and leaves downstream arithmetic bugs for non-app-icon callers.
Please consider applying the candidate diff below (or use it as guidance). Once you push an update, this workflow will re-trigger and re-evaluate.
Candidate diff (`try-fix-4`)
diff --git a/src/SingleProject/Resizetizer/src/SkiaSharpSvgTools.cs b/src/SingleProject/Resizetizer/src/SkiaSharpSvgTools.cs
index eb84b18632..c3c6259616 100644
--- a/src/SingleProject/Resizetizer/src/SkiaSharpSvgTools.cs
+++ b/src/SingleProject/Resizetizer/src/SkiaSharpSvgTools.cs
@@ -1,5 +1,7 @@
using System;
using System.Diagnostics;
+using System.Globalization;
+using System.Xml.Linq;
using SkiaSharp;
using Svg.Skia;
@@ -8,6 +10,7 @@ namespace Microsoft.Maui.Resizetizer
internal class SkiaSharpSvgTools : SkiaSharpTools, IDisposable
{
SKSvg svg;
+ SKSize? _declaredSize;
public SkiaSharpSvgTools(ResizeImageInfo info, ILogger logger)
: this(info.Filename, info.BaseSize, info.Color, info.TintColor, logger)
@@ -26,12 +29,57 @@ namespace Microsoft.Maui.Resizetizer
sw.Stop();
Logger?.Log($"Open SVG took {sw.ElapsedMilliseconds}ms ({filename})");
+ // SkiaSharp's CullRect is zero for SVGs that declare dimensions but contain no shapes.
+ // Parse the declared width/height/viewBox so GetOriginalSize() returns a valid size for
+ // such SVGs, while still reporting zero (and ultimately throwing) for truly malformed SVGs.
if (pic.CullRect.Size.IsEmpty)
- Logger?.Log($"SVG picture did not have a size and will fail to generate. ({Filename})");
+ {
+ _declaredSize = ParseDeclaredSize(filename);
+ if (_declaredSize is null)
+ Logger?.Log($"SVG picture did not have a size and will fail to generate. ({Filename})");
+ }
}
- public override SKSize GetOriginalSize() =>
- svg.Picture.CullRect.Size;
+ static SKSize? ParseDeclaredSize(string filename)
+ {
+ try
+ {
+ var root = XDocument.Load(filename).Root;
+ if (root is null)
+ return null;
+
+ var wAttr = root.Attribute("width")?.Value;
+ var hAttr = root.Attribute("height")?.Value;
+ if (wAttr != null && hAttr != null &&
+ float.TryParse(wAttr, NumberStyles.Float, CultureInfo.InvariantCulture, out var w) &&
+ float.TryParse(hAttr, NumberStyles.Float, CultureInfo.InvariantCulture, out var h) &&
+ w > 0 && h > 0)
+ {
+ return new SKSize(w, h);
+ }
+
+ var vbParts = root.Attribute("viewBox")?.Value?.Split(' ', StringSplitOptions.RemoveEmptyEntries);
+ if (vbParts?.Length == 4 &&
+ float.TryParse(vbParts[2], NumberStyles.Float, CultureInfo.InvariantCulture, out var vbW) &&
+ float.TryParse(vbParts[3], NumberStyles.Float, CultureInfo.InvariantCulture, out var vbH) &&
+ vbW > 0 && vbH > 0)
+ {
+ return new SKSize(vbW, vbH);
+ }
+ }
+ catch
+ {
+ // If XML parsing fails, fall through and let CullRect be used (which will be zero -> throws later).
+ }
+
+ return null;
+ }
+
+ public override SKSize GetOriginalSize()
+ {
+ var cullSize = svg.Picture.CullRect.Size;
+ return cullSize.IsEmpty ? _declaredSize ?? cullSize : cullSize;
+ }
public override void DrawUnscaled(SKCanvas canvas, float scale)
{
@@ -40,6 +88,7 @@ namespace Microsoft.Maui.Resizetizer
{
throw new InvalidOperationException($"Cannot draw SVG file '{Filename}'. The SVG has no size. Ensure the SVG includes a viewBox attribute or both width and height attributes with valid dimensions.");
}
+
if (scale >= 1)
{
// draw using default scaling
diff --git a/src/SingleProject/Resizetizer/test/UnitTests/ResizetizeImagesTests.cs b/src/SingleProject/Resizetizer/test/UnitTests/ResizetizeImagesTests.cs
index 0ee2d31681..77099efbcf 100644
--- a/src/SingleProject/Resizetizer/test/UnitTests/ResizetizeImagesTests.cs
+++ b/src/SingleProject/Resizetizer/test/UnitTests/ResizetizeImagesTests.cs
@@ -117,6 +117,38 @@ namespace Microsoft.Maui.Resizetizer.Tests
Assert.Equal("MAUIR0001", errorCode);
}
+ [Fact]
+ public void EmptySvgAppIconSucceeds_Issue35293()
+ {
+ var items = new[]
+ {
+ new TaskItem("images/appicon_empty.svg", new Dictionary<string, string>
+ {
+ ["IsAppIcon"] = bool.TrueString,
+ ["Link"] = "appicon",
+ }),
+ };
+
+ var task = GetNewTask(items);
+ var success = task.Execute();
+
+ Assert.True(success, LogErrorEvents.FirstOrDefault()?.Message);
+ }
+
+ [Fact]
+ public void EmptySvgRegularImageSucceeds_Issue35293()
+ {
+ var items = new[]
+ {
+ new TaskItem("images/appicon_empty.svg"),
+ };
+
+ var task = GetNewTask(items);
+ var success = task.Execute();
+
+ Assert.True(success, LogErrorEvents.FirstOrDefault()?.Message);
+ }
+
[Fact]
public void GenerationSkippedOnIncrementalBuild()
{
diff --git a/src/SingleProject/Resizetizer/test/UnitTests/images/appicon_empty.svg b/src/SingleProject/Resizetizer/test/UnitTests/images/appicon_empty.svg
new file mode 100644
index 0000000000..5e931b697e
--- /dev/null
+++ b/src/SingleProject/Resizetizer/test/UnitTests/images/appicon_empty.svg
@@ -0,0 +1,3 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<svg width="456" height="456" viewBox="0 0 456 456" version="1.1" xmlns="http://www.w3.org/2000/svg">
+</svg>
🤖 AI Summary
📊 Review Session —
|
| Test | Without Fix (expect FAIL) | With Fix (expect PASS) |
|---|---|---|
🧪 ResizetizeImagesTests ResizetizeImagesTests |
✅ FAIL — 16s | ❌ FAIL — 9s |
🔴 Without fix — 🧪 ResizetizeImagesTests: FAIL ✅ · 16s
(truncated to last 15,000 chars)
id/ymwcan3c.s4f
[xUnit.net 00:00:01.34] MESSAGE: Background was not found (will manufacture):
[xUnit.net 00:00:01.34] MESSAGE: App Icon Background Part: /tmp/Microsoft.Maui.Resizetizer.Tests/ResizetizeImagesTests+ExecuteForAndroid/ymwcan3c.s4f/mipmap-mdpi/the_alias_background.png
[xUnit.net 00:00:01.34] MESSAGE: App Icon
[xUnit.net 00:00:01.34] MESSAGE: Android Adaptive Icon Generator
[xUnit.net 00:00:01.34] ERROR : There was an exception processing the image ''. System.DllNotFoundException: Unable to load shared library 'libSkiaSharp' or one of its dependencies. In order to help diagnose loading problems, consider using a tool like strace. If you're using glibc, consider setting the LD_DEBUG environment variable:
[xUnit.net 00:00:01.34] /home/vsts/work/1/s/.dotnet/shared/Microsoft.NETCore.App/10.0.0/libSkiaSharp.so: cannot open shared object file: No such file or directory
[xUnit.net 00:00:01.34] /home/vsts/work/1/s/artifacts/bin/Resizetizer.UnitTests/Debug/net10.0/libSkiaSharp.so: cannot open shared object file: No such file or directory
[xUnit.net 00:00:01.34] /home/vsts/work/1/s/.dotnet/shared/Microsoft.NETCore.App/10.0.0/liblibSkiaSharp.so: cannot open shared object file: No such file or directory
[xUnit.net 00:00:01.34] /home/vsts/work/1/s/artifacts/bin/Resizetizer.UnitTests/Debug/net10.0/liblibSkiaSharp.so: cannot open shared object file: No such file or directory
[xUnit.net 00:00:01.34] /home/vsts/work/1/s/.dotnet/shared/Microsoft.NETCore.App/10.0.0/libSkiaSharp: cannot open shared object file: No such file or directory
[xUnit.net 00:00:01.34] /home/vsts/work/1/s/artifacts/bin/Resizetizer.UnitTests/Debug/net10.0/libSkiaSharp: cannot open shared object file: No such file or directory
[xUnit.net 00:00:01.34] /home/vsts/work/1/s/.dotnet/shared/Microsoft.NETCore.App/10.0.0/liblibSkiaSharp: cannot open shared object file: No such file or directory
[xUnit.net 00:00:01.34] /home/vsts/work/1/s/artifacts/bin/Resizetizer.UnitTests/Debug/net10.0/liblibSkiaSharp: cannot open shared object file: No such file or directory
[xUnit.net 00:00:01.34]
[xUnit.net 00:00:01.34] at SkiaSharp.SkiaApi.sk_compatpaint_new()
[xUnit.net 00:00:01.34] at SkiaSharp.SkiaApi.sk_compatpaint_new()
[xUnit.net 00:00:01.33] Microsoft.Maui.Resizetizer.Tests.ResizetizeImagesTests+ExecuteForAndroid.SingleRasterAppIconWithOnlyPathSucceedsWithoutVectors(name: "camera_color", alias: "the_alias.png", outputName: "the_alias") [FAIL]
[xUnit.net 00:00:01.34] at SkiaSharp.SKPaint..ctor()
[xUnit.net 00:00:01.34] at Microsoft.Maui.Resizetizer.SkiaSharpTools..ctor(String filename, Nullable`1 baseSize, Nullable`1 backgroundColor, Nullable`1 tintColor, ILogger logger) in /_/src/SingleProject/Resizetizer/src/SkiaSharpTools.cs:line 83
[xUnit.net 00:00:01.34] at Microsoft.Maui.Resizetizer.SkiaSharpImaginaryTools..ctor(Nullable`1 backgroundColor, ILogger logger) in /_/src/SingleProject/Resizetizer/src/SkiaSharpImaginaryTools.cs:line 14
[xUnit.net 00:00:01.34] at Microsoft.Maui.Resizetizer.SkiaSharpTools.CreateImaginary(Nullable`1 backgroundColor, ILogger logger) in /_/src/SingleProject/Resizetizer/src/SkiaSharpTools.cs:line 70
[xUnit.net 00:00:01.34] at Microsoft.Maui.Resizetizer.AndroidAdaptiveIconGenerator.ProcessBackground(List`1 results, DirectoryInfo fullIntermediateOutputPath) in /_/src/SingleProject/Resizetizer/src/AndroidAdaptiveIconGenerator.cs:line 89
[xUnit.net 00:00:01.34] at Microsoft.Maui.Resizetizer.AndroidAdaptiveIconGenerator.Generate() in /_/src/SingleProject/Resizetizer/src/AndroidAdaptiveIconGenerator.cs:line 43
[xUnit.net 00:00:01.34] at Microsoft.Maui.Resizetizer.ResizetizeImages.ProcessAppIcon(ResizeImageInfo img, ConcurrentBag`1 resizedImages) in /_/src/SingleProject/Resizetizer/src/ResizetizeImages.cs:line 182
[xUnit.net 00:00:01.34] at Microsoft.Maui.Resizetizer.ResizetizeImages.<>c__DisplayClass34_0.<ExecuteAsync>b__0(ResizeImageInfo img) in /_/src/SingleProject/Resizetizer/src/ResizetizeImages.cs:line 64
[xUnit.net 00:00:01.34] Cleaning up directories=/tmp/Microsoft.Maui.Resizetizer.Tests/ResizetizeImagesTests+ExecuteForAndroid/ymwcan3c.s4f
[xUnit.net 00:00:01.34] Microsoft.Maui.Resizetizer.Tests.ResizetizeImagesTests+ExecuteForiOS.SingleVectorAppIconWithOnlyPathSucceedsWithVectors(name: "camera_color", alias: "the_alias", outputName: "the_alias") [FAIL]
[xUnit.net 00:00:01.34] There was an exception processing the image ''. System.DllNotFoundException: Unable to load shared library 'libSkiaSharp' or one of its dependencies. In order to help diagnose loading problems, consider using a tool like strace. If you're using glibc, consider setting the LD_DEBUG environment variable:
[xUnit.net 00:00:01.34] /home/vsts/work/1/s/.dotnet/shared/Microsoft.NETCore.App/10.0.0/libSkiaSharp.so: cannot open shared object file: No such file or directory
[xUnit.net 00:00:01.34] /home/vsts/work/1/s/artifacts/bin/Resizetizer.UnitTests/Debug/net10.0/libSkiaSharp.so: cannot open shared object file: No such file or directory
[xUnit.net 00:00:01.34] /home/vsts/work/1/s/.dotnet/shared/Microsoft.NETCore.App/10.0.0/liblibSkiaSharp.so: cannot open shared object file: No such file or directory
[xUnit.net 00:00:01.34] /home/vsts/work/1/s/artifacts/bin/Resizetizer.UnitTests/Debug/net10.0/liblibSkiaSharp.so: cannot open shared object file: No such file or directory
[xUnit.net 00:00:01.34] /home/vsts/work/1/s/.dotnet/shared/Microsoft.NETCore.App/10.0.0/libSkiaSharp: cannot open shared object file: No such file or directory
[xUnit.net 00:00:01.34] /home/vsts/work/1/s/artifacts/bin/Resizetizer.UnitTests/Debug/net10.0/libSkiaSharp: cannot open shared object file: No such file or directory
[xUnit.net 00:00:01.34] /home/vsts/work/1/s/.dotnet/shared/Microsoft.NETCore.App/10.0.0/liblibSkiaSharp: cannot open shared object file: No such file or directory
[xUnit.net 00:00:01.34] /home/vsts/work/1/s/artifacts/bin/Resizetizer.UnitTests/Debug/net10.0/liblibSkiaSharp: cannot open shared object file: No such file or directory
[xUnit.net 00:00:01.34]
[xUnit.net 00:00:01.34] at SkiaSharp.SkiaApi.sk_compatpaint_new()
[xUnit.net 00:00:01.34] at SkiaSharp.SkiaApi.sk_compatpaint_new()
[xUnit.net 00:00:01.34] at SkiaSharp.SKPaint..ctor()
[xUnit.net 00:00:01.34] at Microsoft.Maui.Resizetizer.SkiaSharpTools..ctor(String filename, Nullable`1 baseSize, Nullable`1 backgroundColor, Nullable`1 tintColor, ILogger logger) in /_/src/SingleProject/Resizetizer/src/SkiaSharpTools.cs:line 83
[xUnit.net 00:00:01.34] at Microsoft.Maui.Resizetizer.SkiaSharpSvgTools..ctor(String filename, Nullable`1 baseSize, Nullable`1 backgroundColor, Nullable`1 tintColor, ILogger logger) in /_/src/SingleProject/Resizetizer/src/SkiaSharpSvgTools.cs:line 18
[xUnit.net 00:00:01.34] at Microsoft.Maui.Resizetizer.SkiaSharpTools.Create(Boolean isVector, String filename, Nullable`1 baseSize, Nullable`1 backgroundColor, Nullable`1 tintColor, ILogger logger) in /_/src/SingleProject/Resizetizer/src/SkiaSharpTools.cs:line 65
[xUnit.net 00:00:01.34] at Microsoft.Maui.Resizetizer.SkiaSharpAppIconTools..ctor(ResizeImageInfo info, ILogger logger) in /_/src/SingleProject/Resizetizer/src/SkiaSharpAppIconTools.cs:line 26
[xUnit.net 00:00:01.34] at Microsoft.Maui.Resizetizer.ResizetizeImages.ProcessAppIcon(ResizeImageInfo img, ConcurrentBag`1 resizedImages) in /_/src/SingleProject/Resizetizer/src/ResizetizeImages.cs:line 209
[xUnit.net 00:00:01.34] at Microsoft.Maui.Resizetizer.ResizetizeImages.<>c__DisplayClass34_0.<ExecuteAsync>b__0(ResizeImageInfo img) in /_/src/SingleProject/Resizetizer/src/ResizetizeImages.cs:line 64
[xUnit.net 00:00:01.34] Stack Trace:
[xUnit.net 00:00:01.34] /_/src/SingleProject/Resizetizer/test/UnitTests/ResizetizeImagesTests.cs(1322,0): at Microsoft.Maui.Resizetizer.Tests.ResizetizeImagesTests.ExecuteForiOS.SingleVectorAppIconWithOnlyPathSucceedsWithVectors(String name, String alias, String outputName)
[xUnit.net 00:00:01.34] at InvokeStub_ExecuteForiOS.SingleVectorAppIconWithOnlyPathSucceedsWithVectors(Object, Span`1)
[xUnit.net 00:00:01.34] at System.Reflection.MethodBaseInvoker.InvokeWithFewArgs(Object obj, BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture)
[xUnit.net 00:00:01.34] Output:
[xUnit.net 00:00:01.34] Using DestinationDirectory=/tmp/Microsoft.Maui.Resizetizer.Tests/ResizetizeImagesTests+ExecuteForiOS/vvconxxy.2jo
[xUnit.net 00:00:01.34] MESSAGE: iOS App Icon Set Directory: /tmp/Microsoft.Maui.Resizetizer.Tests/ResizetizeImagesTests+ExecuteForiOS/vvconxxy.2jo/Assets.xcassets/the_alias.appiconset
[xUnit.net 00:00:01.34] MESSAGE: App Icon
[xUnit.net 00:00:01.34] MESSAGE: iOS Icon Assets Generator
[xUnit.net 00:00:01.34] MESSAGE: Generating App Icon Bitmaps for DPIs
[xUnit.net 00:00:01.35] ERROR : There was an exception processing the image ''. System.DllNotFoundException: Unable to load shared library 'libSkiaSharp' or one of its dependencies. In order to help diagnose loading problems, consider using a tool like strace. If you're using glibc, consider setting the LD_DEBUG environment variable:
[xUnit.net 00:00:01.35] /home/vsts/work/1/s/.dotnet/shared/Microsoft.NETCore.App/10.0.0/libSkiaSharp.so: cannot open shared object file: No such file or directory
[xUnit.net 00:00:01.35] /home/vsts/work/1/s/artifacts/bin/Resizetizer.UnitTests/Debug/net10.0/libSkiaSharp.so: cannot open shared object file: No such file or directory
[xUnit.net 00:00:01.35] /home/vsts/work/1/s/.dotnet/shared/Microsoft.NETCore.App/10.0.0/liblibSkiaSharp.so: cannot open shared object file: No such file or directory
[xUnit.net 00:00:01.35] /home/vsts/work/1/s/artifacts/bin/Resizetizer.UnitTests/Debug/net10.0/liblibSkiaSharp.so: cannot open shared object file: No such file or directory
[xUnit.net 00:00:01.35] /home/vsts/work/1/s/.dotnet/shared/Microsoft.NETCore.App/10.0.0/libSkiaSharp: cannot open shared object file: No such file or directory
[xUnit.net 00:00:01.35] /home/vsts/work/1/s/artifacts/bin/Resizetizer.UnitTests/Debug/net10.0/libSkiaSharp: cannot open shared object file: No such file or directory
[xUnit.net 00:00:01.35] /home/vsts/work/1/s/.dotnet/shared/Microsoft.NETCore.App/10.0.0/liblibSkiaSharp: cannot open shared object file: No such file or directory
[xUnit.net 00:00:01.36] /home/vsts/work/1/s/artifacts/bin/Resizetizer.UnitTests/Debug/net10.0/liblibSkiaSharp: cannot open shared object file: No such file or directory
[xUnit.net 00:00:01.36]
[xUnit.net 00:00:01.36] at SkiaSharp.SkiaApi.sk_compatpaint_new()
[xUnit.net 00:00:01.36] at SkiaSharp.SkiaApi.sk_compatpaint_new()
[xUnit.net 00:00:01.36] at SkiaSharp.SKPaint..ctor()
[xUnit.net 00:00:01.36] at Microsoft.Maui.Resizetizer.SkiaSharpTools..ctor(String filename, Nullable`1 baseSize, Nullable`1 backgroundColor, Nullable`1 tintColor, ILogger logger) in /_/src/SingleProject/Resizetizer/src/SkiaSharpTools.cs:line 83
[xUnit.net 00:00:01.36] at Microsoft.Maui.Resizetizer.SkiaSharpSvgTools..ctor(String filename, Nullable`1 baseSize, Nullable`1 backgroundColor, Nullable`1 tintColor, ILogger logger) in /_/src/SingleProject/Resizetizer/src/SkiaSharpSvgTools.cs:line 18
[xUnit.net 00:00:01.36] at Microsoft.Maui.Resizetizer.SkiaSharpTools.Create(Boolean isVector, String filename, Nullable`1 baseSize, Nullable`1 backgroundColor, Nullable`1 tintColor, ILogger logger) in /_/src/SingleProject/Resizetizer/src/SkiaSharpTools.cs:line 65
[xUnit.net 00:00:01.36] at Microsoft.Maui.Resizetizer.SkiaSharpAppIconTools..ctor(ResizeImageInfo info, ILogger logger) in /_/src/SingleProject/Resizetizer/src/SkiaSharpAppIconTools.cs:line 26
[xUnit.net 00:00:01.36] at Microsoft.Maui.Resizetizer.ResizetizeImages.ProcessAppIcon(ResizeImageInfo img, ConcurrentBag`1 resizedImages) in /_/src/SingleProject/Resizetizer/src/ResizetizeImages.cs:line 209
[xUnit.net 00:00:01.36] at Microsoft.Maui.Resizetizer.ResizetizeImages.<>c__DisplayClass34_0.<ExecuteAsync>b__0(ResizeImageInfo img) in /_/src/SingleProject/Resizetizer/src/ResizetizeImages.cs:line 64
[xUnit.net 00:00:01.36] Cleaning up directories=/tmp/Microsoft.Maui.Resizetizer.Tests/ResizetizeImagesTests+ExecuteForiOS/vvconxxy.2jo
The active test run was aborted. Reason: Test host process crashed : Unhandled exception. System.TypeInitializationException: The type initializer for 'SkiaSharp.SKObject' threw an exception.
---> System.DllNotFoundException: Unable to load shared library 'libSkiaSharp' or one of its dependencies. In order to help diagnose loading problems, consider using a tool like strace. If you're using glibc, consider setting the LD_DEBUG environment variable:
/home/vsts/work/1/s/.dotnet/shared/Microsoft.NETCore.App/10.0.0/libSkiaSharp.so: cannot open shared object file: No such file or directory
/home/vsts/work/1/s/artifacts/bin/Resizetizer.UnitTests/Debug/net10.0/libSkiaSharp.so: cannot open shared object file: No such file or directory
/home/vsts/work/1/s/.dotnet/shared/Microsoft.NETCore.App/10.0.0/liblibSkiaSharp.so: cannot open shared object file: No such file or directory
/home/vsts/work/1/s/artifacts/bin/Resizetizer.UnitTests/Debug/net10.0/liblibSkiaSharp.so: cannot open shared object file: No such file or directory
/home/vsts/work/1/s/.dotnet/shared/Microsoft.NETCore.App/10.0.0/libSkiaSharp: cannot open shared object file: No such file or directory
/home/vsts/work/1/s/artifacts/bin/Resizetizer.UnitTests/Debug/net10.0/libSkiaSharp: cannot open shared object file: No such file or directory
/home/vsts/work/1/s/.dotnet/shared/Microsoft.NETCore.App/10.0.0/liblibSkiaSharp: cannot open shared object file: No such file or directory
/home/vsts/work/1/s/artifacts/bin/Resizetizer.UnitTests/Debug/net10.0/liblibSkiaSharp: cannot open shared object file: No such file or directory
at SkiaSharp.SkiaApi.sk_version_get_milestone()
at SkiaSharp.SkiaSharpVersion.get_Native()
at SkiaSharp.SkiaSharpVersion.CheckNativeLibraryCompatible(Boolean throwIfIncompatible)
at SkiaSharp.SKObject..cctor()
--- End of inner exception stack trace ---
at SkiaSharp.SKObject.DeregisterHandle(IntPtr handle, SKObject instance)
at SkiaSharp.SKObject.set_Handle(IntPtr value)
at SkiaSharp.SKNativeObject.Dispose(Boolean disposing)
at SkiaSharp.SKObject.Dispose(Boolean disposing)
at SkiaSharp.SKPaint.Dispose(Boolean disposing)
at SkiaSharp.SKNativeObject.Finalize()
at System.GC.RunFinalizers()
Test Run Aborted.
Total tests: Unknown
Failed: 24
Total time: 4.0360 Seconds
🟢 With fix — 🧪 ResizetizeImagesTests: FAIL ❌ · 9s
(truncated to last 15,000 chars)
0.0/libSkiaSharp: cannot open shared object file: No such file or directory
---> System.DllNotFoundException: Unable to load shared library 'libSkiaSharp' or one of its dependencies. In order to help diagnose loading problems, consider using a tool like strace. If you're using glibc, consider setting the LD_DEBUG environment variable:
/home/vsts/work/1/s/.dotnet/shared/Microsoft.NETCore.App/10.0.0/libSkiaSharp.so: cannot open shared object file: No such file or directory
/home/vsts/work/1/s/artifacts/bin/Resizetizer.UnitTests/Debug/net10.0/libSkiaSharp.so: cannot open shared object file: No such file or directory
[xUnit.net 00:00:02.05] /home/vsts/work/1/s/.dotnet/shared/Microsoft.NETCore.App/10.0.0/liblibSkiaSharp: cannot open shared object file: No such file or directory
/home/vsts/work/1/s/.dotnet/shared/Microsoft.NETCore.App/10.0.0/liblibSkiaSharp.so: cannot open shared object file: No such file or directory
/home/vsts/work/1/s/artifacts/bin/Resizetizer.UnitTests/Debug/net10.0/liblibSkiaSharp.so: cannot open shared object file: No such file or directory
[xUnit.net 00:00:02.05] /home/vsts/work/1/s/artifacts/bin/Resizetizer.UnitTests/Debug/net10.0/liblibSkiaSharp: cannot open shared object file: No such file or directory
[xUnit.net 00:00:02.05]
/home/vsts/work/1/s/.dotnet/shared/Microsoft.NETCore.App/10.0.0/libSkiaSharp: cannot open shared object file: No such file or directory
/home/vsts/work/1/s/artifacts/bin/Resizetizer.UnitTests/Debug/net10.0/libSkiaSharp: cannot open shared object file: No such file or directory
/home/vsts/work/1/s/.dotnet/shared/Microsoft.NETCore.App/10.0.0/liblibSkiaSharp: cannot open shared object file: No such file or directory
/home/vsts/work/1/s/artifacts/bin/Resizetizer.UnitTests/Debug/net10.0/liblibSkiaSharp: cannot open shared object file: No such file or directory
at SkiaSharp.SkiaApi.sk_version_get_milestone()
at SkiaSharp.SkiaSharpVersion.get_Native()
at SkiaSharp.SkiaSharpVersion.CheckNativeLibraryCompatible(Boolean throwIfIncompatible)
at SkiaSharp.SKObject..cctor()
--- End of inner exception stack trace ---
[xUnit.net 00:00:02.05] at SkiaSharp.SkiaApi.sk_compatpaint_new()
at SkiaSharp.SKObject.DeregisterHandle(IntPtr handle, SKObject instance)
at SkiaSharp.SKObject.set_Handle(IntPtr value)
at SkiaSharp.SKNativeObject.Dispose(Boolean disposing)
at SkiaSharp.SKObject.Dispose(Boolean disposing)
[xUnit.net 00:00:02.05] at SkiaSharp.SkiaApi.sk_compatpaint_new()
at SkiaSharp.SKPaint.Dispose(Boolean disposing)
at SkiaSharp.SKNativeObject.Finalize()
at System.GC.RunFinalizers()
[xUnit.net 00:00:02.05] at SkiaSharp.SKPaint..ctor()
[xUnit.net 00:00:02.05] at Microsoft.Maui.Resizetizer.SkiaSharpTools..ctor(String filename, Nullable`1 baseSize, Nullable`1 backgroundColor, Nullable`1 tintColor, ILogger logger) in /_/src/SingleProject/Resizetizer/src/SkiaSharpTools.cs:line 83
[xUnit.net 00:00:02.05] at Microsoft.Maui.Resizetizer.SkiaSharpSvgTools..ctor(String filename, Nullable`1 baseSize, Nullable`1 backgroundColor, Nullable`1 tintColor, ILogger logger) in /_/src/SingleProject/Resizetizer/src/SkiaSharpSvgTools.cs:line 18
[xUnit.net 00:00:02.05] at Microsoft.Maui.Resizetizer.SkiaSharpTools.Create(Boolean isVector, String filename, Nullable`1 baseSize, Nullable`1 backgroundColor, Nullable`1 tintColor, ILogger logger) in /_/src/SingleProject/Resizetizer/src/SkiaSharpTools.cs:line 65
[xUnit.net 00:00:02.05] at Microsoft.Maui.Resizetizer.SkiaSharpAppIconTools..ctor(ResizeImageInfo info, ILogger logger) in /_/src/SingleProject/Resizetizer/src/SkiaSharpAppIconTools.cs:line 26
[xUnit.net 00:00:02.05] at Microsoft.Maui.Resizetizer.WindowsIconGenerator.Generate() in /_/src/SingleProject/Resizetizer/src/WindowsIconGenerator.cs:line 36
[xUnit.net 00:00:02.05] at Microsoft.Maui.Resizetizer.ResizetizeImages.ProcessAppIcon(ResizeImageInfo img, ConcurrentBag`1 resizedImages) in /_/src/SingleProject/Resizetizer/src/ResizetizeImages.cs:line 204
[xUnit.net 00:00:02.05] at Microsoft.Maui.Resizetizer.ResizetizeImages.<>c__DisplayClass34_0.<ExecuteAsync>b__0(ResizeImageInfo img) in /_/src/SingleProject/Resizetizer/src/ResizetizeImages.cs:line 64
[xUnit.net 00:00:02.05] Cleaning up directories=/tmp/Microsoft.Maui.Resizetizer.Tests/ResizetizeImagesTests+ExecuteForWindows/qyx5fd4x.dft
[xUnit.net 00:00:02.05] There was an exception processing the image ''. System.DllNotFoundException: Unable to load shared library 'libSkiaSharp' or one of its dependencies. In order to help diagnose loading problems, consider using a tool like strace. If you're using glibc, consider setting the LD_DEBUG environment variable:
[xUnit.net 00:00:02.05] /home/vsts/work/1/s/.dotnet/shared/Microsoft.NETCore.App/10.0.0/libSkiaSharp.so: cannot open shared object file: No such file or directory
[xUnit.net 00:00:02.05] /home/vsts/work/1/s/artifacts/bin/Resizetizer.UnitTests/Debug/net10.0/libSkiaSharp.so: cannot open shared object file: No such file or directory
[xUnit.net 00:00:02.05] /home/vsts/work/1/s/.dotnet/shared/Microsoft.NETCore.App/10.0.0/liblibSkiaSharp.so: cannot open shared object file: No such file or directory
[xUnit.net 00:00:02.05] /home/vsts/work/1/s/artifacts/bin/Resizetizer.UnitTests/Debug/net10.0/liblibSkiaSharp.so: cannot open shared object file: No such file or directory
[xUnit.net 00:00:02.05] /home/vsts/work/1/s/.dotnet/shared/Microsoft.NETCore.App/10.0.0/libSkiaSharp: cannot open shared object file: No such file or directory
[xUnit.net 00:00:02.05] /home/vsts/work/1/s/artifacts/bin/Resizetizer.UnitTests/Debug/net10.0/libSkiaSharp: cannot open shared object file: No such file or directory
[xUnit.net 00:00:02.05] /home/vsts/work/1/s/.dotnet/shared/Microsoft.NETCore.App/10.0.0/liblibSkiaSharp: cannot open shared object file: No such file or directory
[xUnit.net 00:00:02.05] /home/vsts/work/1/s/artifacts/bin/Resizetizer.UnitTests/Debug/net10.0/liblibSkiaSharp: cannot open shared object file: No such file or directory
[xUnit.net 00:00:02.05]
[xUnit.net 00:00:02.05] at SkiaSharp.SkiaApi.sk_compatpaint_new()
[xUnit.net 00:00:02.05] at SkiaSharp.SkiaApi.sk_compatpaint_new()
[xUnit.net 00:00:02.05] at SkiaSharp.SKPaint..ctor()
[xUnit.net 00:00:02.05] at Microsoft.Maui.Resizetizer.SkiaSharpTools..ctor(String filename, Nullable`1 baseSize, Nullable`1 backgroundColor, Nullable`1 tintColor, ILogger logger) in /_/src/SingleProject/Resizetizer/src/SkiaSharpTools.cs:line 83
[xUnit.net 00:00:02.05] at Microsoft.Maui.Resizetizer.SkiaSharpSvgTools..ctor(String filename, Nullable`1 baseSize, Nullable`1 backgroundColor, Nullable`1 tintColor, ILogger logger) in /_/src/SingleProject/Resizetizer/src/SkiaSharpSvgTools.cs:line 18
[xUnit.net 00:00:02.05] at Microsoft.Maui.Resizetizer.SkiaSharpTools.Create(Boolean isVector, String filename, Nullable`1 baseSize, Nullable`1 backgroundColor, Nullable`1 tintColor, ILogger logger) in /_/src/SingleProject/Resizetizer/src/SkiaSharpTools.cs:line 65
[xUnit.net 00:00:02.05] at Microsoft.Maui.Resizetizer.SkiaSharpAppIconTools..ctor(ResizeImageInfo info, ILogger logger) in /_/src/SingleProject/Resizetizer/src/SkiaSharpAppIconTools.cs:line 26
[xUnit.net 00:00:02.05] at Microsoft.Maui.Resizetizer.ResizetizeImages.ProcessAppIcon(ResizeImageInfo img, ConcurrentBag`1 resizedImages) in /_/src/SingleProject/Resizetizer/src/ResizetizeImages.cs:line 209
[xUnit.net 00:00:02.05] at Microsoft.Maui.Resizetizer.ResizetizeImages.<>c__DisplayClass34_0.<ExecuteAsync>b__0(ResizeImageInfo img) in /_/src/SingleProject/Resizetizer/src/ResizetizeImages.cs:line 64
[xUnit.net 00:00:02.05] Stack Trace:
[xUnit.net 00:00:02.05] /_/src/SingleProject/Resizetizer/test/UnitTests/ResizetizeImagesTests.cs(1322,0): at Microsoft.Maui.Resizetizer.Tests.ResizetizeImagesTests.ExecuteForiOS.SingleVectorAppIconWithOnlyPathSucceedsWithVectors(String name, String alias, String outputName)
[xUnit.net 00:00:02.05] at InvokeStub_ExecuteForiOS.SingleVectorAppIconWithOnlyPathSucceedsWithVectors(Object, Span`1)
[xUnit.net 00:00:02.05] at System.Reflection.MethodBaseInvoker.InvokeWithFewArgs(Object obj, BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture)
[xUnit.net 00:00:02.05] Output:
[xUnit.net 00:00:02.05] Using DestinationDirectory=/tmp/Microsoft.Maui.Resizetizer.Tests/ResizetizeImagesTests+ExecuteForiOS/rx3tvkzn.5q3
[xUnit.net 00:00:02.05] MESSAGE: iOS App Icon Set Directory: /tmp/Microsoft.Maui.Resizetizer.Tests/ResizetizeImagesTests+ExecuteForiOS/rx3tvkzn.5q3/Assets.xcassets/camera_color.appiconset
[xUnit.net 00:00:02.05] MESSAGE: App Icon
[xUnit.net 00:00:02.05] MESSAGE: iOS Icon Assets Generator
[xUnit.net 00:00:02.05] MESSAGE: Generating App Icon Bitmaps for DPIs
[xUnit.net 00:00:02.05] ERROR : There was an exception processing the image ''. System.DllNotFoundException: Unable to load shared library 'libSkiaSharp' or one of its dependencies. In order to help diagnose loading problems, consider using a tool like strace. If you're using glibc, consider setting the LD_DEBUG environment variable:
[xUnit.net 00:00:02.05] /home/vsts/work/1/s/.dotnet/shared/Microsoft.NETCore.App/10.0.0/libSkiaSharp.so: cannot open shared object file: No such file or directory
[xUnit.net 00:00:02.05] /home/vsts/work/1/s/artifacts/bin/Resizetizer.UnitTests/Debug/net10.0/libSkiaSharp.so: cannot open shared object file: No such file or directory
[xUnit.net 00:00:02.05] /home/vsts/work/1/s/.dotnet/shared/Microsoft.NETCore.App/10.0.0/liblibSkiaSharp.so: cannot open shared object file: No such file or directory
[xUnit.net 00:00:02.05] /home/vsts/work/1/s/artifacts/bin/Resizetizer.UnitTests/Debug/net10.0/liblibSkiaSharp.so: cannot open shared object file: No such file or directory
[xUnit.net 00:00:02.05] /home/vsts/work/1/s/.dotnet/shared/Microsoft.NETCore.App/10.0.0/libSkiaSharp: cannot open shared object file: No such file or directory
[xUnit.net 00:00:02.05] /home/vsts/work/1/s/artifacts/bin/Resizetizer.UnitTests/Debug/net10.0/libSkiaSharp: cannot open shared object file: No such file or directory
[xUnit.net 00:00:02.05] /home/vsts/work/1/s/.dotnet/shared/Microsoft.NETCore.App/10.0.0/liblibSkiaSharp: cannot open shared object file: No such file or directory
[xUnit.net 00:00:02.05] /home/vsts/work/1/s/artifacts/bin/Resizetizer.UnitTests/Debug/net10.0/liblibSkiaSharp: cannot open shared object file: No such file or directory
[xUnit.net 00:00:02.05]
[xUnit.net 00:00:02.05] at SkiaSharp.SkiaApi.sk_compatpaint_new()
[xUnit.net 00:00:02.05] at SkiaSharp.SkiaApi.sk_compatpaint_new()
[xUnit.net 00:00:02.05] at SkiaSharp.SKPaint..ctor()
[xUnit.net 00:00:02.05] at Microsoft.Maui.Resizetizer.SkiaSharpTools..ctor(String filename, Nullable`1 baseSize, Nullable`1 backgroundColor, Nullable`1 tintColor, ILogger logger) in /_/src/SingleProject/Resizetizer/src/SkiaSharpTools.cs:line 83
[xUnit.net 00:00:02.05] at Microsoft.Maui.Resizetizer.SkiaSharpSvgTools..ctor(String filename, Nullable`1 baseSize, Nullable`1 backgroundColor, Nullable`1 tintColor, ILogger logger) in /_/src/SingleProject/Resizetizer/src/SkiaSharpSvgTools.cs:line 18
[xUnit.net 00:00:02.05] at Microsoft.Maui.Resizetizer.SkiaSharpTools.Create(Boolean isVector, String filename, Nullable`1 baseSize, Nullable`1 backgroundColor, Nullable`1 tintColor, ILogger logger) in /_/src/SingleProject/Resizetizer/src/SkiaSharpTools.cs:line 65
[xUnit.net 00:00:02.05] at Microsoft.Maui.Resizetizer.SkiaSharpAppIconTools..ctor(ResizeImageInfo info, ILogger logger) in /_/src/SingleProject/Resizetizer/src/SkiaSharpAppIconTools.cs:line 26
[xUnit.net 00:00:02.05] at Microsoft.Maui.Resizetizer.ResizetizeImages.ProcessAppIcon(ResizeImageInfo img, ConcurrentBag`1 resizedImages) in /_/src/SingleProject/Resizetizer/src/ResizetizeImages.cs:line 209
[xUnit.net 00:00:02.05] Microsoft.Maui.Resizetizer.Tests.ResizetizeImagesTests+ExecuteForiOS.SingleVectorAppIconWithOnlyPathSucceedsWithVectors(name: "camera_color", alias: "camera_color.png", outputName: "camera_color") [FAIL]
[xUnit.net 00:00:02.05] at Microsoft.Maui.Resizetizer.ResizetizeImages.<>c__DisplayClass34_0.<ExecuteAsync>b__0(ResizeImageInfo img) in /_/src/SingleProject/Resizetizer/src/ResizetizeImages.cs:line 64
The active test run was aborted. Reason: Test host process crashed : Unhandled exception. System.TypeInitializationException: The type initializer for 'SkiaSharp.SKObject' threw an exception.
---> System.DllNotFoundException: Unable to load shared library 'libSkiaSharp' or one of its dependencies. In order to help diagnose loading problems, consider using a tool like strace. If you're using glibc, consider setting the LD_DEBUG environment variable:
/home/vsts/work/1/s/.dotnet/shared/Microsoft.NETCore.App/10.0.0/libSkiaSharp.so: cannot open shared object file: No such file or directory
/home/vsts/work/1/s/artifacts/bin/Resizetizer.UnitTests/Debug/net10.0/libSkiaSharp.so: cannot open shared object file: No such file or directory
/home/vsts/work/1/s/.dotnet/shared/Microsoft.NETCore.App/10.0.0/liblibSkiaSharp.so: cannot open shared object file: No such file or directory
/home/vsts/work/1/s/artifacts/bin/Resizetizer.UnitTests/Debug/net10.0/liblibSkiaSharp.so: cannot open shared object file: No such file or directory
/home/vsts/work/1/s/.dotnet/shared/Microsoft.NETCore.App/10.0.0/libSkiaSharp: cannot open shared object file: No such file or directory
/home/vsts/work/1/s/artifacts/bin/Resizetizer.UnitTests/Debug/net10.0/libSkiaSharp: cannot open shared object file: No such file or directory
/home/vsts/work/1/s/.dotnet/shared/Microsoft.NETCore.App/10.0.0/liblibSkiaSharp: cannot open shared object file: No such file or directory
/home/vsts/work/1/s/artifacts/bin/Resizetizer.UnitTests/Debug/net10.0/liblibSkiaSharp: cannot open shared object file: No such file or directory
at SkiaSharp.SkiaApi.sk_version_get_milestone()
at SkiaSharp.SkiaSharpVersion.get_Native()
at SkiaSharp.SkiaSharpVersion.CheckNativeLibraryCompatible(Boolean throwIfIncompatible)
at SkiaSharp.SKObject..cctor()
--- End of inner exception stack trace ---
at SkiaSharp.SKObject.DeregisterHandle(IntPtr handle, SKObject instance)
at SkiaSharp.SKObject.set_Handle(IntPtr value)
at SkiaSharp.SKNativeObject.Dispose(Boolean disposing)
at SkiaSharp.SKObject.Dispose(Boolean disposing)
at SkiaSharp.SKPaint.Dispose(Boolean disposing)
at SkiaSharp.SKNativeObject.Finalize()
at System.GC.RunFinalizers()
Test Run Aborted.
Total tests: Unknown
Passed: 1
Failed: 23
Total time: 4.3923 Seconds
⚠️ Failure Details
- ❌ ResizetizeImagesTests FAILED with fix (should pass)
Device tests: 23 of 24 failed
📁 Fix files reverted (5 files)
.config/dotnet-tools.jsoneng/Version.Details.xmleng/Versions.propseng/pipelines/ci-copilot.ymlsrc/SingleProject/Resizetizer/src/SkiaSharpSvgTools.cs
🧪 UI Tests — Category Detection
No UI test categories needed for this PR (no UI-relevant changes).
🔍 Pre-Flight — Context & Validation
Issue: #35293 - Build fails when appicon is an empty (but valid) SVG after upgrade to 10.0.60
PR: #35305 - Fix: Build fails when appicon is an empty (but valid) SVG
Platforms Affected: Android, iOS, macOS, Windows (all platforms that use Resizetizer for app icon generation)
Files Changed: 1 implementation, 2 test (1 test class file + 1 new SVG asset)
Key Findings
- Regression introduced by PR Fix: Throw a clear error when an SVG lacks dimensions instead of a NullReferenceException #33194 which added a
size.IsEmptyguard before both code paths inDrawUnscaled. The guard was appropriate only for the downscale (else) branch. - Empty SVGs (valid declared dimensions but no rendered content) have
CullRect.Size = (0,0)in SkiaSharp, causing the guard to incorrectly reject them. - PR fix moves the
size.IsEmptycheck into the else branch only, where it is actually needed (SKImageInfo requires non-zero dimensions). - The scale >= 1 path (
canvas.DrawPicture) works correctly with empty SVGs, producing a valid transparent image. - Gate ❌ FAILED: The new test
EmptySvgAppIconSucceeds_Issue35293uses an SVG withviewBox="0 0 456 456". Svg.Skia sets the Picture's CullRect from theviewBox, soCullRect.Size = (456, 456)(non-empty). As a result, the test passes even on the broken baseline (pre-fix state), making it an ineffective regression test. - The reviewer (copilot-pull-request-reviewer) raised that removing the check from the scale >= 1 path silently drops MAUIR0001 protection for truly malformed SVGs (no width/height/viewBox). The author counter-argued that DrawPicture handles empty SVGs harmlessly.
- The reviewer's concern is partially valid: for truly malformed SVGs (no declared dimensions),
GetScaledSizecomputesscale = Infinity(due to 0/0 division), soscale >= 1is always true, and MAUIR0001 is now unreachable for those SVGs too. This is a silent regression of the protective error added in PR Fix: Throw a clear error when an SVG lacks dimensions instead of a NullReferenceException #33194.
Code Review Summary
Verdict: NEEDS_CHANGES
Confidence: high
Errors: 2 | Warnings: 1 | Suggestions: 1
Key code review findings:
- ❌
src/SingleProject/Resizetizer/src/SkiaSharpSvgTools.cs:45-48— MAUIR0001 error in the else branch is dead code for truly malformed SVGs. When an SVG has no declared dimensions (the case PR Fix: Throw a clear error when an SVG lacks dimensions instead of a NullReferenceException #33194 intended to protect),GetScaledSizecomputesscale = Infinity, so the else branch is never entered. The MAUIR0001 protection is effectively removed for malformed SVGs. - ❌
src/SingleProject/Resizetizer/test/UnitTests/images/appicon_empty.svg— Test SVG hasviewBox="0 0 456 456", makingCullRect.Size = (456, 456). The testEmptySvgAppIconSucceeds_Issue35293passes even on the broken baseline, so the Gate failed — the test does not verify the regression. ⚠️ src/SingleProject/Resizetizer/src/SkiaSharpSvgTools.cs:38-65— The fix does not address the NaN/Infinity arithmetic hazard inGetScaledSizewhenoriginalSize = (0,0)and noBaseSizeor explicitdpi.Sizeis provided. For non-app-icon SVG images rendered directly, this could cause silent NaN in canvas transform scaling.- 💡 Consider differentiating "empty content" (CullRect empty, declared dimensions valid) from "malformed" (no declared dimensions) for a more precise guard, so MAUIR0001 still fires for truly malformed SVGs.
Fix Candidates
| # | Source | Approach | Test Result | Files Changed | Notes |
|---|---|---|---|---|---|
| PR | PR #35305 | Move size.IsEmpty check into else (downscale) branch only | SkiaSharpSvgTools.cs, ResizetizeImagesTests.cs, appicon_empty.svg |
Original PR — test doesn't catch regression |
🔬 Code Review — Deep Analysis
Code Review — PR #35305
Independent Assessment
What this changes: The size.IsEmpty guard in SkiaSharpSvgTools.DrawUnscaled is relocated from the top of the method (before the scale >= 1 / scale < 1 branch) to inside the else (downscale, scale < 1) branch only. A new test and test SVG asset are added.
Inferred motivation: An SVG with valid viewport declarations (width, height, viewBox) but no drawn content will have an empty CullRect as reported by SkiaSharp's Svg.Skia library. The previous guard — added by PR #33194 — checked size.IsEmpty before reaching either code path, which meant a valid-but-empty SVG used as an app icon would always throw InvalidOperationException, even though the scale >= 1 path (canvas.DrawPicture) can handle an empty picture gracefully (it simply draws nothing). The downscale path is the one that actually requires non-zero dimensions, because it creates SKSurface from the raw pixel dimensions.
Is the approach sound? Yes. The behavioral split is well-founded:
DrawPicture(svg.Picture, Paint)— SkiaSharp handles an emptySKPicturesafely; the result is a transparent bitmap.SKSurface.Create(new SKImageInfo(0, 0))— would returnnullin SkiaSharp, causing aNullReferenceExceptionon the subsequent.Canvasaccess. The guard must stay here.
Moving the check into the else branch is the minimal, correct fix.
Reconciliation with PR Narrative
Author claims: The size.IsEmpty check was incorrectly placed to execute before both branches; only the downscale branch actually uses size to construct an SKImageInfo. Empty SVGs (valid dimensions, no content) produce a zero CullRect even though DrawPicture can handle them harmlessly.
Agreement: My independent reading matches exactly. The author's root-cause analysis is correct.
Prior review thread (already resolved): A previous copilot reviewer raised the concern that moving the check removes error protection for the scale >= 1 path. The author's rebuttal — "DrawPicture harmlessly draws nothing for empty SVGs" — is correct. The concern was about truly dimensionless SVGs (PR #32460), but (a) those also produce a blank asset on the DrawPicture path (no crash), and (b) the constructor already emits a warning log for zero-CullRect SVGs. The tradeoff is acceptable.
Findings
💡 Suggestion — Test does not assert output files are generated
File: src/SingleProject/Resizetizer/test/UnitTests/ResizetizeImagesTests.cs:120–136
EmptySvgAppIconSucceeds_Issue35293 checks only that task.Execute() returns true. For comparison, the analogous BasicImageProcessingWorks test calls AssertFileExists(GetPlatformOutputFileName(...)) after checking success. Without asserting that output PNG files were produced, a regression where the task "succeeds" but silently skips file generation would not be caught.
// Consider adding after Assert.True(success, ...):
AssertFileExists(GetPlatformOutputFileName("appicon.png")); // adjust to actual expected outputNot a blocker — the primary regression (crash / InvalidOperationException) is covered — but verifying file existence would make the test more robust.
💡 Suggestion — Stale constructor warning message
File: src/SingleProject/Resizetizer/src/SkiaSharpSvgTools.cs:29–30
The constructor logs: "SVG picture did not have a size and will fail to generate." After this fix, a zero-CullRect SVG at scale >= 1 does produce output (a transparent image). The message is now misleading for that code path. Consider updating to "SVG picture has an empty bounding box; output will be transparent." or similar.
Devil's Advocate
"Is the scale check reliable?" Yes — scale is a computed ratio in SkiaSharpTools.Draw. For standard app-icon DPI paths (1×, 1.5×, 2×, 3×), scale is always ≥ 1 when the target canvas is the same size or larger than the nominal image. The only time scale < 1 is triggered is when the canvas is smaller than the source image's nominal size — a narrower scenario. The guard in the else branch will fire correctly when needed.
"Could canvas.Scale(+∞, +∞) crash in the app-icon path?" When GetOriginalSize() returns 0×0 and the platform DPI path has a fixed dpi.Size, GetScaledSize produces +Infinity scale due to IEEE 754 division of a positive number by 0.0. canvas.Scale(+Infinity, +Infinity) with a subsequent DrawPicture on an empty picture is a no-op in Skia — no pixel writes occur. The bitmap is saved as a transparent PNG. This has always been the behavior before PR #33194; the current PR restores it for the scale >= 1 path.
"Should the error path be re-added for truly dimensionless SVGs at scale ≥ 1?" A more complete fix would distinguish between "empty content but valid viewport" (should succeed) and "no dimensions at all" (should error). However, implementing that distinction requires reading SVG attributes separately from CullRect, which is more invasive and out of scope for this focused regression fix. The existing constructor warning provides the signal for the "no dimensions" case.
CI Status
All completed checks are green (Build Windows/macOS Debug/Release, Pack, Helix Unit Tests, Integration Tests across all platforms and templates). Some checks show as pending which is consistent with a PR that has already merged — those jobs are simply no longer running against this branch. ✅
Verdict: LGTM
Confidence: high
Summary: The fix is logically sound. DrawPicture safely handles an empty SKPicture (produces transparent output), while SKSurface.Create(0, 0) does not — so confining the size.IsEmpty check to the downscale branch is the correct, minimal fix. The regression test covers the reported scenario. The two suggestions above are minor improvements that do not block merge. All CI checks pass.
🔧 Fix — Analysis & Comparison
Fix Candidates
| # | Source | Approach | Test Result | Files Changed | Notes |
|---|---|---|---|---|---|
| 1 | try-fix-1 (claude-opus-4.6) | Combine scale>=1 || size.IsEmpty as single condition; remove exception; fix test SVG to viewBox="0 0 0 0" |
✅ PASS | SkiaSharpSvgTools.cs, appicon_empty.svg |
No exception for any empty SVG; loses MAUIR0001 |
| 2 | try-fix-2 (claude-sonnet-4.6) | Compound guard if (size.IsEmpty && scale < 1) throw at top of method; fix test SVG |
✅ PASS | SkiaSharpSvgTools.cs, appicon_empty.svg |
Preserves some error path; note scale=NaN (malformed SVG) → NaN<1=false so error unreachable |
| 3 | try-fix-3 (gpt-5.3-codex) | Parse SVG XML for declared dimensions; add hasDeclaredSize field; throw only when size.IsEmpty && !hasDeclaredSize |
❌ FAIL | SkiaSharpSvgTools.cs, appicon_empty.svg |
Native library load error in environment; approach is architecturally most complete |
| 4 | try-fix-4 (claude-sonnet-4.6) | Fix ONLY the test SVG (dimensionless <svg xmlns>) + update stale warning message; PR code fix unchanged |
✅ PASS | SkiaSharpSvgTools.cs (warning msg only), appicon_empty.svg |
Minimal — validates the PR code is correct; only test was broken |
| PR | PR #35305 | Move size.IsEmpty check into else (downscale) branch only | SkiaSharpSvgTools.cs, ResizetizeImagesTests.cs, appicon_empty.svg |
Code logic is correct; test SVG has non-empty CullRect, so gate test passes vacuously |
Cross-Pollination
After all 4 attempts:
Key finding: Attempt 4 confirmed that the PR's code fix is architecturally correct. The gate failed due to an ineffective test SVG, not a code error.
The three passing approaches are:
scale >= 1 || size.IsEmpty(Attempt 1) — eliminates error entirely; simplest but drops MAUIR0001size.IsEmpty && scale < 1guard at top (Attempt 2) — preserves throw path for scale<1 but unreachable for malformed SVGs in practice- Test-only fix + warning message update (Attempt 4) — validates PR code is correct; minimal invasive change
| Model | Round | New Ideas? | Details |
|---|---|---|---|
| claude-opus-4.6 | 2 | NO NEW IDEAS | Attempts 1 and 4 already cover the test-fix and code-simplification space |
| claude-sonnet-4.6 | 2 | NO NEW IDEAS | Attempt 2 and 4 cover the compound-condition and test-only approaches |
| gpt-5.3-codex | 2 | NO NEW IDEAS | Attempt 3's metadata approach was the most sophisticated; env failure, not conceptual failure |
Exhausted: Yes
Selected Fix: try-fix-4 — PR code fix is correct; only the test SVG needs to be a truly dimensionless SVG to catch the regression. Most targeted, minimal change.
📋 Report — Final Recommendation
⚠️ Final Recommendation: REQUEST CHANGES
Phase Status
| Phase | Status | Notes |
|---|---|---|
| Pre-Flight | ✅ COMPLETE | Issue #35293, Resizetizer SVG fix |
| Code Review | LGTM (high) | 0 errors, 0 warnings, 2 minor suggestions |
| Gate | ❌ FAILED | Test SVG has non-empty CullRect — test passes vacuously on broken baseline |
| Try-Fix | ✅ COMPLETE | 4 attempts, 3 passing |
| Report | ✅ COMPLETE |
Code Review Impact on Try-Fix
The code review found 2 minor suggestions (💡) only — no errors or warnings. These findings directly guided try-fix exploration: Attempt 4 specifically addressed the inaccurate warning message and invalid test SVG, both of which were flagged in the code review. The expert reviewer's LGTM verdict helped all try-fix models confirm that the code logic is sound and exploration should focus on the test quality, not the implementation.
Summary
PR #35305's code fix (moving size.IsEmpty into the else/downscale branch) is architecturally correct and minimal. However, the gate failed because the regression test uses an SVG with viewBox="0 0 456 456" — Svg.Skia sets CullRect from the viewBox, so size.IsEmpty is false even on the broken baseline, meaning the test passes vacuously without the fix. The winning candidate (pr-plus-reviewer) adds a dimensionless test SVG and updates the stale constructor warning message.
Root Cause
PR #33194 moved the size.IsEmpty guard to execute before both code paths in DrawUnscaled. Empty SVGs (valid declared dimensions, no drawn content) have an empty CullRect from Svg.Skia even though DrawPicture handles them safely. The guard only needs to protect the downscale path, where SKImageInfo(0, 0) would create a null surface.
Fix Quality
The PR's code logic is correct (LGTM from independent expert review). The test quality is insufficient: the test SVG appicon_empty.svg has viewBox="0 0 456 456" which provides non-zero CullRect dimensions, making the regression test ineffective. The pr-plus-reviewer candidate fixes this by using a dimensionless SVG (no width/height/viewBox) that genuinely triggers an empty CullRect and causes the test to fail on the broken baseline.
Selected Winner: pr-plus-reviewer
- PR code fix: ✅ correct (unchanged)
- Test SVG: fixed to
<svg version="1.1" xmlns="http://www.w3.org/2000/svg">(truly empty CullRect) - Warning message: updated from "will fail to generate" to "may render at reduced quality when downscaled"
MauiBot
left a comment
There was a problem hiding this comment.
Expert Review — 2 findings
See inline comments for details.
| var task = GetNewTask(items); | ||
| var success = task.Execute(); | ||
|
|
||
| Assert.True(success, LogErrorEvents.FirstOrDefault()?.Message); |
There was a problem hiding this comment.
[minor] Regression Prevention — EmptySvgAppIconSucceeds_Issue35293 checks only that task.Execute() returns true, but does not verify that output PNG files were actually produced. The comparable BasicImageProcessingWorks test calls AssertFileExists(GetPlatformOutputFileName(...)) after the success assertion. Without a file-existence check a future regression where the task silently skips output generation would pass this test. Consider adding AssertFileExists for the expected platform-specific output file (e.g., the app icon PNGs) to make the test a full regression guard.
|
/backport to release/10.0.1xx-sr7 |
|
Started backporting to |
… valid) SVG (#35423) Backport of #35305 to release/10.0.1xx-sr7 /cc @kubaflo @Shalini-Ashokan --------- Co-authored-by: Shalini-Ashokan <102292178+Shalini-Ashokan@users.noreply.github.com>
<!-- !!!!!!! MAIN IS THE ONLY ACTIVE BRANCH. MAKE SURE THIS PR IS TARGETING MAIN. !!!!!!! --> <!-- Please let the below note in for people that find this PR --> > [!NOTE] > Are you waiting for the changes in this PR to be merged? > It would be very helpful if you could [test the resulting artifacts](https://github.com/dotnet/maui/wiki/Testing-PR-Builds) from this PR and let us know in a comment if this change resolves your issue. Thank you! <!-- !!!!!!! MAIN IS THE ONLY ACTIVE BRANCH. MAKE SURE THIS PR IS TARGETING MAIN. !!!!!!! --> ### Issue Details Build fails with InvalidOperationException when using an empty (but valid) SVG as the app icon. The SVG has width, height, and viewBox but no drawn shapes inside. ### Root Cause PR #33194 moved the size.IsEmpty check to run before both code paths in DrawUnscaled, but size (from CullRect) is only needed in the downscale path. Empty SVGs have a zero CullRect even with valid declared dimensions, so the check incorrectly blocks the upscale path that never uses size. ### Description of Change Moved the size.IsEmpty check from before both branches into only the else (downscale) branch where size is actually used. The scale >= 1 path calls DrawPicture directly, which harmlessly draws nothing for empty SVGs, producing a valid transparent image. Validated the behavior in the following platforms - [x] Android - [x] Windows - [x] iOS - [x] Mac ### Issues Fixed Fixes #35293 ### Output ScreenShot |Before|After| |--|--| | <video src="https://github.com/user-attachments/assets/cf8040d6-9b0f-4867-bd4a-1713ea41d1d5" >| <video src="https://github.com/user-attachments/assets/97c09d5e-b2cc-4a13-b5a3-dc056dacba78">|
…xx-sr8 (#35810) <!-- Please let the below note in for people that find this PR --> > [!NOTE] > Are you waiting for the changes in this PR to be merged? > It would be very helpful if you could [test the resulting artifacts](https://github.com/dotnet/maui/wiki/Testing-PR-Builds) from this PR and let us know in a comment if this change resolves your issue. Thank you! ## Cut-then-merge step 2 of 2 SR8 was cut from `main` at [`e02d6b6dc2`](e02d6b6) (commit "Add gh-aw rerun review scanner (#35685)"). This PR pulls the SR7 stabilization work into SR8 so SR8 contains everything that's in SR7. - **Base:** `release/10.0.1xx-sr8` @ [`e02d6b6dc2`](e02d6b6) - **Merging in:** `release/10.0.1xx-sr7` @ [`9da598b4a1`](9da598b) (PatchVersion bump to 71) - **Merge base:** [`f8cb875e`](f8cb875eee) ("[Testing] The Windows WebView category is removed from CI…" #35335) - **Strategy:** non-fast-forward merge commit (preserves both branches' history) ## Conflict resolution Two trivial conflicts, both resolved by taking the SR8 (`HEAD`) side: | File | Why it conflicted | Resolution | | --- | --- | --- | | [`eng/Versions.props`](https://github.com/dotnet/maui/blob/release/10.0.1xx-sr8/eng/Versions.props) | SR7 bumped `PatchVersion` 70→71 (#35786); SR8 starts at 80 | Keep `PatchVersion=80` (SR8 is the higher patch band) | | `src/Controls/src/Core/Compatibility/Handlers/Shell/iOS/ShellSectionRenderer.cs` | Whitespace-only difference (`false; //` vs `false; //`) in two comments | Keep SR8's whitespace | No semantic conflicts. ## Inherited from SR7 26 SR7-only commits land in SR8 via this merge. The source PRs are: <details> <summary>Source PRs (43, deduped by commit)</summary> #35020, #35072, #35092, #35150, #35223, #35299, #35305, #35347, #35356, #35359, #35360, #35421, #35423, #35424, #35425, #35426, #35427, #35428, #35430, #35434, #35441, #35447, #35461, #35480, #35503, #35520, #35521, #35559, #35566, #35585, #35625, #35642, #35664, #35689, #35690, #35691, #35692, #35693, #35694, #35703, #35744, #35768, #35786 Includes the SR7 revert chain: - #35689 — Revert PR #30068 (FontImageSource centering on Windows) - #35694 — Revert TalkBack RadioButton fix - #35703 — Revert Shell.NavBarIsVisible fix - #35744 — Revert HybridWebView WebView fix - #35461, #35503 — additional Android reverts </details> After this lands, the release-readiness tracker can survey `release/10.0.1xx-sr8` directly instead of using `-Candidate -InheritFromPriorSr` mode against SR7.
<!-- !!!!!!! MAIN IS THE ONLY ACTIVE BRANCH. MAKE SURE THIS PR IS TARGETING MAIN. !!!!!!! --> <!-- Please let the below note in for people that find this PR --> > [!NOTE] > Are you waiting for the changes in this PR to be merged? > It would be very helpful if you could [test the resulting artifacts](https://github.com/dotnet/maui/wiki/Testing-PR-Builds) from this PR and let us know in a comment if this change resolves your issue. Thank you! <!-- !!!!!!! MAIN IS THE ONLY ACTIVE BRANCH. MAKE SURE THIS PR IS TARGETING MAIN. !!!!!!! --> ### Issue Details Build fails with InvalidOperationException when using an empty (but valid) SVG as the app icon. The SVG has width, height, and viewBox but no drawn shapes inside. ### Root Cause PR #33194 moved the size.IsEmpty check to run before both code paths in DrawUnscaled, but size (from CullRect) is only needed in the downscale path. Empty SVGs have a zero CullRect even with valid declared dimensions, so the check incorrectly blocks the upscale path that never uses size. ### Description of Change Moved the size.IsEmpty check from before both branches into only the else (downscale) branch where size is actually used. The scale >= 1 path calls DrawPicture directly, which harmlessly draws nothing for empty SVGs, producing a valid transparent image. Validated the behavior in the following platforms - [x] Android - [x] Windows - [x] iOS - [x] Mac ### Issues Fixed Fixes #35293 ### Output ScreenShot |Before|After| |--|--| | <video src="https://github.com/user-attachments/assets/cf8040d6-9b0f-4867-bd4a-1713ea41d1d5" >| <video src="https://github.com/user-attachments/assets/97c09d5e-b2cc-4a13-b5a3-dc056dacba78">|
Note
Are you waiting for the changes in this PR to be merged?
It would be very helpful if you could test the resulting artifacts from this PR and let us know in a comment if this change resolves your issue. Thank you!
Issue Details
Build fails with InvalidOperationException when using an empty (but valid) SVG as the app icon. The SVG has width, height, and viewBox but no drawn shapes inside.
Root Cause
PR #33194 moved the size.IsEmpty check to run before both code paths in DrawUnscaled, but size (from CullRect) is only needed in the downscale path. Empty SVGs have a zero CullRect even with valid declared dimensions, so the check incorrectly blocks the upscale path that never uses size.
Description of Change
Moved the size.IsEmpty check from before both branches into only the else (downscale) branch where size is actually used. The scale >= 1 path calls DrawPicture directly, which harmlessly draws nothing for empty SVGs, producing a valid transparent image.
Validated the behavior in the following platforms
Issues Fixed
Fixes #35293
Output ScreenShot
35293-BeforeFix.mov
35293-AfterFix.mov