Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[QUESTION] What is the status of the svg nuget package? #68

Closed
pauldendulk opened this issue Jan 5, 2019 · 13 comments
Closed

[QUESTION] What is the status of the svg nuget package? #68

pauldendulk opened this issue Jan 5, 2019 · 13 comments
Labels

Comments

@pauldendulk
Copy link

There has been no new release of a 1.68 svg nuget package.
https://www.nuget.org/packages/SkiaSharp.Svg/

The last release is of 1.60.0. There has not been a release of a 1.60.3 version. This might be because there have been no changes in the svg part, but apparently there had been breaking changes in the shared part because if upgrade to 1.60.3 and use 1.60.0 for svg we get a method not found exception in our project (Mapsui)

Will there be a new release of the svg package?

@pauldendulk
Copy link
Author

This is the exception we get when using 1.60.0 for svg and 1.60.3 for the other packages:
System.TypeInitializationException. The type initializer for 'SkiaSharp.SKImageInfo' threw an exception.

This is the inner exceptino:
BadImageFormatException: An attempt was made to load a program with an incorrect format.

Here is the full stackstrace

System.TypeInitializationException
  HResult=0x80131534
  Message=The type initializer for 'SkiaSharp.SKImageInfo' threw an exception.
  Source=SkiaSharp.Views.WPF
  StackTrace:
   at SkiaSharp.Views.WPF.SKElement.OnRender(DrawingContext drawingContext)
   at System.Windows.UIElement.Arrange(Rect finalRect)
   at System.Windows.Controls.Grid.ArrangeOverride(Size arrangeSize)
   at System.Windows.FrameworkElement.ArrangeCore(Rect finalRect)
   at System.Windows.UIElement.Arrange(Rect finalRect)
   at System.Windows.Controls.Grid.ArrangeOverride(Size arrangeSize)
   at System.Windows.FrameworkElement.ArrangeCore(Rect finalRect)
   at System.Windows.UIElement.Arrange(Rect finalRect)
   at System.Windows.Controls.DockPanel.ArrangeOverride(Size arrangeSize)
   at System.Windows.FrameworkElement.ArrangeCore(Rect finalRect)
   at System.Windows.UIElement.Arrange(Rect finalRect)
   at System.Windows.Controls.Grid.ArrangeOverride(Size arrangeSize)
   at System.Windows.FrameworkElement.ArrangeCore(Rect finalRect)
   at System.Windows.UIElement.Arrange(Rect finalRect)
   at MS.Internal.Helper.ArrangeElementWithSingleChild(UIElement element, Size arrangeSize)
   at System.Windows.Controls.ContentPresenter.ArrangeOverride(Size arrangeSize)
   at System.Windows.FrameworkElement.ArrangeCore(Rect finalRect)
   at System.Windows.UIElement.Arrange(Rect finalRect)
   at System.Windows.Documents.AdornerDecorator.ArrangeOverride(Size finalSize)
   at System.Windows.FrameworkElement.ArrangeCore(Rect finalRect)
   at System.Windows.UIElement.Arrange(Rect finalRect)
   at System.Windows.Controls.Border.ArrangeOverride(Size finalSize)
   at System.Windows.FrameworkElement.ArrangeCore(Rect finalRect)
   at System.Windows.UIElement.Arrange(Rect finalRect)
   at System.Windows.Window.ArrangeOverride(Size arrangeBounds)
   at System.Windows.FrameworkElement.ArrangeCore(Rect finalRect)
   at System.Windows.UIElement.Arrange(Rect finalRect)
   at System.Windows.Interop.HwndSource.SetLayoutSize()
   at System.Windows.Interop.HwndSource.set_RootVisualInternal(Visual value)
   at System.Windows.Interop.HwndSource.set_RootVisual(Visual value)
   at System.Windows.Window.SetRootVisual()
   at System.Windows.Window.SetRootVisualAndUpdateSTC()
   at System.Windows.Window.SetupInitialState(Double requestedTop, Double requestedLeft, Double requestedWidth, Double requestedHeight)
   at System.Windows.Window.CreateSourceWindow(Boolean duringShow)
   at System.Windows.Window.CreateSourceWindowDuringShow()
   at System.Windows.Window.SafeCreateWindowDuringShow()
   at System.Windows.Window.ShowHelper(Object booleanBox)
   at System.Windows.Threading.ExceptionWrapper.InternalRealCall(Delegate callback, Object args, Int32 numArgs)
   at System.Windows.Threading.ExceptionWrapper.TryCatchWhen(Object source, Delegate callback, Object args, Int32 numArgs, Delegate catchHandler)
   at System.Windows.Threading.DispatcherOperation.InvokeImpl()
   at System.Windows.Threading.DispatcherOperation.InvokeInSecurityContext(Object state)
   at MS.Internal.CulturePreservingExecutionContext.CallbackWrapper(Object obj)
   at System.Threading.ExecutionContext.RunInternal(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx)
   at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx)
   at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state)
   at MS.Internal.CulturePreservingExecutionContext.Run(CulturePreservingExecutionContext executionContext, ContextCallback callback, Object state)
   at System.Windows.Threading.DispatcherOperation.Invoke()
   at System.Windows.Threading.Dispatcher.ProcessQueue()
   at System.Windows.Threading.Dispatcher.WndProcHook(IntPtr hwnd, Int32 msg, IntPtr wParam, IntPtr lParam, Boolean& handled)
   at MS.Win32.HwndWrapper.WndProc(IntPtr hwnd, Int32 msg, IntPtr wParam, IntPtr lParam, Boolean& handled)
   at MS.Win32.HwndSubclass.DispatcherCallbackOperation(Object o)
   at System.Windows.Threading.ExceptionWrapper.InternalRealCall(Delegate callback, Object args, Int32 numArgs)
   at System.Windows.Threading.ExceptionWrapper.TryCatchWhen(Object source, Delegate callback, Object args, Int32 numArgs, Delegate catchHandler)
   at System.Windows.Threading.Dispatcher.LegacyInvokeImpl(DispatcherPriority priority, TimeSpan timeout, Delegate method, Object args, Int32 numArgs)
   at MS.Win32.HwndSubclass.SubclassWndProc(IntPtr hwnd, Int32 msg, IntPtr wParam, IntPtr lParam)
   at MS.Win32.UnsafeNativeMethods.DispatchMessage(MSG& msg)
   at System.Windows.Threading.Dispatcher.PushFrameImpl(DispatcherFrame frame)
   at System.Windows.Threading.Dispatcher.PushFrame(DispatcherFrame frame)
   at System.Windows.Application.RunDispatcher(Object ignore)
   at System.Windows.Application.RunInternal(Window window)
   at System.Windows.Application.Run(Window window)
   at System.Windows.Application.Run()
   at Mapsui.Samples.Wpf.App.Main()

