[ImageExport] Synchronous invokation deadlock still occures
まだ誰も着手していません。
評価
- 難易度
- 4/5
- 見積もり時間
- 3〜5日
- 初心者へのやさしさ
- 35/100
- issue の種類
- バグ
- 明瞭さ
- おおむね明確
- 活発さ
- 停滞
- 技術スタック
- fsharp
調査の方向性
まず ImageExport の同期パス、特に page.CloseAsync() と AsyncHelper.taskSyncUnit から始め、動作している ToBase64PNGStringAsync() パスと比較します。レポートに示されている Avalonia のボタンハンドラーを使って問題を再現します。chart.ToBase64PNGString() が終了し、次の例外に到達すれば完了です。
索引モデルが issue の本文から書いたものです。
説明
Problem
This is the problem that we intended to fix with PR #321. It is fixed partially.
After we migrated to tasks instead of F#'s async, plus we changed
- page.CloseAsync() |> Async.AwaitTask |> Async.RunSynchronously
+ page.CloseAsync() |> AsyncHelper.taskSyncUnit
The async version works, as in, completes. However, the synchronous version still does not terminate
Reproduction
I'm going to present the repro with AvaloniaUI, but it should be as well reproduced in WinForms or WPF if you're on Windows.
1. Install templates & create project:
dotnet new --install Avalonia.Templates
dotnet new avalonia.mvvm -o TestAsync -n TestAsync
cd TestAsync/
2. Install the package
Add source & install the latest
dotnet new nugetconfig
dotnet nuget add source https://www.myget.org/F/plotly-net-nightly/api/v3/index.json
dotnet add package Plotly.NET.ImageExport --prerelease
3. Adding a component
Go to MainWindow.axaml and replace some default thingy with a button
- <TextBlock Text="{Binding Greeting}" HorizontalAlignment="Center" VerticalAlignment="Center"/>
+ <Button Click="Button_OnClick" />
4. Adding event
Go to MainWindow.axaml.cs and add this method:
private async void Button_OnClick(object? sender, RoutedEventArgs e)
{
var layout = new Layout();
var trace = new Trace("bar");
var fig = GenericChart.Figure.create(ListModule.OfSeq(new[] { trace }), layout);
var chart = GenericChart.fromFigure(fig);
// This works now
await chart.ToBase64PNGStringAsync();
// This never terminates
chart.ToBase64PNGString();
// If we get to this line, it terminated
throw new Exception();
}
5. Run
dotnet run
Now, once it started, click the button. Successful completion is when the exception occurs.
- 主要言語
- F#
- スター
- 860
- フォーク
- 99
- 平均マージ
- 22分
- マージ済み PR(30日)
- 1
コントリビューションガイド
このリポジトリのコントリビューションガイドは索引されていません
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
plotly/Plotly.NET のほかの issue
-
難易度 1/5 1時間未満 初心者へのやさしさ 78/100
plotly/Plotly.NET#498 ·
-
難易度 3/5 1〜2日 初心者へのやさしさ 42/100
plotly/Plotly.NET#495 · コメント 3 件 ·
-
難易度 2/5 1〜3時間 初心者へのやさしさ 45/100
plotly/Plotly.NET#494 · コメント 1 件 ·
-
難易度 4/5 3〜5日 初心者へのやさしさ 25/100
plotly/Plotly.NET#492 ·
-
難易度 4/5 3〜5日 初心者へのやさしさ 38/100
plotly/Plotly.NET#485 · コメント 1 件 ·
plotly/Plotly.NET の issue をすべて見る
似ている issue
-
[Bounty proposal] fix(web): memory insights count an evening memory on the next day ($25 proposed) オープン
難易度 2/5 1〜3時間 初心者へのやさしさ 84/100
BasedHardware/omi#15320 ·
-
難易度 2/5 1〜3時間 初心者へのやさしさ 74/100
bancolombia/sentinel#23 ·
-
bug
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
AOSSIE-Org/OrgExplorer#245 ·
-
tech-debt
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
-
難易度 2/5 1〜3時間 初心者へのやさしさ 72/100
gordonwatts/test-wsl2-llm#151 ·