Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
40 changes: 40 additions & 0 deletions Documentation/release-notes/5139.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
### Deprecations, removals, and default configuration changes

#### Corrected garbage collection behavior for Android bindings and bindings projects

In previous Xamarin.Android versions, errors similar to _JNI DETECTED ERROR IN
APPLICATION: use of deleted global reference_ and _JNI ERROR (app bug): attempt
to use stale Global 0x2a2a (should be 0x2a26)_ could cause apps to abort under
certain specific timing conditions where a managed garbage collection started
just after a `Java.Lang.Object` subclass method call.

The Xamarin.Android bindings project build process now includes a fix for this
issue.

The set of Android API bindings that are included directly as part of the
Xamarin.Android SDK have been updated accordingly to include the fix.

> [!NOTE]
> This fix will not solve the problem for other bindings libraries until the
> libraries are rebuilt using this new Xamarin.Android version. Bindings
> library authors are therefore encouraged to build and publish new versions of
> their libraries using this new Xamarin.Android version at their earliest
> convenience.

### Issues fixed

#### Bindings projects

- [Java.Interop GitHub 682](https://github.com/xamarin/java.interop/issues/682):
Ignorable _warning BG8604: top ancestor ... not found for nested type ..._
appeared for `public` types nested under non-`public` types in Kotlin
libraries. Those nested types are now skipped as expected.

- [Java.Interop GitHub 717](https://github.com/xamarin/java.interop/issues/717):
_Error while processing type ... Type 'android.app.IntentService' was not
found._ prevented building bindings for libraries with classes that inherited
from `android.app.IntentService`.

- [Java.Interop GitHub 719](https://github.com/xamarin/java.interop/issues/719):
Bindings did not yet use `GC.KeepAlive()` calls to ensure that method
arguments would never be garbage collected before they were passed to Java.
2 changes: 1 addition & 1 deletion external/Java.Interop