Bug 34273 - Android.Runtime.JNIEnv.CallNonvirtualVoidMethod
Summary: Android.Runtime.JNIEnv.CallNonvirtualVoidMethod
Alias: None
Product: Android
Classification: Xamarin
Component: Mono runtime / AOT Compiler ()
Version: unspecified
Hardware: Macintosh Mac OS
: --- normal
Target Milestone: ---
Assignee: Jonathan Pryor
Depends on:
Reported: 2015-09-25 05:15 UTC by Fokke Vermeulen
Modified: 2017-06-28 11:40 UTC (History)
3 users (show)

Is this bug a regression?: ---
Last known good build:

Notice (2018-05-24): bugzilla.xamarin.com is now in read-only mode.

Please join us on Visual Studio Developer Community and in the Xamarin and Mono organizations on GitHub to continue tracking issues. Bugzilla will remain available for reference in read-only mode. We will continue to work on open Bugzilla bugs, copy them to the new locations as needed for follow-up, and add the new items under Related Links.

Our sincere thanks to everyone who has contributed on this bug tracker over the years. Thanks also for your understanding as we make these adjustments and improvements for the future.

Please create a new report on Developer Community or GitHub with your current version information, steps to reproduce, and relevant error messages or log files if you are hitting an issue that looks similar to this resolved bug and you do not yet see a matching new report.

Related Links:

Description Fokke Vermeulen 2015-09-25 05:15:27 UTC
firstView = view includes a searchField and a listview for the searched products
secondView = view includes a searchField and a listview for the suggestion for typed characters.

The click in the firstView on the searchField will push on the secondView. When I tap here any cellItem or press the Done-Button on the keyboard after entered a character, I will pop back to the firstView.

Sometimes when I search and pop back to the firstView the app will crash hard.


