unoplatform / uno

Open-source platform for building cross-platform native Mobile, Web, Desktop and Embedded apps quickly. Create rich, C#/XAML, single-codebase apps from any IDE. Hot Reload included! 90m+ NuGet Downloads!!
https://platform.uno
Apache License 2.0
9.06k stars 735 forks source link

[Skia.GTK] new template app doesn't show anything on launch when updated to latest #8543

Closed Xiaoy312 closed 2 years ago

Xiaoy312 commented 2 years ago

Current behavior

using: Uno.ProjectTemplates.Dotnet::4.1.8 create the app from template: dotnet new unoapp -n PROJECT_NAME update packages to the latest: image launch the app on Skia.GTK: get a white blank screen (even on dark mode)

on rare occasion, we can briefly see the MainPage content displayed correctly (in dark mode) for a fraction of second before disappearing: 20220412 skia gtk whitescreen

Expected behavior

^ should just work

How to reproduce it (as minimally and precisely as possible)

WasmErrors8540.zip launch Skia.Gtk head

Workaround

use software rendering:

// in PROJECT_NAME.Skia.Gtk\Program.cs
var host = new GtkHost(() => new App(), args) { RenderSurfaceType = RenderSurfaceType.Software };

Works on UWP/WinUI

Yes

Environment

Uno.UI / Uno.UI.WebAssembly / Uno.UI.Skia

NuGet package version(s)

Uno.UI.Skia.Gtk@4.2.0-dev.605

Affected platforms

Skia (GTK on Linux/macOS/Windows)

IDE

Visual Studio 2022

IDE version

Version 17.1.1

Relevant plugins

n/a

Anything else we need to know?

other related platforms, like skia.wpf or wasm, work fine


there is nothing special in the log output either:

console log ``` fail: Uno.UI.RemoteControl.RemoteControlClient[0] Failed to get remote control server port from the IDE for endpoint 169.254.71.45. fail: Uno.UI.RemoteControl.RemoteControlClient[0] Failed to get remote control server port from the IDE for endpoint [fe80::c003:b023:9e52:1637]. fail: Uno.UI.RemoteControl.RemoteControlClient[0] Failed to get remote control server port from the IDE for endpoint 169.254.22.55. fail: Uno.UI.RemoteControl.RemoteControlClient[0] Failed to get remote control server port from the IDE for endpoint [fe80::64a3:aef0:8f4a:6298]. fail: Uno.UI.RemoteControl.RemoteControlClient[0] Failed to get remote control server port from the IDE for endpoint 169.254.98.152. fail: Uno.UI.RemoteControl.RemoteControlClient[0] Failed to get remote control server port from the IDE for endpoint [fe80::6417:b33:af8:484d]. fail: Uno.UI.RemoteControl.RemoteControlClient[0] Failed to get remote control server port from the IDE for endpoint 10.0.0.143. fail: Uno.UI.RemoteControl.RemoteControlClient[0] Failed to get any remote control server endpoint from the IDE. warn: Windows.UI.Xaml.UIElement[0] The BorderThicknessProperty dependency property does not exist on Uno.UI.Xaml.Core.RootVisual fail: Windows.UI.Composition.CompositionObject[0] The member void CompositionObject.Dispose() is not implemented in Uno. ```

not sure if related or not, one warning that used to be in 4.1.8 is not there anymore:

warn: Uno.UI.ResourceResolver[0] Couldn't statically resolve resource DefaultRepeatButtonStyle ```diff fail: Uno.UI.RemoteControl.RemoteControlClient[0] Failed to get remote control server port from the IDE for endpoint 169.254.71.45. fail: Uno.UI.RemoteControl.RemoteControlClient[0] Failed to get remote control server port from the IDE for endpoint [fe80::c003:b023:9e52:1637]. fail: Uno.UI.RemoteControl.RemoteControlClient[0] Failed to get remote control server port from the IDE for endpoint 169.254.22.55. fail: Uno.UI.RemoteControl.RemoteControlClient[0] Failed to get remote control server port from the IDE for endpoint [fe80::64a3:aef0:8f4a:6298]. fail: Uno.UI.RemoteControl.RemoteControlClient[0] Failed to get remote control server port from the IDE for endpoint 169.254.98.152. fail: Uno.UI.RemoteControl.RemoteControlClient[0] Failed to get remote control server port from the IDE for endpoint [fe80::6417:b33:af8:484d]. fail: Uno.UI.RemoteControl.RemoteControlClient[0] Failed to get remote control server port from the IDE for endpoint 10.0.0.143. fail: Uno.UI.RemoteControl.RemoteControlClient[0] Failed to get any remote control server endpoint from the IDE. -warn: Uno.UI.ResourceResolver[0] - Couldn't statically resolve resource DefaultRepeatButtonStyle warn: Windows.UI.Xaml.UIElement[0] The BorderThicknessProperty dependency property does not exist on Uno.UI.Xaml.Core.RootVisual fail: Windows.UI.Composition.CompositionObject[0] The member void CompositionObject.Dispose() is not implemented in Uno. ```
jeromelaban commented 2 years ago

Try setting the GtkHost RenderMode to Software for now. There may be another issue which is OpenGL related.

jon-peel commented 2 years ago

I have just decided to give Uno a try, but I am getting this problem, on Manjaro if that makes a difference.

I get a series of fail: Uno.UI.RemoteControl.RemoteControlClient[0] followed by free(): invalid pointer Process finished with exit code 134.

A run dotnet new and create an unoapp, then I cd into the Ski.GTK directory, and try dotnet run. I tried setting software rendering as suggested above, but it made no difference.

dotnet version is 6.0.108 I am not sure if there is any other info that could be useful.

jon-peel commented 2 years ago

Only output is

fail: Uno.UI.RemoteControl.RemoteControlClient[0]
      Failed to get remote control server port from the IDE for endpoint 192.168.0.115.
fail: Uno.UI.RemoteControl.RemoteControlClient[0]
      Failed to get remote control server port from the IDE for endpoint [fe80::1714:8bf4:6b42:6af7].
fail: Uno.UI.RemoteControl.RemoteControlClient[0]
      Failed to get remote control server port from the IDE for endpoint 172.21.0.1.
fail: Uno.UI.RemoteControl.RemoteControlClient[0]
      Failed to get remote control server port from the IDE for endpoint [fe80::42:9fff:fec8:f738].
fail: Uno.UI.RemoteControl.RemoteControlClient[0]
      Failed to get remote control server port from the IDE for endpoint 172.17.0.1.
fail: Uno.UI.RemoteControl.RemoteControlClient[0]
      Failed to get remote control server port from the IDE for endpoint [fe80::cc89:d2ff:feaa:9fbe].
fail: Uno.UI.RemoteControl.RemoteControlClient[0]
      Failed to get any remote control server endpoint from the IDE.
jeromelaban commented 2 years ago

This is pretty close to this discussion: https://github.com/unoplatform/uno/discussions/9354. We do not yet know what the issue is on these distributions.

GitHub
Arch Linux Segmentation Fault · Discussion #9354 · unoplatform/uno
After being asked on the Discord to post it here, i will also post the message here. (Message History from the Discord can be found here: https://discord.com/channels/372137812037730304/55041615117...
jeromelaban commented 2 years ago

Could you also try the workaround I just posted here?