Closed KvanTTT closed 6 years ago
Try with Skia backend. It might be somehow related to Direct2D
Could you make sure this update is installed? https://msdn.microsoft.com/en-us/library/windows/desktop/jj863687(v=vs.85).aspx
Yes, this update (KB2670838) installed on my computer.
Strange, as from msdn Direct2D works from windows 7, better check twice, maybe you re using some feature available in win8 only?
Maybe Avalonia uses DirectComposition features as @kekekeks said? It's available since Win 8.1.
Might be related to changes introduced by this PR: https://github.com/AvaloniaUI/Avalonia/pull/850
https://github.com/AvaloniaUI/Avalonia/pull/850/commits/f44468a3ab6f2abb0d1cb5250ebe835b952dcaa2#diff-0c90be92f9ea152473fef6304fadb3e3R47 It now requires DirectX 12, so that might be failing
It also uses a couple of DirectX 11 calls. I'm not sure that it's the right behavior from compatibility point of view.
https://i.imgur.com/Uht4He4.png - Exception from static constructor
I assume that error is being thrown by this line?
Not sure, screenshot was taken not from my machine
According to the stack trace it should be this line: https://github.com/AvaloniaUI/Avalonia/blob/master/src/Windows/Avalonia.Direct2D1/Direct2D1Platform.cs#L36
Probably its necessary to check for debug layer support before enable debug features for DirectX backend
@OronDF343 could you please provide a stacktrace of your DXGI_ERROR_INVALID_CALL?
This one happens with GTK and Direct2D1:
Marshaling expose_event signal
Exception in Gtk# callback delegate
Note: Applications can use GLib.ExceptionManager.UnhandledException to handle the exception.
System.Reflection.TargetInvocationException: Exception has been thrown by the target of an invocation. ---> SharpDX.SharpDXException: HRESULT: [0x887A0001], Module: [SharpDX.DXGI], ApiCode: [DXGI_ERROR_INVALID_CALL/InvalidCall], Message: Unknown
at SharpDX.Result.CheckError()
at SharpDX.DXGI.Factory2.CreateSwapChainForHwnd(ComObject deviceRef, IntPtr hWnd, SwapChainDescription1& descRef, Nullable`1 fullscreenDescRef, Output restrictToOutputRef, SwapChain1 swapChainOut)
at Avalonia.Direct2D1.HwndRenderTarget.CreateSwapChain(Factory2 dxgiFactory, SwapChainDescription1 swapChainDesc)
at Avalonia.Direct2D1.SwapChainRenderTarget.CreateSwapChain()
at Avalonia.Direct2D1.SwapChainRenderTarget.CreateDrawingContext()
at Avalonia.Rendering.RendererMixin.Render(IRenderTarget renderTarget, IVisual visual)
at Avalonia.Rendering.Renderer.Render(Rect rect)
at Avalonia.Gtk.TopLevelImpl.OnExposeEvent(Object o, ExposeEventArgs args)
--- End of inner exception stack trace ---
at System.RuntimeMethodHandle.InvokeMethod(Object target, Object[] arguments, Signature sig, Boolean constructor)
at System.Reflection.RuntimeMethodInfo.UnsafeInvokeInternal(Object obj, Object[] parameters, Object[] arguments)
at System.Delegate.DynamicInvokeImpl(Object[] args)
at GLib.Signal.ClosureInvokedCB(Object o, ClosureInvokedArgs args)
at GLib.SignalClosure.Invoke(ClosureInvokedArgs args)
at GLib.SignalClosure.MarshalCallback(IntPtr raw_closure, IntPtr return_val, UInt32 n_param_vals, IntPtr param_values, IntPtr invocation_hint, IntPtr marshal_data)
at GLib.ExceptionManager.RaiseUnhandledException(Exception e, Boolean is_terminal)
at GLib.SignalClosure.MarshalCallback(IntPtr raw_closure, IntPtr return_val, UInt32 n_param_vals, IntPtr param_values, IntPtr invocation_hint, IntPtr marshal_data)
at Gtk.Application.gtk_maThe program '[8032] ICEPlayer.UI.Windows.exe' has exited with code 1 (0x1).
in_iteration()
at Avalonia.Gtk.GtkPlatform.RunLoop(CancellationToken cancellationToken)
at Avalonia.Threading.Dispatcher.MainLoop(CancellationToken cancellationToken)
at Avalonia.Application.Run(ICloseable closable)
at Avalonia.Controls.AppBuilderBase`1.Start[TMainWindow](Func`1 dataContextProvider)
at ICEPlayer.UI.Windows.Program.Main(String[] args) in C:\Users\Oron\OneDrive\ProjectICE\ICEPlayer\ICEPlayer.UI.Windows\Program.cs:line 21
On Win32 I just get a blank white window as above. I'm no longer able to reproduce the error that I got with an empty class inheriting from Window on Win32.
I think issue this line https://github.com/AvaloniaUI/Avalonia/pull/850/files#diff-d5d54e96d54f8703b8a8d99483dc5b38R103 SwapEffect.FlipSequential start support windows 8. https://msdn.microsoft.com/en-us/library/windows/desktop/bb173077(v=vs.85).aspx
I got the following window with empty content: .
Maybe this issue related to shcore.dll library.