[mono-rt] Stacktrace:
[mono-rt]   at <unknown> <0xffffffff>
[mono-rt]   at (wrapper managed-to-native) object.wrapper_native_0x40b9c34d (intptr,intptr,intptr,intptr,Android.Runtime.JValue*) <IL 0x00030, 0xffffffff>
[mono-rt]   at (wrapper delegate-invoke) <Module>.invoke_void_intptr_intptr_intptr_intptr_JValue* (intptr,intptr,intptr,intptr,Android.Runtime.JValue*) <IL 0x00070, 0xffffffff>
[mono-rt]   at Android.Runtime.JNIEnv.CallNonvirtualVoidMethod (intptr,intptr,intptr,Android.Runtime.JValue*) <IL 0x00073, 0x00267>
[mono-rt]   at Android.Runtime.JNIEnv.FinishCreateInstance (intptr,intptr,intptr,Android.Runtime.JValue*) <IL 0x0000f, 0x000a3>
[mono-rt]   at Android.OS.Handler..ctor (Android.OS.Looper) <IL 0x000d6, 0x0048b>
[mono-rt]   at Android.App.SyncContext.Post (System.Threading.SendOrPostCallback,object) <IL 0x0001e, 0x0015f>
[mono-rt]   at Microsoft.Runtime.CompilerServices.TaskAwaiter/<>c__DisplayClassa.<OnCompletedInternal>b__0 (System.Threading.Tasks.Task) <IL 0x00029, 0x0012b>
[mono-rt]   at System.Threading.Tasks.ContinuationTaskFromTask.InnerInvoke () <IL 0x00029, 0x00127>
[mono-rt]   at System.Threading.Tasks.Task.Execute () <IL 0x00017, 0x000ff>
[mono-rt]   at System.Threading.Tasks.Task.ExecutionContextCallback (object) <IL 0x00008, 0x000b3>
[mono-rt]   at System.Threading.ExecutionContext.Run (System.Threading.ExecutionContext,System.Threading.ContextCallback,object) <IL 0x00029, 0x0016f>
[mono-rt]   at System.Threading.ExecutionContext.Run (System.Threading.ExecutionContext,System.Threading.ContextCallback,object,bool) <IL 0x00003, 0x00077>
[mono-rt]   at System.Threading.Tasks.Task.ExecuteWithThreadLocal (System.Threading.Tasks.Task&) <IL 0x00063, 0x002db>
[mono-rt]   at System.Threading.Tasks.Task.ExecuteEntry (bool) <IL 0x00075, 0x00247>
[mono-rt]   at System.Threading.Tasks.ThreadPoolTaskScheduler.TryExecuteTaskInline (System.Threading.Tasks.Task,bool) <IL 0x00017, 0x00157>
[mono-rt]   at System.Threading.Tasks.TaskScheduler.TryRunInline (System.Threading.Tasks.Task,bool) <IL 0x0005c, 0x0034b>
[mono-rt]   at System.Threading.Tasks.TaskContinuation.InlineIfPossibleOrElseQueue (System.Threading.Tasks.Task,bool) <IL 0x00035, 0x0018f>
[mono-rt]   at System.Threading.Tasks.StandardTaskContinuation.Run (System.Threading.Tasks.Task,bool) <IL 0x00073, 0x002af>
[mono-rt]   at System.Threading.Tasks.Task.FinishContinuations () <IL 0x00090, 0x0055f>
[mono-rt]   at System.Threading.Tasks.Task.FinishStageThree () <IL 0x00046, 0x00157>
[mono-rt]   at System.Threading.Tasks.Task`1.TrySetResult (TResult) <IL 0x00059, 0x001ef>
[mono-rt]   at System.Runtime.CompilerServices.AsyncTaskMethodBuilder`1.SetResult (TResult) <IL 0x00021, 0x0014f>
[mono-rt]   at System.Net.Http.HttpClientHandler/<SendAsync>c__async0.MoveNext () <IL 0x0055a, 0x0202b>
[mono-rt]   at System.Runtime.CompilerServices.AsyncMethodBuilderCore/MoveNextRunner.InvokeMoveNext (object) <IL 0x00006, 0x00123>
[mono-rt]   at System.Threading.ExecutionContext.Run (System.Threading.ExecutionContext,System.Threading.ContextCallback,object) <IL 0x00029, 0x0016f>
[mono-rt]   at System.Threading.ExecutionContext.Run (System.Threading.ExecutionContext,System.Threading.ContextCallback,object,bool) <IL 0x00003, 0x00077>
[mono-rt]   at System.Runtime.CompilerServices.AsyncMethodBuilderCore/MoveNextRunner.Run () <IL 0x00049, 0x001e3>
[mono-rt]   at System.Threading.Tasks.AwaitTaskContinuation.RunOrScheduleAction (System.Action,bool,System.Threading.Tasks.Task&) <IL 0x00026, 0x001ab>
[mono-rt]   at System.Threading.Tasks.Task.FinishContinuations () <IL 0x00056, 0x002e7>
[mono-rt]   at System.Threading.Tasks.Task.FinishStageThree () <IL 0x00046, 0x00157>
[mono-rt]   at System.Threading.Tasks.Task`1.TrySetResult (TResult) <IL 0x00059, 0x001ef>
[mono-rt]   at System.Threading.Tasks.TaskFactory`1.FromAsyncCoreLogic (System.IAsyncResult,System.Func`2<System.IAsyncResult, TResult>,System.Action`1<System.IAsyncResult>,System.Threading.Tasks.Task`1<TResult>,bool) <IL 0x0009e, 0x00503>
[mono-rt]   at System.Threading.Tasks.TaskFactory`1/<FromAsyncImpl>c__AnonStorey1.<>m__0 (System.IAsyncResult) <IL 0x00033, 0x0013f>
[mono-rt]   at System.Net.SimpleAsyncResult/<SimpleAsyncResult>c__AnonStorey0.<>m__0 (System.Net.SimpleAsyncResult) <IL 0x00017, 0x000b7>
[mono-rt]   at System.Net.SimpleAsyncResult.DoCallback_internal () <IL 0x00024, 0x000e3>
[mono-rt]   at System.Net.WebAsyncResult.DoCallback () <IL 0x00001, 0x00063>
[mono-rt]   at System.Net.HttpWebRequest.SetResponseData (System.Net.WebConnectionData) <IL 0x00214, 0x00daf>
[mono-rt]   at (wrapper remoting-invoke-with-check) System.Net.HttpWebRequest.SetResponseData (System.Net.WebConnectionData) <IL 0x00039, 0xffffffff>
[mono-rt]   at System.Net.WebConnection.ReadDone (System.IAsyncResult) <IL 0x002c3, 0x0106f>
[mono-rt]   at (wrapper runtime-invoke) <Module>.runtime_invoke_void__this___object (object,intptr,intptr,intptr) <IL 0x00062, 0xffffffff>
[mono-rt] Attempting native Android stacktrace:
[mono-rt]   at dvmAbort+67 [0x40b962fc]
[mono-rt]   at IndirectRefTable::get(void*) const+116 [0x40b786cc]
[mono-rt]   at dvmDecodeIndirectRef(Thread*, _jobject*)+62 [0x40b9acfb]
[mono-rt]   at dvmCallMethodA(Thread*, Method const*, Object*, bool, JValue*, jvalue const*)+132 [0x40bb0875]
[mono-rt]   at ???+312203 [0x40b9c38b]
[mono-rt]   at ???+9904 [0x5d4286b0]
[mono-rt] =================================================================
[mono-rt] Got a SIGSEGV while executing native code. This usually indicates
[mono-rt] a fatal error in the mono runtime or one of the native libraries 
[mono-rt] used by your application.
[mono-rt] =================================================================
[libc] Fatal signal 11 (SIGSEGV) at 0xdeadd00d (code=1), thread 9371
Comment 1 Jonathan Pryor 2015-09-25 13:38:00 UTC
What Xamarin.Android version is this?

Please provide additional `adb logcat` output -- since it's aborting in ART, I'd assume there to be *at least* a message about accessing some invalid JNI handle -- and ideally a repro case.

Lacking a repro, GREF logging would be useful:

Comment 2 Adam Hartley [MSFT] 2017-06-28 11:40:04 UTC
Because we have not received a reply to our request for more information we are closing this issue. If you are still encountering this issue, please reopen the ticket with the requested information. Thanks!