Inner Exception 1:
BadImageFormatException: An attempt was made to load a program with an incorrect format. (Exception from HRESULT: 0x8007000B)

@pauldendulk
Copy link
Author

pauldendulk commented Feb 8, 2019

@Redth Perhaps it is possible to answer my main question without analyzing the exception. The roadmap of my project depends on it.

My question is about the status of the svg package. It is now not released in sync with the other releases. Why is that? I was thinking about an answer along there lines:

  • It is disbanded, no further updates.
  • It should work properly alongside the newer releases of the other skiasharp nugets, no further updates are needed.
  • There is going to be a newer release but we could not find time for it yet.
  • We have not decided whether we wil continue the svg package.

@mattleibow
Copy link
Contributor

mattleibow commented Feb 10, 2019

@pauldendulk apologies for the very long delay. The bits by Redth was the automated system, and then I missed this issue because it wasn't directly to do with this repo.

So... your questions. I think this issue might not have to do with SkiaSharp - I think WPF might be loading the wrong native binary. Does this work with the older versions of everything?

Then, the next question. You got it exactly here "There is going to be a newer release but we could not find time for it yet". Unfortunately, various constraints lead this to be the case, but I am very much hoping to get some updates out. At the same time, this package is not really a real thing - more of a stop-gap until skia gets native support for SVG. I am not sure when this will actually come about as the code is both very experimental and fairly old: https://github.com/google/skia/tree/master/experimental/svg/model The main reason for this no-focus here is that this library is actually pretty limited and most of the issues have to do with not-complex-but-not-basic features missing.

With that said, I am trying to get the release to be more automated and less of a hassle - removing all excuses for updates. The last 2 weeks, we were moving the CI to Azure DevOps, so that is going to be a major reduction in friction. So far, the builds have been smooth.

In summary:
We want to, but effort is prioritised elsewhere.
Then, there is the whole issue that this is not going to be the go-to library for SVG, but is more of an interim. Unless, we can get a major community effort behind this and then we can re-evaluate the focus.
And then, I do want to see this be somewhat useful to the community.

@mattleibow
Copy link
Contributor

I am also going to move this issue into the SkiaSharp.Extended repository as we can better track it there.

@mattleibow mattleibow transferred this issue from mono/SkiaSharp Feb 10, 2019
@mattleibow mattleibow reopened this Feb 10, 2019
@charlesroddie
Copy link

@mattleibow This is the svg library for cross-platform .Net use right now. It already works well. Even if not feature-complete, it does enough for most users. It's OK if you don't have time to add features. Just merging community PRs and releasing in sync with the main SkiaSharp nuget should be enough.

@mattleibow
Copy link
Contributor

@charlesroddie thanks for the feedback. I hope to start doing that on a more regular basis.

@charlesroddie
Copy link

@mattleibow any ETA for Skiasharp.Svg nuget release?

@rbrian
Copy link

rbrian commented Apr 19, 2019

@mattleibow adding a voice to the request for a 1.68 compatible version. I'm suffering from a "MSB3276: Found conflicts between different versions of the same dependent assembly." problem partly because of it, AFAICT.

@claunia
Copy link

claunia commented May 26, 2019

adding a voice to the request request for a 1.68 version because there have been fixes to #42 and #44

@dsyme
Copy link

dsyme commented Nov 25, 2019

I got this error when trying to use SkiaSharp for WPF 1.68.1, it might be related

Exception thrown: 'System.BadImageFormatException' in SkiaSharp.dll
An attempt was made to load a program with an incorrect format. (Exception from HRESULT: 0x8007000B)

Exception thrown: 'System.TypeInitializationException' in SkiaSharp.Views.WPF.dll
The type initializer for 'SkiaSharp.SKImageInfo' threw an exception.

@charlesroddie
Copy link

@dsyme does this happen with both SkiaSharp.Svg 1.60.0 and 1.59.1?

I don't think there will be any fixes merged for SkiaSharp.Svg.

This library may be the way to go: https://github.com/wieslawsoltes/Svg.Skia . The overall project is to convert https://github.com/vvvv/SVG to netstandard (svg-net/SVG#590) and then give it more renderers, of which https://github.com/wieslawsoltes/Svg.Skia is one.

@dsyme
Copy link

dsyme commented Nov 25, 2019

It was something else, related to this mono/SkiaSharp#586 (comment)

Fix is here for posterity; fabulous-dev/Fabulous#619 (comment)

@mattleibow
Copy link
Contributor

Thanks for this issue, but due the the fact that this library is now deprecated, no further work will be done on this library.

I would recommend using the far superior https://github.com/wieslawsoltes/Svg.Skia

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

6 participants