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

Ubuntu 22 drawing error #15452

Open
chenjing1294 opened this issue Apr 20, 2024 · 2 comments
Open

Ubuntu 22 drawing error #15452

chenjing1294 opened this issue Apr 20, 2024 · 2 comments

Comments

@chenjing1294
Copy link

Describe the bug

livechart_on_linux.mp4

beto-rodriguez/LiveCharts2#1491

This is most likely an Avalonia issue.
On Avalonia, Live Charts uses the ICustomDrawOperation, this interface is provided by Avalonia, when the draw operation is called, LvieCharts uses the SkiaSharp API to build the plot, this interface handles all the frames required to build the animations in the chart, that blinking IMO, is most likely to be an issue on how Avalonia handles things on Ubuntu, since we (Live Charts) do not have any OS specific code (It is also probable that the issue is on Skia/SkiaSharp).

To Reproduce

Ubuntu 22
AvaloniaUI 11.0.10
LiveChartsCore.SkiaSharpView.Avalonia 2.0.0-rc2

<ResourceDictionary xmlns="https://github.com/avaloniaui"
                    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
                    xmlns:p="clr-namespace:RedisAssistant.Properties"
                    xmlns:lvc="using:LiveChartsCore.SkiaSharpView.Avalonia"
                    xmlns:f="clr-namespace:RedisAssistant.ViewModels.Function">
  <DataTemplate x:Key="DashboardDataTemplate" DataType="f:DashboardPageViewModel">
    <Grid >
            <lvc:CartesianChart 
                          BorderThickness="0 0 1 1" BorderBrush="LightGray"
                          Title="{Binding InputOutputKbpsTitle, Mode=OneWay}"
                          SyncContext="{Binding InputKbpsSync}"
                          Series="{Binding InputKbpsSeries}"
                          XAxes="{Binding InputKbpsXAxes}"
                          YAxes="{Binding YAxes}">
      </lvc:CartesianChart>
    </Grid>
  </DataTemplate>
</ResourceDictionary>

Expected behavior

No response

Avalonia version

11.0.10

OS

Linux

Additional context

No response

@kekekeks
Copy link
Member

kekekeks commented Apr 21, 2024

This looks like some invalid calls to SkiaSharp causing issues with GPU driver. We've had something similar when accidentally passing rogue NaN or +-Inf values to Skia.

It's really hard to debug since such issues are usually driver specific.

@beto-rodriguez
Copy link

@chenjing1294 maybe you can try to add an empty chart first (no series no tooltips), just to try to identify if it is an issue with a LiveCharts component.

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

No branches or pull requests

4 participants