Skip to content
New issue

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

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

Already on GitHub? Sign in to your account

Uncaught android java exceptions when enabling LLVM on Lollipop(armeabi-v7a). #3341

Closed
pellet opened this issue Jul 10, 2019 · 5 comments
Closed
Assignees

Comments

@pellet
Copy link

pellet commented Jul 10, 2019

Steps to Reproduce

  1. Enable AOT and LLVM.
  2. Run app which catches a java exception thrown from a java binding with a c# try/catch.
  3. Java exception will be caught when not enabling LLVM, exception will not be caught after enabling LLVM.

Expected Behavior

Java exception should be caught.

Actual Behavior

Java exception is not caught by the c# try/catch.

Version Information

=== Visual Studio Community 2019 for Mac ===

Version 8.1.1 (build 27)
Installation UUID: 5049d043-10da-4ab1-931f-e1424147a79f
GTK+ 2.24.23 (Raleigh theme)
Xamarin.Mac 5.6.0.25 (d16-0 / 50f75273)

Package version: 518010028

=== Mono Framework MDK ===

Runtime:
Mono 5.18.1.28 (2018-08/223ea7ef92e) (64-bit)
Package version: 518010028

=== NuGet ===

Version: 5.0.2.5988

=== .NET Core ===

Runtime: /usr/local/share/dotnet/dotnet
Runtime Version: 2.2.5
SDK: /usr/local/share/dotnet/sdk/2.2.300/Sdks
SDK Version: 2.2.300
MSBuild SDKs: /Library/Frameworks/Mono.framework/Versions/5.18.1/lib/mono/msbuild/Current/bin/Sdks

=== Xamarin.Profiler ===

Version: 1.6.10
Location: /Applications/Xamarin Profiler.app/Contents/MacOS/Xamarin Profiler

=== Updater ===

Version: 11

=== Xamarin.Android ===

Version: 9.3.0.23 (Visual Studio Community)
Commit: HEAD/d0b48056f
Android SDK: /Users/ben/Library/Android/sdk
Supported Android versions:
5.1 (API level 22)
6.0 (API level 23)
7.0 (API level 24)
7.1 (API level 25)
8.0 (API level 26)
8.1 (API level 27)

SDK Tools Version: 26.1.1
SDK Platform Tools Version: 29.0.1
SDK Build Tools Version: 29.0.0

Build Information:
Mono: mono/mono@3a07bd426d3
Java.Interop: xamarin/java.interop/d16-1@5ddc3e3
LibZipSharp: grendello/LibZipSharp/d16-1@44de300
LibZip: nih-at/libzip@b95cf3f
ProGuard: xamarin/proguard@905836d
SQLite: xamarin/sqlite@8212a2d
Xamarin.Android Tools: xamarin/xamarin-android-tools/d16-1@acabd26

=== Microsoft Mobile OpenJDK ===

Java SDK: /Users/ben/Library/Developer/Xamarin/jdk/microsoft_dist_openjdk_8.0.25
1.8.0-25
Android Designer EPL code available here:
https://github.com/xamarin/AndroidDesigner.EPL

=== Android Device Manager ===

Version: 1.2.0.44
Hash: aac645b
Branch: remotes/origin/d16-1
Build date: 2019-05-29 19:55:24 UTC

=== Xamarin Designer ===

Version: 16.1.0.467
Hash: f1657e133
Branch: remotes/origin/d16-1-new-document-model
Build date: 2019-06-18 21:57:42 UTC

=== Apple Developer Tools ===

Xcode 10.2.1 (14490.122)
Build 10E1001

=== Xamarin.Mac ===

Version: 5.10.0.157 (Visual Studio Community)
Hash: 6bd94753
Branch: d16-1
Build date: 2019-06-12 17:28:48-0400

=== Xamarin.iOS ===

Version: 12.10.0.157 (Visual Studio Community)
Hash: 6bd94753
Branch: d16-1
Build date: 2019-06-12 17:28:47-0400

