-
-
Notifications
You must be signed in to change notification settings - Fork 2.3k
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
OpenFileDialog undefined behavior on linux-distros #4325
Comments
Segfaults are most likely caused by leaked libfreetype symbols from libSkiaSharp. It used to work until distros have rolled a new libfreetype version, so everything began segfaulting. Consider using managed file dialogs or switching to 0.10-preview. Also, SFX-archive publishing isn't a supported by our team, so if the problem doesn't occur without |
You can also try to switch to a newer build of SkiaSharp linux library by adding <ItemGroup>
<PackageReference Include="SkiaSharp.NativeAssets.Linux" Version="1.68.3" />
<PackageReference Include="Avalonia.Skia.Linux.Natives" Version="1.68.0.2" ExcludeAssets="all" />
<PackageReference Include="SkiaSharp" Version="1.68.3" />
</ItemGroup> to your project (exactly those lines without changes) |
Yes, changing SkiaSharp version helped, the application works as on ubuntu, tanks. But the problem with null aray is still there (Windows doesn't have that problem, instead of null array it is empty) When 0.10-preview will be availble in nuget? |
Yes, that inconsistency needs to be fixed.
|
OpenFileDialog behavior differs from distro to distro. Tested on 4 different distros on different run configs.
Computer configuration:
.net core version: 3.1
App publishing options:
Publish command for Win->Lin and Lin->Lin:
dotnet publish -r linux-x64 -c Release /p:PublishSingleFile=true
App used for testing: link
Testing paths:
Expected behavior – OpenFileDialog.ShowAsync() returning array with one item – path to file.
Expected behavior - OpenFileDialog.ShowAsync() returning array without items (but array is not nullable)
Expected program behavior: On button click, shows up a file select dialog. If file is selected the expected behavior is: Shows up a messagebox with file path If canceled: Shows up an empty messagebox.
If ShowAsync() path returned is null it transforms to string containing null If ShowAsync() returned null array messagebox dialog shows up with exception
Below are testing results
Kernel dumps: googledrive
Doesn't load because of that: link
Ubuntu 20.04
Kernel version: 5.4.0-40-generic
Display Manager: Gnome 3.36.1
Display Server: X11
Fedora 32 Workstation Edition
Kernel version: 5.6.6-300.fc32.x86_64
Display Manager: Gnome 3.36.1
Display Server: Wayland
OpenSUSE Thumbleweed 20200716
Kernel version: 5.7.7-1-default
Display Manager: KDE
Display Server: X11
Manjaro 20.0.3 Lysia
Kernel version: 5.7.0, 5.6.16, 5.4.44
Display Manager: KDE
Display Server: X11
Currently on most of the distros OpenFileDialog leads to segfault
The text was updated successfully, but these errors were encountered: