Skip to content

[Inflight/Candidate] [Windows] Fix ScrollView handler leak in device test - #39060

Merged
kubaflo merged 6 commits into
dotnet:inflight/candidatefrom
Vignesh-SF3580:fix-ScrollViewLeak
Oct 7, 2026
Merged

kubaflo merged 6 commits into
dotnet:inflight/candidatefrom
Vignesh-SF3580:fix-ScrollViewLeak

Conversation

@Vignesh-SF3580

@Vignesh-SF3580 Vignesh-SF3580 commented Oct 1, 2026 •

Copy link
Copy Markdown
Contributor

Note

Are you waiting for the changes in this PR to be merged?
It would be very helpful if you could test the resulting artifacts from this PR and let us know in a comment if this change resolves your issue. Thank you!

Issue Details

The ScrollView Does Not Leak test fails in CI after PR #37428, while the test passes locally.

Root Cause

The ScrollViewer has direct event subscriptions to ScrollViewHandler for Loading, Loaded, Unloaded, and ViewChanged. These event subscriptions can keep the ScrollViewHandler and its associated MAUI ScrollView alive during teardown, causing the ScrollView Does Not Leak test to fail in CI. The queued dispatcher callback from PR #37428 can also retain the ScrollViewHandler and native ScrollViewer while it is pending.

Description of Change

Updated the native ScrollViewer event subscriptions to use a ScrollViewEventProxy that holds a weak reference to the ScrollViewHandler for Loading, Loaded, Unloaded, and ViewChanged. This prevents the native event subscriptions from strongly retaining the handler and the associated MAUI ScrollView during teardown. The queued dispatcher callback also uses weak references to avoid retaining the ScrollViewHandler and native ScrollViewer while the callback is pending. These changes preserve the existing event and focus-restoration behavior while preventing the ScrollView from being retained during teardown.

@dotnet-policy-service dotnet-policy-service Bot added the partner/syncfusion Issues / PR's with Syncfusion collaboration label Oct 1, 2026
@azure-pipelines

Copy link
Copy Markdown
Azure Pipelines:
Successfully started running 1 pipeline(s).
There may be pipelines that require an authorized user to comment /azp run to run.

@Vignesh-SF3580 Vignesh-SF3580 added the community ✨ Community Contribution label Oct 1, 2026
@vishnumenon2684

Copy link
Copy Markdown
Contributor

/azp run maui-pr-uitests , maui-pr-devicetests

@azure-pipelines

Copy link
Copy Markdown
Azure Pipelines:
Successfully started running 2 pipeline(s).

@kubaflo

This comment has been minimized.

@github-actions github-actions Bot added the s/agent-review-in-progress AI review is currently running for this PR label Oct 1, 2026
@github-actions

github-actions Bot commented Oct 1, 2026

Copy link
Copy Markdown
Contributor

Note

🔍 /review started

AzDO build 15535157 is running for windows.

The s/agent-review-in-progress label stays on this PR while the run is active. The final recommendation and outcome labels are posted only after Gate, expert review, and Deep UI tests finish.

MauiBot

This comment was marked as outdated.

@MauiBot MauiBot added s/agent-changes-requested AI agent recommends changes - found a better alternative or issues s/agent-fix-pr-picked AI could not beat the PR fix - PR is the best among all candidates s/agent-reviewed PR was reviewed by AI agent workflow (full 4-phase review) and removed s/agent-review-in-progress AI review is currently running for this PR labels Oct 1, 2026
@kubaflo

This comment has been minimized.

@github-actions

github-actions Bot commented Oct 1, 2026

Copy link
Copy Markdown
Contributor

The /review tests workflow failed before publishing a report. View the workflow run.

This is an automation failure, not a verdict on the PR tests. Maintainers can retry /review tests after the workflow failure is resolved.

@kubaflo

This comment has been minimized.

@kubaflo

kubaflo commented Oct 6, 2026

Copy link
Copy Markdown
Contributor

/azp run

@github-actions github-actions Bot added the s/agent-review-in-progress AI review is currently running for this PR label Oct 6, 2026
@azure-pipelines

Copy link
Copy Markdown
Azure Pipelines:
Successfully started running 3 pipeline(s).

