(Marquee) When Behavior="Looping" and Direction is set to vertical, it causes “Layout cycle detected. Layout could not complete.”
まだ誰も着手していません。
評価
調査の方向性
提供された Marquee マークアップで Behavior="Looping" および Direction="Down" を使用してクラッシュを再現します。components/Marquee/src/Marquee.xaml、Marquee.cs の 69、211、241 行目、および Marquee.Events.cs の 36、62 行目を読み、SizeChanged のサブスクリプションとセグメントの可視性の変更に注目してください。垂直方向の looping によってレイアウトサイクルやクラッシュが発生しなくなり、コンテナーが繰り返しサブスクライブされなくなれば完了です。
索引モデルが issue の本文から書いたものです。
説明
Describe the bug
I noticed that the Marquee control crashes. After debugging, I believe the SizeChanged event causes the visibility of segment2 to change. Since the control’s default vertical alignment is set to Top, this triggers another SizeChanged event, resulting in an infinite loop.
Setting VerticalAlignment="Stretch" allows it to work correctly, but this is not a real solution.
In addition, I noticed that _marqueeContainer is repeatedly subscribing to the SizeChanged event.
https://github.com/CommunityToolkit/Labs-Windows/blob/acda1c3df1b71dbf77bc80a0544eae7955398d49/components/Marquee/src/Marquee.cs#L69
Steps to reproduce
<labs:Marquee
Behavior="Looping"
Content="Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua."
Direction="Down"
FontSize="18"
RepeatBehavior="Forever"
Speed="200" />
Just setting Behavior="Looping" is enough to trigger the crash.
Expected behavior
This shouldn't cause the program to crash.
Screenshots
Code Platform
- UWP
- WinAppSDK / WinUI 3
- Web Assembly (WASM)
- Android
- iOS
- MacOS
- Linux / GTK
Windows Build Number
- Windows 10 1809 (Build 17763)
- Windows 10 1903 (Build 18362)
- Windows 10 1909 (Build 18363)
- Windows 10 2004 (Build 19041)
- Windows 10 20H2 (Build 19042)
- Windows 10 21H1 (Build 19043)
- Windows 11 21H2 (Build 22000)
- Other (specify)
Other Windows Build number
No response
App minimum and target SDK version
- Windows 10, version 1809 (Build 17763)
- Windows 10, version 1903 (Build 18362)
- Windows 10, version 1909 (Build 18363)
- Windows 10, version 2004 (Build 19041)
- Other (specify)
Other SDK version
No response
Visual Studio Version
No response
Visual Studio Build Number
No response
Device form factor
No response
Additional context
No response
- 主要言語
- C#
- スター
- 485
- フォーク
- 89
- 平均マージ
- 19時間 46分
- マージ済み PR(30日)
- 2
環境構築
このプロジェクトの開発コンテナを、あなたの GitHub アカウントでブラウザ上に起動します。
- Dockerfile・Docker Compose ファイルなし
- プルリクエストのテンプレートなし
- コントリビューションガイドを読む
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
CommunityToolkit/Labs-Windows のほかの issue
-
bug :bug:
難易度 1/5 1〜3時間 初心者へのやさしさ 80/100
CommunityToolkit/Labs-Windows#815 ·
-
bug :bug:
難易度 4/5 3〜5日 初心者へのやさしさ 38/100
CommunityToolkit/Labs-Windows#816 ·
-
bug :bug:
難易度 3/5 1〜2日 初心者へのやさしさ 55/100
CommunityToolkit/Labs-Windows#814 ·
-
experiment :test_tube:
難易度 4/5 3〜5日 初心者へのやさしさ 48/100
CommunityToolkit/Labs-Windows#812 ·
-
ux :paintbrush:
難易度 3/5 1〜2日 初心者へのやさしさ 52/100
CommunityToolkit/Labs-Windows#808 · コメント 1 件 ·
CommunityToolkit/Labs-Windows の issue をすべて見る
似ている issue
-
VB -> C#
難易度 2/5 1〜3時間 初心者へのやさしさ 72/100
icsharpcode/CodeConverter#1301 ·
メンテナーはふだん 3 日以内に返信
-
PettingZoo wrappers send only the first action component to every action dimension対応中かも @RaphaelFakhri が今日担当しました。 オープン
難易度 2/5 1〜3時間 初心者へのやさしさ 73/100
Unity-Technologies/ml-agents#6341 ·
メンテナーはふだん 1 日以内に返信
-
Area: World-Readiness
難易度 1/5 1時間未満 初心者へのやさしさ 90/100
microsoft/calculator#2522 ·
-
needs-triage
難易度 2/5 1〜3時間 初心者へのやさしさ 74/100
Sonarr/Sonarr#9274 · コメント 1 件 ·
メンテナーはふだん 2 日以内に返信
-
enhancement
難易度 2/5 1〜3時間 初心者へのやさしさ 64/100