Skip to content

CustomWidgetTests.InflateCustomView_ShouldNotLeakGlobalRefs test failing in CI #11201

@simonrozsival

Description

@simonrozsival

Summary

The test Mono.Android.NET_Tests, Xamarin.Android.RuntimeTests.CustomWidgetTests.InflateCustomView_ShouldNotLeakGlobalRefs is failing across multiple CI configurations.

This test was added as a regression test for a JNI global reference leak when inflating custom .NET views via LayoutInflater.Inflate. Multiple fixes have been merged across dotnet/android and dotnet/java-interop, but the test continues to fail.

Background

The global ref leak was originally reported in:

Fix attempts (all merged)

dotnet/android:

dotnet/java-interop:

Submodule bumps bringing java-interop fixes into dotnet/android:

Closed (superseded) PRs

Expected behavior

After all the above fixes, the global ref count should not grow when repeatedly inflating and GC-collecting custom views.

Actual behavior

The test still fails in CI, indicating that the global ref leak is not fully resolved or that there is a separate source of global ref growth.

Metadata

Metadata

Assignees

No one assigned

    Labels

    needs-triageIssues that need to be assigned.

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions