muak / SvgImageSource

Custom ImageSource that will become able to show svg image for Xamarin.Forms
MIT License
62 stars 11 forks source link

SVG from URI not loading #5

Closed candidodmv closed 4 years ago

candidodmv commented 5 years ago

[0:] Image loading: Image load failed: System.ObjectDisposedException: Can not access a closed Stream. at System.IO.MemoryStream.EnsureNotClosed () [0x0000d] in <46c2fa109b574c7ea6739f9fe2350976>:0 at System.IO.MemoryStream.Read (System.Byte[] buffer, System.Int32 offset, System.Int32 count) [0x0004e] in <46c2fa109b574c7ea6739f9fe2350976>:0 at System.Xml.XmlTextReaderImpl.InitStreamInput (System.Uri baseUri, System.String baseUriStr, System.IO.Stream stream, System.Byte[] bytes, System.Int32 byteCount, System.Text.Encoding encoding) [0x000e4] in <0757e7484a1349cca3b4558c721885b2>:0 at System.Xml.XmlTextReaderImpl.FinishInitStream () [0x00020] in <0757e7484a1349cca3b4558c721885b2>:0 at System.Xml.XmlTextReaderImpl..ctor (System.IO.Stream stream, System.Byte[] bytes, System.Int32 byteCount, System.Xml.XmlReaderSettings settings, System.Uri baseUri, System.String baseUriStr, System.Xml.XmlParserContext context, System.Boolean closeInput) [0x000d3] in <0757e7484a1349cca3b4558c721885b2>:0 at System.Xml.XmlReaderSettings.CreateReader (System.IO.Stream input, System.Uri baseUri, System.String baseUriString, System.Xml.XmlParserContext inputContext) [0x0002b] in <0757e7484a1349cca3b4558c721885b2>:0 at System.Xml.XmlReader.Create (System.IO.Stream input, System.Xml.XmlReaderSettings settings, System.Xml.XmlParserContext inputContext) [0x0000a] in <0757e7484a1349cca3b4558c721885b2>:0 at SkiaSharp.Extended.Svg.SKSvg.Load (System.IO.Stream stream) [0x0000c] in :0 at Xamarin.Forms.Svg.SvgUtility.CreateImage (System.IO.Stream stream, System.Double width, System.Double height, Xamarin.Forms.Color color) [0x0000c] in /Volumes/SD/Dropbox/work/projects/SvgImageSource/SvgImageSource/SvgUtility.cs:26 at Xamarin.Forms.Svg.SvgImageSource.GetImageStreamAsync (System.Threading.CancellationToken userToken) [0x000e2] in /Volumes/SD/Dropbox/work/projects/SvgImageSource/SvgImageSource/SvgImageSource.cs:348 at Xamarin.Forms.Svg.Droid.SvgImageSourceHandler.LoadImageAsync (Xamarin.Forms.ImageSource imagesource, Android.Content.Context context, System.Threading.CancellationToken cancelationToken) [0x0003a] in /Volumes/SD/Dropbox/work/projects/SvgImageSource/SvgImageSource.Droid/SvgImageSourceHandler.cs:25 at Xamarin.Forms.Platform.Android.ResourceManager.GetFormsBitmapAsync (Android.Content.Context context, Xamarin.Forms.ImageSource imageSource, System.Threading.CancellationToken cancellationToken) [0x0006d] in d:\a\1\s\Xamarin.Forms.Platform.Android\ResourceManager.cs:95

candidodmv commented 5 years ago

I've made an PR that solve this issue #6

muak commented 4 years ago

@candidodmv Thank you for your report!