Skip to content

Conversation

@jonpryor
Copy link
Contributor

When running make run-ptests, the output log is spammed:

WARNING in native method: JNI call made without checking exceptions when required to from CallStaticVoidMethod

Over a million times 1.

Call JNIEnv::ExcceptionClear() after every JNIEnv::Call*Method()
invocation so that any pending exception is cleared (there won't be
a pending exception, but the JVM doesn't care), which removes all of
these warning messages.

Footnotes

  1. Probably. 100,000 iterations across over 12 steps should
    exceed a million, unless you're on Android and the iteration count
    is instead 1,000.

When running `make run-ptests`, the output log is *spammed*:

	WARNING in native method: JNI call made without checking exceptions when required to from CallStaticVoidMethod

Over a million times [^0].

Call `JNIEnv::ExcceptionClear()` after every `JNIEnv::Call*Method()`
invocation so that any pending exception is cleared (there *won't* be
a pending exception, but the JVM doesn't care), which removes all of
these warning messages.

[^0]: *Probably*. 100,000 iterations across over 12 steps should
    exceed a million, unless you're on Android and the iteration count
		is instead 1,000.
@jonpryor jonpryor merged commit 5badc2e into dotnet:master Aug 18, 2016
jonpryor pushed a commit that referenced this pull request Jan 31, 2020
Changes: dotnet/android-tools@66d445c...bfb66f3

Context: https://devdiv.visualstudio.com/DevDiv/_workitems/edit/826178
Context: https://devdiv.visualstudio.com/DevDiv/_workitems/edit/938504
Context: http://feedback.devdiv.io/606218

  * dotnet/android-tools@bfb66f3: Update to sdk-style csproj and netstandard2.0. (#78)
  * dotnet/android-tools@9f4ed4b: Use %ProgramW6432% path for 32-bit apps (#75)
  * dotnet/android-tools@294f447: Merge pull request #77 from xamarin/dev/soch/fix_certs
  * dotnet/android-tools@131bb29: Fix authenticode certs
  * dotnet/android-tools@962c486: Prevent NRE when Android SDK is not found (#73)
  * dotnet/android-tools@9b03310: [Windows] check %JAVA_HOME% for locating Jdk (#74)
  * dotnet/android-tools@cb41333: Get OpenJDK from well-known paths, not just registry (#72)
  * dotnet/android-tools@53ffdae: Downgrade to net46 for compatibility with VS2017+(#69)
  * dotnet/android-tools@4264703: Add AlternateIds for 9.0
  * dotnet/android-tools@90a6e06: [Xamarin.Android.Tools.AndroidSdk] Add 9.0 to KnownVersions.
  * dotnet/android-tools@4f717b6: Check if the path exists before trying to enumerate it. (#67)

Had to add an explicit NuGet restore to build it on Windows because 🤷‍♂.
@github-actions github-actions bot locked and limited conversation to collaborators Apr 15, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants