
Description
Sometimes, the client can get into a broken state where some SVGs are unable to be loaded. Clearing the cache nor reinstalling seems to be 100% consistent in fixing this. I have made a patch to ignore the exception and just return the contents of gear.svg
<pre>System.ArgumentNullException: Value cannot be null. (Parameter 'Asset Data is null. Is the asset loaded?')
at Vintagestory.Client.NoObf.SvgLoader.rasterizeSvg(IAsset svgAsset, Int32 textureWidth, Int32 textureHeight, Int32 width, Int32 height, Nullable
at Vintagestory.Client.NoObf.GuiAPI.DrawSvg(IAsset svgAsset, ImageSurface intoSurface, Matrix matrix, Int32 posx, Int32 posy, Int32 width, Int32 height, Nullable`1 color) in VintagestoryLib\Client\API\GuiAPI.cs:line 58
at Vintagestory.GameContent.WaypointMapLayer.<>c__DisplayClass18_1.<.ctor>b__2(Context ctx, Int32 x, Int32 y, Single w, Single h, Double[] rgba) in VSEssentials\Systems\WorldMap\WaypointLayer\WaypointMapLayer.cs:line 118
at Vintagestory.API.Client.IconUtil.DrawIconInt(Context cr, String type, Int32 x, Int32 y, Single width, Single height, Double[] rgba) in VintagestoryApi\Client\UI\IconUtil.cs:line 121
at Vintagestory.API.Client.IconUtil.DrawIcon(Context cr, String type, Double x, Double y, Double width, Double height, Double[] rgba) in VintagestoryApi\Client\UI\IconUtil.cs:line 104</pre>
at Vintagestory.Client.NoObf.SvgLoader.rasterizeSvg(IAsset svgAsset, Int32 textureWidth, Int32 textureHeight, Int32 width, Int32 height, Nullable
1 color) in VintagestoryLib\Client\ClientPlatform\SvgLoader.cs:line 154<br /> at Vintagestory.Client.NoObf.SvgLoader.DrawSvg(IAsset svgAsset, ImageSurface intoSurface, Matrix matrix, Int32 posx, Int32 posy, Int32 width, Int32 height, Nullable1 color) in VintagestoryLib\Client\ClientPlatform\SvgLoader.cs:line 74at Vintagestory.Client.NoObf.GuiAPI.DrawSvg(IAsset svgAsset, ImageSurface intoSurface, Matrix matrix, Int32 posx, Int32 posy, Int32 width, Int32 height, Nullable`1 color) in VintagestoryLib\Client\API\GuiAPI.cs:line 58
at Vintagestory.GameContent.WaypointMapLayer.<>c__DisplayClass18_1.<.ctor>b__2(Context ctx, Int32 x, Int32 y, Single w, Single h, Double[] rgba) in VSEssentials\Systems\WorldMap\WaypointLayer\WaypointMapLayer.cs:line 118
at Vintagestory.API.Client.IconUtil.DrawIconInt(Context cr, String type, Int32 x, Int32 y, Single width, Single height, Double[] rgba) in VintagestoryApi\Client\UI\IconUtil.cs:line 121
at Vintagestory.API.Client.IconUtil.DrawIcon(Context cr, String type, Double x, Double y, Double width, Double height, Double[] rgba) in VintagestoryApi\Client\UI\IconUtil.cs:line 104</pre>
Download
No download link is available for this entry right now.
Ratings & reviews
No ratings yet
Sign in to leave a rating or comment.