dependabot Bot and others added 3 commits October 7, 2026 11:20
Updated
[Microsoft.AspNetCore.Authentication.Facebook](https://github.com/dotnet/dotnet)
from 10.0.0 to 10.0.10.

<details>
<summary>Release notes</summary>

_Sourced from [Microsoft.AspNetCore.Authentication.Facebook's
releases](https://github.com/dotnet/dotnet/releases)._

No release notes found for this version range.

Commits viewable in [compare
view](https://github.com/dotnet/dotnet/commits).
</details>

Updated
[Microsoft.AspNetCore.Authentication.Google](https://github.com/dotnet/dotnet)
from 10.0.0 to 10.0.10.

<details>
<summary>Release notes</summary>

_Sourced from [Microsoft.AspNetCore.Authentication.Google's
releases](https://github.com/dotnet/dotnet/releases)._

No release notes found for this version range.

Commits viewable in [compare
view](https://github.com/dotnet/dotnet/commits).
</details>

Updated
[Microsoft.AspNetCore.Authentication.MicrosoftAccount](https://github.com/dotnet/dotnet)
from 10.0.0 to 10.0.10.

<details>
<summary>Release notes</summary>

_Sourced from [Microsoft.AspNetCore.Authentication.MicrosoftAccount's
releases](https://github.com/dotnet/dotnet/releases)._

No release notes found for this version range.

Commits viewable in [compare
view](https://github.com/dotnet/dotnet/commits).
</details>

Dependabot will resolve any conflicts with this PR as long as you don't
alter it yourself. You can also trigger a rebase manually by commenting
`@dependabot rebase`.

[//]: # (dependabot-automerge-start)
[//]: # (dependabot-automerge-end)

---

<details>
<summary>Dependabot commands and options</summary>
<br />

You can trigger Dependabot actions by commenting on this PR:
- `@dependabot rebase` will rebase this PR
- `@dependabot recreate` will recreate this PR, overwriting any edits
that have been made to it
- `@dependabot show <dependency name> ignore conditions` will show all
of the ignore conditions of the specified dependency
- `@dependabot ignore <dependency name> major version` will close this
group update PR and stop Dependabot creating any more for the specific
dependency's major version (unless you unignore this specific
dependency's major version or upgrade to it yourself)
- `@dependabot ignore <dependency name> minor version` will close this
group update PR and stop Dependabot creating any more for the specific
dependency's minor version (unless you unignore this specific
dependency's minor version or upgrade to it yourself)
- `@dependabot ignore <dependency name>` will close this group update PR
and stop Dependabot creating any more for the specific dependency
(unless you unignore this specific dependency or upgrade to it yourself)
- `@dependabot unignore <dependency name>` will remove all of the ignore
conditions of the specified dependency
- `@dependabot unignore <dependency name> <ignore condition>` will
remove the ignore condition of the specified dependency and ignore
conditions


</details>

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
@kubaflo

This comment has been minimized.

@kubaflo

kubaflo commented Oct 7, 2026

Copy link
Copy Markdown
Contributor

/azp run

@github-actions github-actions Bot added the s/agent-review-in-progress AI review is currently running for this PR label Oct 7, 2026
@github-actions

github-actions Bot commented Oct 7, 2026

Copy link
Copy Markdown
Contributor

Note

🔍 /review started

AzDO build 15594990 is running for windows.

The s/agent-review-in-progress label stays on this PR while the run is active. The final recommendation and outcome labels are posted only after Gate, expert review, and Deep UI tests finish.

@azure-pipelines

Copy link
Copy Markdown
Azure Pipelines:
Successfully started running 3 pipeline(s).

@MauiBot

This comment has been minimized.

@MauiBot MauiBot removed the s/agent-review-in-progress AI review is currently running for this PR label Oct 7, 2026
@kubaflo

This comment has been minimized.

@Vignesh-SF3580 Vignesh-SF3580 changed the title [WIP] [Inflight/Candidate] [Windows] Fix ScrollView handler leak in device test [Inflight/Candidate] [Windows] Fix ScrollView handler leak in device test Oct 7, 2026
@sheiksyedm
sheiksyedm marked this pull request as ready for review October 7, 2026 13:00
@kubaflo

This comment has been minimized.

@kubaflo

kubaflo commented Oct 7, 2026

Copy link
Copy Markdown
Contributor

/azp run

@github-actions github-actions Bot added the s/agent-review-in-progress AI review is currently running for this PR label Oct 7, 2026
@azure-pipelines

Copy link
Copy Markdown
Azure Pipelines:
Successfully started running 3 pipeline(s).

@github-actions

github-actions Bot commented Oct 7, 2026

Copy link
Copy Markdown
Contributor

Note

🔍 /review started

AzDO build 15597807 is running for windows.

The s/agent-review-in-progress label stays on this PR while the run is active. The final recommendation and outcome labels are posted only after Gate, expert review, and Deep UI tests finish.

@MauiBot

MauiBot commented Oct 7, 2026

Copy link
Copy Markdown
Collaborator

AI Review Summary

@Vignesh-SF3580 — new AI review results are available based on commit 3462ee4.

Gate No Tests Confidence Unknown Platform Windows


🗂️ Review Sessions — click to expand
🚦 Gate — Test Before & After Fix

Gate Result: ⚠️ SKIPPED

No tests were detected in this PR.

Recommendation: Add tests to verify the fix using the write-tests-agent.


📋 Pre-Flight — Context & Validation

⚠️ Pre-Flight did not produce output on this run.

The Copilot expert-review task ended before this phase was persisted, usually because the review-stage time budget expired or the CI agent encountered a transient authentication/runtime problem. Earlier completed sections remain valid, but this review is incomplete without this phase.

Next step: re-comment /review to retry on a fresh agent. If this repeats across runs, a maintainer should inspect the reviewer token and Task 3 logs.


🔬 Code Review — Deep Analysis

⚠️ Code Review did not produce output on this run.

The Copilot expert-review task ended before this phase was persisted, usually because the review-stage time budget expired or the CI agent encountered a transient authentication/runtime problem. Earlier completed sections remain valid, but this review is incomplete without this phase.

Next step: re-comment /review to retry on a fresh agent. If this repeats across runs, a maintainer should inspect the reviewer token and Task 3 logs.


🛠️ Try-Fix — Analysis & Comparison

⚠️ Try-Fix did not produce output on this run.

The Copilot expert-review task ended before this phase was persisted, usually because the review-stage time budget expired or the CI agent encountered a transient authentication/runtime problem. Earlier completed sections remain valid, but this review is incomplete without this phase.

Next step: re-comment /review to retry on a fresh agent. If this repeats across runs, a maintainer should inspect the reviewer token and Task 3 logs.


🏁 Report — Final Recommendation

⚠️ Report / Final Recommendation did not produce output on this run.

The Copilot expert-review task ended before this phase was persisted, usually because the review-stage time budget expired or the CI agent encountered a transient authentication/runtime problem. Earlier completed sections remain valid, but this review is incomplete without this phase.

Next step: re-comment /review to retry on a fresh agent. If this repeats across runs, a maintainer should inspect the reviewer token and Task 3 logs.


📱 UI Tests — ViewBaseTests

Detected UI test categories: ViewBaseTests

[!WARNING]
No UI test results were produced for the detected categories. The trusted gate was
skipped before build/test verification, so it does not prove that the PR build is healthy.
The deep UI stage also returned no results; inspect the independent CI checks and retry the
review if those categories still need coverage.


🧭 Next Steps — review latest findings

No alternative fix was selected for this run. Review the session findings and CI results before merging.

@MauiBot MauiBot removed the s/agent-review-in-progress AI review is currently running for this PR label Oct 7, 2026
@kubaflo
kubaflo merged commit 0e76f0d into dotnet:inflight/candidate Oct 7, 2026
161 of 203 checks passed
@github-actions github-actions Bot added this to the .NET 10 SR12 milestone Oct 7, 2026
kubaflo pushed a commit that referenced this pull request Oct 13, 2026
…test (#39060)

<!-- Please let the below note in for people that find this PR -->
> [!NOTE]
> Are you waiting for the changes in this PR to be merged?
> It would be very helpful if you could [test the resulting
artifacts](https://github.com/dotnet/maui/wiki/Testing-PR-Builds) from
this PR and let us know in a comment if this change resolves your issue.
Thank you!

### Issue Details
The ScrollView Does Not Leak test fails in CI after PR
[#37428](#37428), while the test
passes locally.
 
### Root Cause
The ScrollViewer has direct event subscriptions to ScrollViewHandler for
Loading, Loaded, Unloaded, and ViewChanged. These event subscriptions
can keep the ScrollViewHandler and its associated MAUI ScrollView alive
during teardown, causing the ScrollView Does Not Leak test to fail in
CI. The queued dispatcher callback from PR
[#37428](#37428) can also retain the
ScrollViewHandler and native ScrollViewer while it is pending.

### Description of Change
Updated the native ScrollViewer event subscriptions to use a
ScrollViewEventProxy that holds a weak reference to the
ScrollViewHandler for Loading, Loaded, Unloaded, and ViewChanged. This
prevents the native event subscriptions from strongly retaining the
handler and the associated MAUI ScrollView during teardown. The queued
dispatcher callback also uses weak references to avoid retaining the
ScrollViewHandler and native ScrollViewer while the callback is pending.
These changes preserve the existing event and focus-restoration behavior
while preventing the ScrollView from being retained during teardown.

---------

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Dhivya-SF4094 <127717131+Dhivya-SF4094@users.noreply.github.com>
kubaflo pushed a commit that referenced this pull request Oct 14, 2026
…test (#39060)

<!-- Please let the below note in for people that find this PR -->
> [!NOTE]
> Are you waiting for the changes in this PR to be merged?
> It would be very helpful if you could [test the resulting
artifacts](https://github.com/dotnet/maui/wiki/Testing-PR-Builds) from
this PR and let us know in a comment if this change resolves your issue.
Thank you!

### Issue Details
The ScrollView Does Not Leak test fails in CI after PR
[#37428](#37428), while the test
passes locally.
 
### Root Cause
The ScrollViewer has direct event subscriptions to ScrollViewHandler for
Loading, Loaded, Unloaded, and ViewChanged. These event subscriptions
can keep the ScrollViewHandler and its associated MAUI ScrollView alive
during teardown, causing the ScrollView Does Not Leak test to fail in
CI. The queued dispatcher callback from PR
[#37428](#37428) can also retain the
ScrollViewHandler and native ScrollViewer while it is pending.

### Description of Change
Updated the native ScrollViewer event subscriptions to use a
ScrollViewEventProxy that holds a weak reference to the
ScrollViewHandler for Loading, Loaded, Unloaded, and ViewChanged. This
prevents the native event subscriptions from strongly retaining the
handler and the associated MAUI ScrollView during teardown. The queued
dispatcher callback also uses weak references to avoid retaining the
ScrollViewHandler and native ScrollViewer while the callback is pending.
These changes preserve the existing event and focus-restoration behavior
while preventing the ScrollView from being retained during teardown.

---------

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Dhivya-SF4094 <127717131+Dhivya-SF4094@users.noreply.github.com>
kubaflo pushed a commit that referenced this pull request Oct 18, 2026
…test (#39060)

<!-- Please let the below note in for people that find this PR -->
> [!NOTE]
> Are you waiting for the changes in this PR to be merged?
> It would be very helpful if you could [test the resulting
artifacts](https://github.com/dotnet/maui/wiki/Testing-PR-Builds) from
this PR and let us know in a comment if this change resolves your issue.
Thank you!

### Issue Details
The ScrollView Does Not Leak test fails in CI after PR
[#37428](#37428), while the test
passes locally.
 
### Root Cause
The ScrollViewer has direct event subscriptions to ScrollViewHandler for
Loading, Loaded, Unloaded, and ViewChanged. These event subscriptions
can keep the ScrollViewHandler and its associated MAUI ScrollView alive
during teardown, causing the ScrollView Does Not Leak test to fail in
CI. The queued dispatcher callback from PR
[#37428](#37428) can also retain the
ScrollViewHandler and native ScrollViewer while it is pending.

### Description of Change
Updated the native ScrollViewer event subscriptions to use a
ScrollViewEventProxy that holds a weak reference to the
ScrollViewHandler for Loading, Loaded, Unloaded, and ViewChanged. This
prevents the native event subscriptions from strongly retaining the
handler and the associated MAUI ScrollView during teardown. The queued
dispatcher callback also uses weak references to avoid retaining the
ScrollViewHandler and native ScrollViewer while the callback is pending.
These changes preserve the existing event and focus-restoration behavior
while preventing the ScrollView from being retained during teardown.

---------

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Dhivya-SF4094 <127717131+Dhivya-SF4094@users.noreply.github.com>
@github-actions

github-actions Bot commented Nov 6, 2026

Copy link
Copy Markdown
Contributor

The /review tests workflow failed before publishing a report. View the workflow run.

This is an automation failure, not a verdict on the PR tests. Maintainers can retry /review tests after the workflow failure is resolved.

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

Labels

community ✨ Community Contribution partner/syncfusion Issues / PR's with Syncfusion collaboration s/agent-review-incomplete AI review did not complete all expected phases s/agent-reviewed PR was reviewed by AI agent workflow (full 4-phase review)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants