Skip to content

Bump to xamarin/Java.Interop/d16-8@79d95334 #5139

New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Merged
merged 2 commits into from
Sep 22, 2020

Conversation

jonpryor
Copy link
Contributor

Fixes: dotnet/java-interop#682
Fixes: dotnet/java-interop#717

Context: dotnet/java-interop#719

Changes: dotnet/java-interop@a807961...79d9533

Fixes: dotnet/java-interop#682
Fixes: dotnet/java-interop#717

Context: dotnet/java-interop#719

Changes: dotnet/java-interop@a807961...79d9533

  * dotnet/java-interop@79d95334: [generator] Use GC.KeepAlive for reference type method parameters. (dotnet#722)
  * dotnet/java-interop@1a19ec04: [Xamarin.Android.Tools.Bytecode] Hide Kotlin nested types inside (dotnet#723)
  * dotnet/java-interop@24a9abdb: [Xamarin.Android.Tools.ApiXmlAdjuster] Find app.android.IntentService (dotnet#718)
Copy link
Contributor

@brendanzagaeski brendanzagaeski left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Draft release notes

In the final collated release notes, mostly just to match up with the other existing notes for d16-8, I'll plan to adjust them slightly to be in the past tense and put the error messages up front. (I think for d16-9, the release notes format can change to use present tense for all the notes so there will be one less formatting rule to think about. Another little adjustment that could work nicely for d16-9 might be switch to a style where the full list of fixed issues will be represented by a GitHub query link instead of a full listing directly in the notes. That will allow more flexibility to pick and choose only certain fixes to highlight in the release notes.)

On the topic of picking and choosing issues to highlight, I'll actually plan to add a highlight section here to help bindings projects authors know that they are encouraged to update their libraries as soon as possible to get the GC.KeepAlive() fix.

In any case, feel free to comment back if anything looks bad about these last little adjustments for these notes in the context of d16-8. The note might need one last tweak when the final notes are being assembled to mention the Xamarin bindings NuGet packages, depending on whether the fix will available in those on the d16-8 release timeline.

### 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.

@jonpryor jonpryor merged commit 5e36e6e into dotnet:d16-8 Sep 22, 2020
@github-actions github-actions bot locked and limited conversation to collaborators Jan 27, 2024
# for free to subscribe to this conversation on GitHub. Already have an account? #.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants