softlion / XamSvg-Samples

Samples for Xamarin Svg enterprise cross platform and full featured Svg image control
https://vapolia.eu
MIT License
24 stars 4 forks source link

System.NullReferenceException when calling SvgImageSource.Create() #1

Closed idan-rubin closed 7 years ago

idan-rubin commented 7 years ago

Adding the following code to XamSvg.XamFormsDemo\XamSvg.Demo\Pages\MainPage.xaml.cs class, in line 60 causes a NullReferenceException: var imageSource = SvgImageSource.Create("res:images.refresh");

softlion commented 7 years ago

Fixed / see UserVoice

idan-rubin commented 7 years ago

Thanks.

xperseguers commented 7 years ago

Looks like I have a similar problem, where is this "UserVoice" information?

softlion commented 7 years ago

Your issue is not the same. In your stack trace there is no xamsvg crash. Check your code again, or use a SvgImage instead.

xperseguers commented 7 years ago

When I return a ImageSource.FromFile instead, I get no exception.

Xavier Perseguers Sent from my iPhone

On 25 Apr 2017, at 22:02, Softlion (Benjamin Mayrargue) notifications@github.com<mailto:notifications@github.com> wrote:

Your issue is not the same. In your stack trace there is no xamsvg crash. Check your code again, or use a SvgImage instead.

- You are receiving this because you commented. Reply to this email directly, view it on GitHubhttps://github.com/softlion/XamSvg-Samples/issues/1#issuecomment-297148016, or mute the threadhttps://github.com/notifications/unsubscribe-auth/AAnelZ5unxXadlcw4ss7EHhZUUZq2h2tks5rzlE_gaJpZM4MTcdH.

softlion commented 7 years ago

Fixed in 2.3.4.3 Caused by a late use of the resulting ImageSource, disposing the memory stream used.