=== Xamarin Inspector ===

Version: 1.4.3
Hash: db27525
Branch: 1.4-release
Build date: Mon, 09 Jul 2018 21:20:18 GMT
Client compatibility: 1

=== Build Information ===

Release ID: 801010027
Git revision: ce34f6838e6457d0e7d5991a1a693415e6fcae07
Build date: 2019-06-19 19:52:58+00
Build branch: release-8.1
Xamarin extensions: 5104b76623e0df8e5f763f87d170279c0b788e89

=== Operating System ===

Mac OS X 10.14.4
Darwin 18.5.0 Darwin Kernel Version 18.5.0
Mon Mar 11 20:40:32 PDT 2019
root:xnu-4903.251.3~3/RELEASE_X86_64 x86_64

Log File

2019-06-28 15:21:15:535|[E]|#37 SmartCap.UI.Droid.AndroidCompositionRoot Unhandled exception:Java.IO.IOException: Exception of type 'Java.IO.IOException' was thrown.
0100 at Java.Interop.JniEnvironment+InstanceMethods.CallIntMethod (Java.Interop.JniObjectReference instance, Java.Interop.JniMethodInfo method, Java.Interop.JniArgumentValue* args) <0xa23d5340 + 0x000ab> in <3948c23ad4f04f469eb699bd2f5fa52d>:0
0101 at Android.Runtime.JNIEnv.CallIntMethod (System.IntPtr jobject, System.IntPtr jmethod, Android.Runtime.JValue* parms) <0xa257e5cc + 0x00063> in :0
0102 at Android.Hardware.SerialPort.Read (Java.Nio.ByteBuffer buffer) <0xa16c9a88 + 0x00137> in :0
0103 --- End of managed Java.IO.IOException stack trace ---
0104 java.io.IOException
0105 at android.hardware.SerialPort.native_select(Native Method)
0106 at android.hardware.SerialPort.isDataAvailable(SerialPort.java:241)
0107 at android.hardware.SerialPort.read(SerialPort.java:115)
0108 , terminating:True

@pellet pellet changed the title Uncaught android java exceptions when enabling LLVM with 64bit support on Lollipop. Uncaught android java exceptions when enabling LLVM on Lollipop(armeabi-v7a). Jul 10, 2019
@dellis1972 dellis1972 added this to the d16-4 milestone Jul 11, 2019
@pellet
Copy link
Author

pellet commented Jul 14, 2019

Let me know if you guys have trouble reproducing it and i'll try getting a reproducible sample project through to you.
We tried reverting our NDK back in versions but didn't seem to help.

@PawKanarek
Copy link

I think this is the same issue #3480

@pellet Do you have any workarounds, other than disabling AOT and going back to VS 2017?

@pellet
Copy link
Author

pellet commented Aug 13, 2019

I think this is the same issue #3480

@pellet Do you have any workarounds, other than disabling AOT and going back to VS 2017?

Yeah seems to be the same issue, easiest way to resolve it is to disable LLVM. AOT still works and the performance hit is negligible.

@tranb3r
Copy link

tranb3r commented Oct 30, 2019

@jonpryor what is the status on this ticket?

@jpobst jpobst removed their assignment Nov 8, 2019
@pjcollins pjcollins removed this from the d16-4 milestone Sep 2, 2020
@jpobst
Copy link
Contributor

jpobst commented May 3, 2024

With support for Classic Xamarin.Android ended May 1st, 2024, this issue is likely no longer relevant.

If this still persists in .NET 8+, please open a new issue with updated information based on net8.0-android or greater. Please include a link to this issue for context.

@jpobst jpobst closed this as not planned Won't fix, can't repro, duplicate, stale May 3, 2024
@github-actions github-actions bot locked and limited conversation to collaborators Jun 4, 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

No branches or pull requests

7 participants