Bug 27256 - mono rt crashes randomly on the native wrapper
Summary: mono rt crashes randomly on the native wrapper
Status: REOPENED
Alias: None
Product: Android
Classification: Xamarin
Component: Mono runtime / AOT Compiler (show other bugs)
Version: 4.20.0
Hardware: PC Windows
: Normal normal
Target Milestone: ---
Assignee: Jonathan Pryor
URL:
: 27572 (view as bug list)
Depends on:
Blocks:
 
Reported: 2015-02-20 09:54 UTC by Iliass Yousfi
Modified: 2015-04-16 11:07 UTC (History)
3 users (show)

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


Attachments

Description Iliass Yousfi 2015-02-20 09:54:46 UTC
We are experiencing a very instable mono-rt with our application that was ok before upgrading to the newest Xamarin.Android.
This is a showstopper for updating our app on the play store, please need help

We are getting this stacktrace from mono :

02-20 09:46:00.512: E/mono-rt(6264): Stacktrace:
02-20 09:46:00.512: E/mono-rt(6264):   at <unknown> <0xffffffff>
02-20 09:46:00.512: E/mono-rt(6264):   at (wrapper managed-to-native) object.wrapper_native_0x42202b91 (intptr,intptr,intptr,Android.Runtime.JValue[]) <0xffffffff>
02-20 09:46:00.512: E/mono-rt(6264):   at (wrapper delegate-invoke) <Module>.invoke_void_intptr_intptr_intptr_JValue[] (intptr,intptr,intptr,Android.Runtime.JValue[]) <0xffffffff>
02-20 09:46:00.512: E/mono-rt(6264):   at Android.Runtime.JNIEnv.CallVoidMethod (intptr,intptr,Android.Runtime.JValue[]) <0x00097>
02-20 09:46:00.512: E/mono-rt(6264):   at Android.Widget.TextView.set_TextFormatted (Java.Lang.ICharSequence) <0x000f7>
02-20 09:46:00.513: E/mono-rt(6264):   at Android.Widget.TextView.set_Text (string) <0x0004f>
02-20 09:46:00.513: E/mono-rt(6264):   at Cirrious.MvvmCross.Binding.Droid.Target.MvxTextViewTextTargetBinding.SetValueImpl (object,object) <0x00077>
02-20 09:46:00.513: E/mono-rt(6264):   at Cirrious.MvvmCross.Binding.Bindings.Target.MvxConvertingTargetBinding.SetValue (object) <0x0019f>
02-20 09:46:00.513: E/mono-rt(6264):   at Cirrious.MvvmCross.Binding.Bindings.MvxFullBinding.UpdateTargetFromSource (object) <0x0008f>
02-20 09:46:00.513: E/mono-rt(6264):   at Cirrious.MvvmCross.Binding.Bindings.MvxFullBinding.<CreateSourceBinding>b__0 (object,System.EventArgs) <0x0003b>
02-20 09:46:00.513: E/mono-rt(6264):   at Cirrious.MvvmCross.Binding.Bindings.SourceSteps.MvxSourceStep.SendSourcePropertyChanged () <0x0003b>
02-20 09:46:00.513: E/mono-rt(6264):   at Cirrious.MvvmCross.Binding.Bindings.SourceSteps.MvxPathSourceStep.SourceBindingOnChanged (object,System.EventArgs) <0x0001b>
02-20 09:46:00.513: E/mono-rt(6264):   at Cirrious.MvvmCross.Binding.Bindings.Source.MvxSourceBinding.FireChanged () <0x0003b>
02-20 09:46:00.513: E/mono-rt(6264):   at Cirrious.MvvmCross.Binding.Bindings.Source.Chained.MvxChainedSourceBinding.OnBoundPropertyChanged () <0x0001b>
02-20 09:46:00.513: E/mono-rt(6264):   at Cirrious.MvvmCross.Binding.Bindings.Source.MvxPropertyInfoSourceBinding.SourcePropertyChanged (object,System.ComponentModel.PropertyChangedEventArgs) <0x0007b>
02-20 09:46:00.513: E/mono-rt(6264):   at (wrapper runtime-invoke) <Module>.runtime_invoke_void__this___object_object (object,intptr,intptr,intptr) <0xffffffff>
02-20 09:46:00.513: E/mono-rt(6264):   at <unknown> <0xffffffff>
02-20 09:46:00.513: E/mono-rt(6264):   at (wrapper managed-to-native) System.Reflection.MonoMethod.InternalInvoke (System.Reflection.MonoMethod,object,object[],System.Exception&) <0xffffffff>
02-20 09:46:00.513: E/mono-rt(6264):   at System.Reflection.MonoMethod.Invoke (object,System.Reflection.BindingFlags,System.Reflection.Binder,object[],System.Globalization.CultureInfo) <0x000cf>
02-20 09:46:00.513: E/mono-rt(6264):   at System.Reflection.MethodBase.Invoke (object,object[]) <0x00047>
02-20 09:46:00.513: E/mono-rt(6264):   at Cirrious.CrossCore.WeakSubscription.MvxWeakEventSubscription`2.OnSourceEvent (object,TEventArgs) <0x000a3>
02-20 09:46:00.513: E/mono-rt(6264):   at (wrapper delegate-invoke) <Module>.invoke_void_object_PropertyChangedEventArgs (object,System.ComponentModel.PropertyChangedEventArgs) <0x0009b>
02-20 09:46:00.513: E/mono-rt(6264):   at (wrapper delegate-invoke) <Module>.invoke_void_object_PropertyChangedEventArgs (object,System.ComponentModel.PropertyChangedEventArgs) <0xffffffff>
02-20 09:46:00.513: E/mono-rt(6264):   at Cirrious.MvvmCross.ViewModels.MvxNotifyPropertyChanged/<>c__DisplayClass1.<RaisePropertyChanged>b__0 () <0x0002f>
02-20 09:46:00.513: E/mono-rt(6264):   at Cirrious.MvvmCross.Droid.Views.MvxAndroidMainThreadDispatcher.RequestMainThreadAction (System.Action) <0x00077>
02-20 09:46:00.513: E/mono-rt(6264):   at Cirrious.CrossCore.Core.MvxMainThreadDispatchingObject.InvokeOnMainThread (System.Action) <0x00047>
02-20 09:46:00.514: E/mono-rt(6264):   at Cirrious.MvvmCross.ViewModels.MvxNotifyPropertyChanged.RaisePropertyChanged (System.ComponentModel.PropertyChangedEventArgs) <0x0010b>
02-20 09:46:00.514: E/mono-rt(6264):   at Cirrious.MvvmCross.ViewModels.MvxNotifyPropertyChanged.RaisePropertyChanged (string) <0x00057>
02-20 09:46:00.514: E/mono-rt(6264):   at Distech.X50.Core.ViewModels.X50ItemViewModel.<.ctor>b__1 (object,System.ComponentModel.PropertyChangedEventArgs) <0x00023>
02-20 09:46:00.514: E/mono-rt(6264):   at (wrapper delegate-invoke) <Module>.invoke_void_object_PropertyChangedEventArgs (object,System.ComponentModel.PropertyChangedEventArgs) <0x0009b>
02-20 09:46:00.514: E/mono-rt(6264):   at (wrapper delegate-invoke) <Module>.invoke_void_object_PropertyChangedEventArgs (object,System.ComponentModel.PropertyChangedEventArgs) <0x0009b>
02-20 09:46:00.514: E/mono-rt(6264):   at (wrapper delegate-invoke) <Module>.invoke_void_object_PropertyChangedEventArgs (object,System.ComponentModel.PropertyChangedEventArgs) <0x0009b>
02-20 09:46:00.514: E/mono-rt(6264):   at (wrapper delegate-invoke) <Module>.invoke_void_object_PropertyChangedEventArgs (object,System.ComponentModel.PropertyChangedEventArgs) <0x0009b>
02-20 09:46:00.514: E/mono-rt(6264):   at (wrapper delegate-invoke) <Module>.invoke_void_object_PropertyChangedEventArgs (object,System.ComponentModel.PropertyChangedEventArgs) <0xffffffff>
02-20 09:46:00.514: E/mono-rt(6264):   at Distech.X50.Model.Common.X50Item.NotifyPropertyChanged (string) <0x0006f>
02-20 09:46:00.514: E/mono-rt(6264):   at Distech.X50.Model.Common.X50Item.set_IsOn (bool) <0x00027>
02-20 09:46:00.514: E/mono-rt(6264):   at Distech.X50.Core.ViewModels.X50ViewModel..ctor () <0x001fb>
02-20 09:46:00.514: E/mono-rt(6264):   at (wrapper runtime-invoke) object.runtime_invoke_void__this__ (object,intptr,intptr,intptr) <0xffffffff>
02-20 09:46:00.514: E/mono-rt(6264):   at <unknown> <0xffffffff>
02-20 09:46:00.514: E/mono-rt(6264):   at (wrapper managed-to-native) System.Reflection.MonoCMethod.InternalInvoke (System.Reflection.MonoCMethod,object,object[],System.Exception&) <0xffffffff>
02-20 09:46:00.514: E/mono-rt(6264):   at System.Reflection.MonoCMethod.InternalInvoke (object,object[]) <0x0003b>
02-20 09:46:00.514: E/mono-rt(6264):   at System.Reflection.MonoCMethod.DoInvoke (object,System.Reflection.BindingFlags,System.Reflection.Binder,object[],System.Globalization.CultureInfo) <0x00103>
02-20 09:46:00.514: E/mono-rt(6264):   at System.Reflection.MonoCMethod.Invoke (System.Reflection.BindingFlags,System.Reflection.Binder,object[],System.Globalization.CultureInfo) <0x00047>
02-20 09:46:00.514: E/mono-rt(6264):   at System.Reflection.ConstructorInfo.Invoke (object[]) <0x0006b>
02-20 09:46:00.514: E/mono-rt(6264):   at Cirrious.CrossCore.IoC.MvxSimpleIoCContainer.IoCConstruct (System.Type) <0x0008b>
02-20 09:46:00.514: E/mono-rt(6264):   at Cirrious.CrossCore.Mvx.IocConstruct (System.Type) <0x0002f>
02-20 09:46:00.515: E/mono-rt(6264):   at Cirrious.MvvmCross.ViewModels.MvxDefaultViewModelLocator.TryLoad (System.Type,Cirrious.MvvmCross.ViewModels.IMvxBundle,Cirrious.MvvmCross.ViewModels.IMvxBundle,Cirrious.MvvmCross.ViewModels.IMvxViewModel&) <0x0005b>
02-20 09:46:00.515: E/mono-rt(6264):   at Cirrious.MvvmCross.ViewModels.MvxViewModelLoader.LoadViewModel (Cirrious.MvvmCross.ViewModels.MvxViewModelRequest,Cirrious.MvvmCross.ViewModels.IMvxBundle,Cirrious.MvvmCross.ViewModels.IMvxViewModelLocator) <0x0007b>
02-20 09:46:00.515: E/mono-rt(6264):   at Cirrious.MvvmCross.ViewModels.MvxViewModelLoader.LoadViewModel (Cirrious.MvvmCross.ViewModels.MvxViewModelRequest,Cirrious.MvvmCross.ViewModels.IMvxBundle) <0x0006b>
02-20 09:46:00.515: E/mono-rt(6264):   at Cirrious.MvvmCross.Droid.Views.MvxAndroidViewsContainer.ViewModelFromRequest (Cirrious.MvvmCross.ViewModels.MvxViewModelRequest,Cirrious.MvvmCross.ViewModels.IMvxBundle) <0x0003b>
02-20 09:46:00.515: E/mono-rt(6264):   at Cirrious.MvvmCross.Droid.Views.MvxAndroidViewsContainer.CreateViewModelFromIntent (Android.Content.Intent,Cirrious.MvvmCross.ViewModels.IMvxBundle) <0x000b3>
02-20 09:46:00.515: E/mono-rt(6264):   at Cirrious.MvvmCross.Droid.Views.MvxAndroidViewsContainer.Load (Android.Content.Intent,Cirrious.MvvmCross.ViewModels.IMvxBundle,System.Type) <0x00183>
02-20 09:46:00.515: E/mono-rt(6264):   at Cirrious.MvvmCross.Droid.Views.MvxActivityViewExtensions.LoadViewModel (Cirrious.MvvmCross.Droid.Views.IMvxAndroidView,Cirrious.MvvmCross.ViewModels.IMvxBundle) <0x00137>
02-20 09:46:00.515: E/mono-rt(6264):   at Cirrious.MvvmCross.Droid.Views.MvxActivityViewExtensions/<>c__DisplayClass3.<OnViewCreate>b__1 () <0x00027>
02-20 09:46:00.515: E/mono-rt(6264):   at Cirrious.MvvmCross.Views.MvxViewExtensionMethods.OnViewCreate (Cirrious.MvvmCross.Views.IMvxView,System.Func`1<Cirrious.MvvmCross.ViewModels.IMvxViewModel>) <0x00053>
02-20 09:46:00.515: E/mono-rt(6264):   at Cirrious.MvvmCross.Droid.Views.MvxActivityViewExtensions.OnViewCreate (Cirrious.MvvmCross.Droid.Views.IMvxAndroidView,Android.OS.Bundle) <0x001a7>
02-20 09:46:00.515: E/mono-rt(6264):   at Cirrious.MvvmCross.Droid.Views.MvxActivityAdapter.EventSourceOnCreateCalled (object,Cirrious.CrossCore.Core.MvxValueEventArgs`1<Android.OS.Bundle>) <0x000f7>
02-20 09:46:00.515: E/mono-rt(6264):   at (wrapper delegate-invoke) System.EventHandler`1.invoke_void_object_TEventArgs (object,TEventArgs) <0xffffffff>
02-20 09:46:00.516: E/mono-rt(6264):   at Cirrious.CrossCore.Core.MvxDelegateExtensionMethods.Raise<T> (System.EventHandler`1<Cirrious.CrossCore.Core.MvxValueEventArgs`1<T>>,object,T) <0x0004b>
02-20 09:46:00.516: E/mono-rt(6264):   at Cirrious.CrossCore.Droid.Views.MvxEventSourceActivity.OnCreate (Android.OS.Bundle) <0x00047>
02-20 09:46:00.516: E/mono-rt(6264):   at Distech.X50.UI.Droid.Views.BaseView`1.OnCreate (Android.OS.Bundle) <0x0005b>
02-20 09:46:00.516: E/mono-rt(6264):   at Distech.X50.UI.Droid.Views.X50View.OnCreate (Android.OS.Bundle) <0x0001b>
02-20 09:46:00.516: E/mono-rt(6264):   at Android.App.Activity.n_OnCreate_Landroid_os_Bundle_ (intptr,intptr,intptr) <0x0005b>
02-20 09:46:00.516: E/mono-rt(6264):   at (wrapper dynamic-method) object.b747bfa4-fb8e-45a2-9565-d09db3a7b4b3 (intptr,intptr,intptr) <0x00043>
02-20 09:46:00.516: E/mono-rt(6264):   at (wrapper native-to-managed) object.b747bfa4-fb8e-45a2-9565-d09db3a7b4b3 (intptr,intptr,intptr) <0xffffffff>
02-20 09:46:00.516: E/mono-rt(6264): =================================================================
02-20 09:46:00.516: E/mono-rt(6264): Got a SIGSEGV while executing native code. This usually indicates
02-20 09:46:00.516: E/mono-rt(6264): a fatal error in the mono runtime or one of the native libraries 
02-20 09:46:00.516: E/mono-rt(6264): used by your application.
02-20 09:46:00.516: E/mono-rt(6264): =================================================================
02-20 09:46:00.516: A/libc(6264): Fatal signal 11 (SIGSEGV), code 1, fault addr 0x62ff1b34 in tid 6264 (ch.x50.ui.droid)
Comment 1 Iliass Yousfi 2015-02-20 09:56:21 UTC
Her are our Xamarin versions:

Xamarin   3.8.151.0 (10b41108edc2a18147e4fb0f5bb9ecaaf91b6fc9)
Visual Studio extension to enable development for Xamarin.iOS and Xamarin.Android.

Xamarin.Android   4.20.0.28 (ba9bbbdd44cfdc4bf485e8885bd2ad24fba525f7)
Visual Studio plugin to enable development for Xamarin.Android.

Xamarin.iOS   8.4.0.0 (840a925103a0bf4a856507f13d5eaee3c1579c2f)
Visual Studio extension to enable development for Xamarin.iOS.
Comment 2 Jonathan Pryor 2015-02-20 15:42:56 UTC
> We are experiencing a very instable mono-rt with our application that was ok
> before upgrading to the newest Xamarin.Android.

Xamarin.Android 4.20.0.28 was released on November 20, 2014 -- nearly three months ago.

You make this sound like a recent change. What were you previously using?

> 02-20 09:46:00.512: E/mono-rt(6264):   at Android.Runtime.JNIEnv.CallVoidMethod(intptr,intptr,Android.Runtime.JValue[]) <0x00097>

Please attach the `adb logcat` output from before and after your crash. Crashes from JNIEnv.Call*Method() are usually because an invalid JNI handle is involved or the GREF limit has been exceeded, in which cases Android will provide additional information to `adb logcat`.

This information will not be written to the Application Output tab.
Comment 3 Iliass Yousfi 2015-02-20 16:17:37 UTC
Thanks Jon for the update,
Unfortunately the log report happened the morning (which I provided from the logcat on DDMS by the way) and now seems not lot of data around that hour. Here is what I can extract now from the logcat around that time:

>02-20 09:45:59.574: D/ConnectivityService(501): Network NetworkAgentInfo [WIFI () - 100] was already satisfying request 1. No change.
02-20 09:45:59.574: D/ConnectivityService(501): notifyType AVAILABLE for NetworkAgentInfo [WIFI () - 100]
02-20 09:46:00.449: I/ActivityManager(501): START u0 {flg=0x10000000 cmp=com.distech.x50.ui.droid/distech.x50.ui.droid.views.X50View (has extras)} from uid 10224 on display 0
02-20 09:46:00.516: A/libc(6264): Fatal signal 11 (SIGSEGV), code 1, fault addr 0x62ff1b34 in tid 6264 (ch.x50.ui.droid)
02-20 09:46:00.549: I/WindowState(501): WIN DEATH: Window{3f95ea73 u0 com.distech.x50.ui.droid/distech.x50.ui.droid.views.NetworkView}
02-20 09:46:00.552: I/WindowState(501): WIN DEATH: Window{1d6fb42e u0 com.distech.x50.ui.droid/distech.x50.ui.droid.views.ConnectionView}
02-20 09:46:00.688: I/ActivityManager(501): Process com.distech.x50.ui.droid (pid 6264) has died
02-20 09:46:00.688: W/ActivityManager(501): Force removing ActivityRecord{2758a7d7 u0 com.distech.x50.ui.droid/distech.x50.ui.droid.views.NetworkView t476}: app died, no saved state

> Xamarin.Android 4.20.0.28 was released on November 20, 2014 -- nearly three months ago.
Do you think that using the latest Xamarin.Android may fix that if the problem resides in the mono-rt? We usually don't upgrade right away when new Xamarin.Android is released cause it has caused us lot of head-aches in the past to do so (the whole tools and MS Stuff (Visual studio etc...) ). But if it's worth the try I'll do it if you think so ?
Comment 4 Jonathan Pryor 2015-02-20 16:51:43 UTC
> 02-20 09:45:59.574: D/ConnectivityService(501): Network NetworkAgentInfo [WIFI () - 100] was already satisfying request 1. No change.

That's from a different PID -- it's from pid 501, while Comment #0 is from pid 6264. Those are different processes.

http://developer.xamarin.com/guides/android/deployment,_testing,_and_metrics/android_debug_log/#Interesting_Messages

> 02-20 09:46:00.516: A/libc(6264): Fatal signal 11 (SIGSEGV), code 1, fault addr 0x62ff1b34 in tid 6264 (ch.x50.ui.droid)

That's the right PID, at least, but there's nothing useful after it. :-(

Is this a Debug or Release build? For "best" SIGSEGV results, the //application/@android:debuggable attribute within AndroidManifest.xml should be `true`; this will cause Android to dump additional information about the crashed process, such as a native callstack (if available).

> Do you think that using the latest Xamarin.Android may fix that...

At present, 4.20.0.28 *is* the latest release. There is no more recent public release, except the 5.0 preview, which is a preview, not a stable release.

Without knowing the actual cause of the crash, I can't know if it's a Xamarin.Android bug or something else.
Comment 5 Iliass Yousfi 2015-02-20 16:59:36 UTC
> That's from a different PID -- it's from pid 501, while Comment #0 is from pid 6264. Those are different processes
Yes I'm sorry for the wrong PID I just grabbed what I could little before the right one :-)

> Is this a Debug or Release build
That was a release build (so without debuggable true)
Comment 6 Jonathan Pryor 2015-02-20 17:23:11 UTC
> That was a release build (so without debuggable true)

Does it crash with a Debug build?

If not, could you try overriding the android:debuggable attribute within your Properties\AndroidManifest.xml?

You might also want to enable CheckJNI:

http://android-developers.blogspot.com/2011/07/debugging-android-jni-with-checkjni.html

    adb shell setprop debug.checkjni 1
Comment 7 Iliass Yousfi 2015-02-24 11:31:44 UTC
I am trying now on the debug build version.
I applied the CheckJNI statement, and The excessive GREFs seems to be the cause of the application crash:

> 02-22 21:48:35.201: I/monodroid-gref(22718): Disposing handle 0x1f50056e
> 02-22 21:48:35.201: W/dalvikvm(22718): JNI WARNING: JNI method called with exception pending
> 02-22 21:48:35.201: W/dalvikvm(22718):              in Lmono/android/TypeManager;.n_activate:(Ljava/lang/String;Ljava/lang/String;Ljava/lang/Object;[Ljava/lang/Object;)V (GetObjectRefType)
> 02-22 21:48:35.201: W/dalvikvm(22718): Pending exception is:
> 02-22 21:48:35.201: I/dalvikvm(22718): android.runtime.JavaProxyThrowable: System.Threading.ThreadAbortException: Thread was being aborted
> 02-22 21:48:35.201: I/dalvikvm(22718): at System.Collections.Generic.Dictionary`2<intptr, System.WeakReference>.TryGetValue (intptr,System.WeakReference&) <IL 0x00089, 0x00180>
> 02-22 21:48:35.201: I/dalvikvm(22718): at Java.Lang.Object.PeekObject (intptr) [0x00022] in /Users/builder/data/lanes/monodroid-mlion-monodroid-4.20-series/ba9bbbdd/source/monodroid/src/Mono.Android/src/Java.Lang/Object.cs:286
> 02-22 21:48:35.201: I/dalvikvm(22718): at Java.Interop.TypeManager.n_Activate (intptr,intptr,intptr,intptr,intptr,intptr) [0x00000] in /Users/builder/data/lanes/monodroid-mlion-monodroid-4.20-series/ba9bbbdd/source/monodroid/src/Mono.Android/src/Java.Interop/TypeManager.cs:127
> 02-22 21:48:35.201: I/dalvikvm(22718): at (wrapper dynamic-method) object.cdad0d96-a8e4-43fe-9669-cb46af7270af (intptr,intptr,intptr,intptr,intptr,intptr) <IL 0x00029, 0x0003f>
> 02-22 21:48:35.201: I/dalvikvm(22718): 	at mono.android.TypeManager.n_activate(Native Method)
> 02-22 21:48:35.201: I/dalvikvm(22718): 	at mono.android.TypeManager.Activate(TypeManager.java:7)
> 02-22 21:48:35.201: I/dalvikvm(22718): 	at mono.java.lang.RunnableImplementor.<init>(RunnableImplementor.java:23)
> 02-22 21:48:35.201: I/dalvikvm(22718): 	at dalvik.system.NativeStart.run(Native Method)
> 02-22 21:48:35.201: I/dalvikvm(22718): "Thread-258" prio=5 tid=15 NATIVE
> 02-22 21:48:35.201: I/dalvikvm(22718):   | group="main" sCount=0 dsCount=0 obj=0xb14c72a8 self=0xb9ed06e0
> 02-22 21:48:35.201: I/dalvikvm(22718):   | sysTid=24103 nice=0 sched=0/0 cgrp=[fopen-error:2] handle=-1175651248
> 02-22 21:48:35.201: I/dalvikvm(22718):   | state=R schedstat=( 0 0 0 ) utm=4 stm=11 core=0
> 02-22 21:48:35.211: I/mvx(22718): 3304.56 Requesting presentation change
> 02-22 21:48:35.241: I/dalvikvm(22718):   #00  pc 000bb126  /system/lib/libdvm.so (dvmDumpNativeStack(DebugOutputTarget const*, int)+86)
> 02-22 21:48:35.241: I/dalvikvm(22718):   #01  pc 00096073  /system/lib/libdvm.so (dvmDumpThreadEx(DebugOutputTarget const*, Thread*, bool)+1155)
> 02-22 21:48:35.241: I/dalvikvm(22718):   #02  pc 00096366  /system/lib/libdvm.so (dvmDumpThread(Thread*, bool)+86)
> 02-22 21:48:35.241: I/dalvikvm(22718):   #03  pc 0004b004  /system/lib/libdvm.so
> 02-22 21:48:35.241: I/dalvikvm(22718):   #04  pc 0004dcf5  /system/lib/libdvm.so
> 02-22 21:48:35.241: I/dalvikvm(22718):   #05  pc 00034b27  <unknown>
> 02-22 21:48:35.241: I/dalvikvm(22718):   at mono.android.TypeManager.n_activate(Native Method)
> 02-22 21:48:35.241: I/dalvikvm(22718):   at mono.android.TypeManager.Activate(TypeManager.java:7)
> 02-22 21:48:35.241: I/dalvikvm(22718):   at mono.java.lang.RunnableImplementor.<init>(RunnableImplementor.java:23)
> 02-22 21:48:35.241: I/dalvikvm(22718):   at dalvik.system.NativeStart.run(Native Method)
> 02-22 21:48:35.241: E/dalvikvm(22718): VM aborting
> 02-22 21:48:35.241: E/mono-rt(22718): Stacktrace:
> 02-22 21:48:35.241: E/mono-rt(22718):   at <unknown> <0xffffffff>
> 02-22 21:48:35.241: E/mono-rt(22718):   at (wrapper managed-to-native) object.wrapper_native_0xb6402ca0 (intptr,intptr) <IL 0x00026, 0xffffffff>
> 02-22 21:48:35.241: E/mono-rt(22718):   at Android.Runtime.JNIEnv.GetObjectRefType (intptr) [0x00000] in /Users/builder/data/lanes/monodroid-mlion-monodroid-4.20-series/ba9bbbdd/source/monodroid/src/Mono.Android/src/Runtime/JNIEnv.cs:647
> 02-22 21:48:35.241: E/mono-rt(22718):   at Android.Runtime.JNIEnv._GetObjectRefType (intptr) [0x00000] in /Users/builder/data/lanes/monodroid-mlion-monodroid-4.20-series/ba9bbbdd/source/monodroid/src/Mono.Android/src/Runtime/JNIEnv.cs:652
> 02-22 21:48:35.241: E/mono-rt(22718):   at Android.Runtime.JNIEnv.DeleteGlobalRef (intptr) [0x00006] in /Users/builder/data/lanes/monodroid-mlion-monodroid-4.20-series/ba9bbbdd/source/monodroid/src/Mono.Android/src/Runtime/JNIEnv.cs:532
> 02-22 21:48:35.241: E/mono-rt(22718):   at Java.Lang.Object.Dispose (object,intptr&,intptr,Android.Runtime.JObjectRefType) [0x0005b] in /Users/builder/data/lanes/monodroid-mlion-monodroid-4.20-series/ba9bbbdd/source/monodroid/src/Mono.Android/src/Java.Lang/Object.cs:146
> 02-22 21:48:35.241: E/mono-rt(22718):   at Java.Lang.Object.Dispose () [0x00007] in /Users/builder/data/lanes/monodroid-mlion-monodroid-4.20-series/ba9bbbdd/source/monodroid/src/Mono.Android/src/Java.Lang/Object.cs:124
> 02-22 21:48:35.241: E/mono-rt(22718):   at Android.App.SyncContext.Post (System.Threading.SendOrPostCallback,object) [0x00024] in /Users/builder/data/lanes/monodroid-mlion-monodroid-4.20-series/ba9bbbdd/source/monodroid/src/Mono.Android/src/Android.App/SyncContext.cs:18
> 02-22 21:48:35.241: E/mono-rt(22718):   at Cirrious.MvvmCross.Droid.Views.MvxAndroidMainThreadDispatcher.RequestMainThreadAction (System.Action) <IL 0x00038, 0x0015f>
> 02-22 21:48:35.241: E/mono-rt(22718):   at Cirrious.CrossCore.Core.MvxMainThreadDispatchingObject.InvokeOnMainThread (System.Action) <IL 0x0000f, 0x00067>
> 02-22 21:48:35.241: E/mono-rt(22718):   at Distech.X50.Core.ViewModels.BaseActivityViewModel.OnConnectionChanged (object,Distech.Network.Data.Portable.ConnectionStateChangedEventArgs) [0x00015] in c:\TFS\Mobile\x50\Releases\Release_2.0\Src\Distech.X50.Core\ViewModels\BaseActivityViewModel.cs:143
> 02-22 21:48:35.241: E/mono-rt(22718):   at Distech.X50.Model.Common.ConnectionServerSingleton.OnInstanceConnectionStateChanged (object,Distech.Network.Data.Portable.ConnectionStateChangedEventArgs) [0x0000f] in c:\TFS\Mobile\x50\Releases\Release_2.0\Src\Distech.X50.Model\Common\ConnectionServerSingleton.cs:133
> 02-22 21:48:35.241: E/mono-rt(22718):   at Distech.Network.Data.Portable.DataObjectServer.OnConnectionStateChanged (Distech.Network.Data.Portable.ConnectionStateChangedEventArgs) <IL 0x0005d, 0x001f6>
> 02-22 21:48:35.241: E/mono-rt(22718):   at Distech.Network.Data.Bacnet.Portable.BacnetObjectServer.OnConnectionLost (object,System.EventArgs) [0x00001] in C:\TFS\Mobile\x50\Releases\Release_2.0\Shared\Src\Portable\Distech.Network.Data.Bacnet.Portable\Entities\BacnetObjectServer.vb:700
> 02-22 21:48:35.241: E/mono-rt(22718):   at Distech.Network.Data.Portable.BcpProtocol.v3.BcpCommunicationManager.OnConnectionLost (System.EventArgs) <IL 0x0001a, 0x000a7>
> 02-22 21:48:35.241: E/mono-rt(22718):   at Distech.Network.Data.Portable.BcpProtocol.v3.BcpCommunicationManager.OnIncomingMessageManagerConnectionLost (object,System.EventArgs) <IL 0x00026, 0x000f1>
> 02-22 21:48:35.241: E/mono-rt(22718):   at Distech.Network.Data.Portable.BcpProtocol.v3.BcpIncomingMessageManager.OnConnectionLost (System.EventArgs) <IL 0x00016, 0x00075>
> 02-22 21:48:35.241: E/mono-rt(22718):   at Distech.Network.Data.Portable.BcpProtocol.v3.BcpIncomingMessageManager.CheckIncomingMessages () <IL 0x0005f, 0x002d4>
> 02-22 21:48:35.241: E/mono-rt(22718):   at System.Threading.Thread.StartInternal () <IL 0x00021, 0x0008e>
> 02-22 21:48:35.241: E/mono-rt(22718):   at (wrapper runtime-invoke) object.runtime_invoke_void__this__ (object,intptr,intptr,intptr) <IL 0x0004e, 0xffffffff>
> 02-22 21:48:35.241: E/mono-rt(22718): =================================================================
> 02-22 21:48:35.241: E/mono-rt(22718): Got a SIGSEGV while executing native code. This usually indicates
> 02-22 21:48:35.241: E/mono-rt(22718): a fatal error in the mono runtime or one of the native libraries 
> 02-22 21:48:35.241: E/mono-rt(22718): used by your application.
> 02-22 21:48:35.241: E/mono-rt(22718): =================================================================
> 02-22 21:48:35.241: A/libc(22718): Fatal signal 11 (SIGSEGV) at 0xdeadd00d (code=1), thread 24103 (Threadpool work)
Comment 8 Jonathan Pryor 2015-02-24 12:38:26 UTC
> The excessive GREFs seems to be the cause of the application crash:

No. This:

> 02-22 21:48:35.201: I/monodroid-gref(22718): Disposing handle 0x1f50056e
> 02-22 21:48:35.201: W/dalvikvm(22718): JNI WARNING: JNI method called with exception pending
> 02-22 21:48:35.201: W/dalvikvm(22718):              in Lmono/android/TypeManager;.n_activate:(Ljava/lang/String;Ljava/lang/String;Ljava/lang/Object;[Ljava/lang/Object;)V (GetObjectRefType)
> 02-22 21:48:35.201: W/dalvikvm(22718): Pending exception is:
> 02-22 21:48:35.201: I/dalvikvm(22718): android.runtime.JavaProxyThrowable: System.Threading.ThreadAbortException: Thread was being aborted

has nothing to do with hitting the GREF limit.

Somehow, for some reason, Thread.Abort() was invoked, causing a ThreadAbortException to be thrown.

Xamarin.Android doesn't use Thread.Abort(); I have no idea why it would be invoked. Please check your project for Thread.Abort() use.
Comment 9 Iliass Yousfi 2015-02-24 14:01:03 UTC
> has nothing to do with hitting the GREF limit.
You are right this log was taken from a series of logs I made before. And yes, one of our legacy dll that we took from our legacy applications and PCLized to get it work with the mobile app. It makes the call to the Thread.Abort when the Manager has lost connection:
> 02-22 21:48:35.241: E/mono-rt(22718):   at Distech.Network.Data.Portable.BcpProtocol.v3.BcpCommunicationManager.OnConnectionLost (System.EventArgs) <IL 0x0001a, 0x000a7>

The Log I wanted to show you is (Sorry for the huge logs but I wanted you to have all the info):
> 02-2413:29:01.866: D/Mono(26766): GC_MAJOR: (user request) pause 14.30ms, total 15.88ms, bridge 23.07ms major 3696K/3696K los 10411K/10411K
> 02-2413:29:01.866: D/dalvikvm(26766): GREF has increased to 2001
> 02-2413:29:01.866: W/dalvikvm(26766): JNI global reference table (0xb9b07f80) dump:
> 02-2413:29:01.866: W/dalvikvm(26766):   Last 10 entries (of 2001):
> 02-2413:29:01.866: W/dalvikvm(26766):      2000: 0xb14acf30 java.lang.String ""
> 02-2413:29:01.866: W/dalvikvm(26766):      1999: 0xb2e27fb0 mono.android.text.TextWatcherImplementor
> 02-2413:29:01.866: W/dalvikvm(26766):      1998: 0xb16d3da8 mono.java.lang.RunnableImplementor
> 02-2413:29:01.866: W/dalvikvm(26766):      1997: 0xb164a728 android.widget.RelativeLayout
> 02-2413:29:01.866: W/dalvikvm(26766):      1996: 0xb2e37260 android.content.res.TypedArray
> 02-2413:29:01.866: W/dalvikvm(26766):      1995: 0xb16d3e68 mono.java.lang.RunnableImplementor
> 02-2413:29:01.866: W/dalvikvm(26766):      1994: 0xb2e2d6d8 java.lang.ref.WeakReference
> 02-2413:29:01.866: W/dalvikvm(26766):      1993: 0xb2c4bbe0 com.android.internal.policy.impl.PhoneLayoutInflater
> 02-2413:29:01.866: W/dalvikvm(26766):      1992: 0xb2c5f300 mono.java.lang.RunnableImplementor
> 02-2413:29:01.866: W/dalvikvm(26766):      1991: 0xb1708be0 android.widget.RelativeLayout
> 02-2413:29:01.866: W/dalvikvm(26766):   Summary:
> 02-2413:29:01.866: W/dalvikvm(26766):       401 of java.lang.Class (188 unique instances)
> 02-2413:29:01.866: W/dalvikvm(26766):         5 of java.lang.String (4 unique instances)
> 02-2413:29:01.866: W/dalvikvm(26766):         1 of java.io.File
> 02-2413:29:01.866: W/dalvikvm(26766):        39 of java.lang.ref.WeakReference (39 unique instances)
> 02-2413:29:01.866: W/dalvikvm(26766):         1 of dalvik.system.PathClassLoader
> 02-2413:29:01.866: W/dalvikvm(26766):         1 of android.content.res.Configuration
> 02-2413:29:01.866: W/dalvikvm(26766):         1 of java.lang.Runtime
> 02-2413:29:01.866: W/dalvikvm(26766):         1 of android.app.ApplicationPackageManager
> 02-2413:29:01.866: W/dalvikvm(26766):         1 of android.app.ActivityThread$ApplicationThread
> 02-2413:29:01.866: W/dalvikvm(26766):         1 of android.os.Handler
> 02-2413:29:01.866: W/dalvikvm(26766):         1 of android.app.AlertDialog
> 02-2413:29:01.866: W/dalvikvm(26766):         1 of android.content.res.XmlBlock$Parser
> 02-2413:29:01.866: W/dalvikvm(26766):        17 of android.content.Intent (17 unique instances)
> 02-2413:29:01.866: W/dalvikvm(26766):         1 of android.content.res.TypedArray
> 02-2413:29:01.866: W/dalvikvm(26766):         1 of android.app.SharedPreferencesImpl
> 02-2413:29:01.866: W/dalvikvm(26766):         1 of android.content.ContentProvider$Transport
> 02-2413:29:01.866: W/dalvikvm(26766):         1 of android.content.pm.ApplicationInfo
> 02-2413:29:01.866: W/dalvikvm(26766):        13 of android.util.DisplayMetrics (13 unique instances)
> 02-2413:29:01.866: W/dalvikvm(26766):         1 of android.content.res.Resources
> 02-2413:29:01.866: W/dalvikvm(26766):       171 of android.widget.TextView (171 unique instances)
> 02-2413:29:01.866: W/dalvikvm(26766):       125 of android.graphics.drawable.BitmapDrawable (125 unique instances)
> 02-2413:29:01.866: W/dalvikvm(26766):         1 of android.hardware.display.DisplayManagerGlobal$DisplayManagerCallback
> 02-2413:29:01.866: W/dalvikvm(26766):         1 of android.hardware.input.InputManager$InputDevicesChangedListener
> 02-2413:29:01.866: W/dalvikvm(26766):         6 of android.widget.EditText (6 unique instances)
> 02-2413:29:01.866: W/dalvikvm(26766):         1 of android.os.Looper
> 02-2413:29:01.866: W/dalvikvm(26766):         2 of android.os.Bundle (2 unique instances)
> 02-2413:29:01.866: W/dalvikvm(26766):         1 of android.opengl.EGLSurface
> 02-2413:29:01.866: W/dalvikvm(26766):         1 of android.opengl.EGLContext
> 02-2413:29:01.866: W/dalvikvm(26766):         1 of android.opengl.EGLDisplay
> 02-2413:29:01.866: W/dalvikvm(26766):         1 of android.widget.FrameLayout
> 02-2413:29:01.866: W/dalvikvm(26766):       150 of android.text.SpannableStringBuilder (150 unique instances)
> 02-2413:29:01.866: W/dalvikvm(26766):         1 of android.text.TextUtils$TruncateAt
> 02-2413:29:01.866: W/dalvikvm(26766):         1 of android.view.Choreographer$FrameDisplayEventReceiver
> 02-2413:29:01.866: W/dalvikvm(26766):         2 of android.view.Display (2 unique instances)
> 02-2413:29:01.866: W/dalvikvm(26766):         1 of android.view.inputmethod.InputMethodManager$1
> 02-2413:29:01.866: W/dalvikvm(26766):        17 of android.view.MenuInflater (17 unique instances)
> 02-2413:29:01.866: W/dalvikvm(26766):         1 of android.view.inputmethod.InputMethodManager$ControlledInputConnectionWrapper
> 02-2413:29:01.866: W/dalvikvm(26766):         5 of android.view.ViewRootImpl$W (5 unique instances)
> 02-2413:29:01.866: W/dalvikvm(26766):         2 of android.view.WindowManagerImpl (2 unique instances)
> 02-2413:29:01.866: W/dalvikvm(26766):         1 of android.view.accessibility.AccessibilityManager$1
> 02-2413:29:01.866: W/dalvikvm(26766):         1 of android.widget.Button
> 02-2413:29:01.866: W/dalvikvm(26766):         2 of android.widget.CheckBox (2 unique instances)
> 02-2413:29:01.866: W/dalvikvm(26766):        11 of android.widget.TableRow (11 unique instances)
> 02-2413:29:01.866: W/dalvikvm(26766):       112 of android.widget.AbsListView$LayoutParams (112 unique instances)
> 02-2413:29:01.866: W/dalvikvm(26766):         4 of android.widget.AbsListView$AdapterDataSetObserver (4 unique instances)
> 02-2413:29:01.866: W/dalvikvm(26766):         1 of android.widget.FrameLayout$LayoutParams
> 02-2413:29:01.866: W/dalvikvm(26766):        16 of android.widget.ImageView (16 unique instances)
> 02-2413:29:01.866: W/dalvikvm(26766):        32 of android.widget.LinearLayout (32 unique instances)
> 02-2413:29:01.866: W/dalvikvm(26766):         1 of android.widget.TableLayout
> 02-2413:29:01.866: W/dalvikvm(26766):         2 of android.widget.Spinner (2 unique instances)
> 02-2413:29:01.866: W/dalvikvm(26766):       114 of android.widget.RelativeLayout (114 unique instances)
> 02-2413:29:01.866: W/dalvikvm(26766):        17 of com.android.internal.view.menu.MenuBuilder (17 unique instances)
> 02-2413:29:01.866: W/dalvikvm(26766):         1 of android.widget.ScrollView
> 02-2413:29:01.866: W/dalvikvm(26766):        18 of com.android.internal.policy.impl.PhoneLayoutInflater (18 unique instances)
> 02-2413:29:01.866: W/dalvikvm(26766):        17 of com.android.internal.app.ActionBarImpl (17 unique instances)
> 02-2413:29:01.866: W/dalvikvm(26766):       160 of com.android.internal.view.menu.MenuItemImpl (160 unique instances)
> 02-2413:29:01.866: W/dalvikvm(26766):         8 of com.android.internal.view.menu.ActionMenuItem (8 unique instances)
> 02-2413:29:01.866: W/dalvikvm(26766):         1 of java.net.Proxy
> 02-2413:29:01.866: W/dalvikvm(26766):         1 of java.net.ProxySelectorImpl
> 02-2413:29:01.866: W/dalvikvm(26766):        14 of distech.x50.ui.droid.views.X50MenuViewAdapter (14 unique instances)
> 02-2413:29:01.866: W/dalvikvm(26766):       151 of mono.android.text.TextWatcherImplementor (151 unique instances)
> 02-2413:29:01.866: W/dalvikvm(26766):         8 of mono.java.lang.RunnableImplementor (8 unique instances)
> 02-2413:29:01.866: W/dalvikvm(26766):         1 of distech.x50.ui.droid.views.ConnectionView
> 02-2413:29:01.866: W/dalvikvm(26766):         1 of android.widget.Switch
> 02-2413:29:01.866: W/dalvikvm(26766):         1 of mono.android.widget.AdapterView_OnItemLongClickListenerImplementor
> 02-2413:29:01.866: W/dalvikvm(26766):         1 of mono.android.app.Application
> 02-2413:29:01.866: W/dalvikvm(26766):         1 of cirrious.mvvmcross.binding.droid.binders.MvxBindingLayoutInflatorFactory
> 02-2413:29:01.866: W/dalvikvm(26766):         2 of cirrious.mvvmcross.binding.droid.views.MvxAdapter (2 unique instances)
> 02-2413:29:01.866: W/dalvikvm(26766):         3 of mono.android.widget.AdapterView_OnItemClickListenerImplementor (3 unique instances)
> 02-2413:29:01.866: W/dalvikvm(26766):        16 of cirrious.mvvmcross.binding.droid.views.MvxGridView (16 unique instances)
> 02-2413:29:01.866: W/dalvikvm(26766):         2 of distech.x50.ui.droid.specialadapters.SpinnerAdapter (2 unique instances)
> 02-2413:29:01.866: W/dalvikvm(26766):         2 of mono.android.widget.AdapterView_OnItemSelectedListenerImplementor (2 unique instances)
> 02-2413:29:01.866: W/dalvikvm(26766):         3 of mono.android.widget.CompoundButton_OnCheckedChangeListenerImplementor (3 unique instances)
> 02-2413:29:01.866: W/dalvikvm(26766):         1 of mono.android.content.DialogInterface_OnClickListenerImplementor
> 02-2413:29:01.866: W/dalvikvm(26766):         1 of distech.x50.ui.droid.views.NetworkView
> 02-2413:29:01.866: W/dalvikvm(26766):       114 of mono.android.view.View_OnClickListenerImplementor (114 unique instances)
> 02-2413:29:01.866: W/dalvikvm(26766):         7 of com.android.internal.app.ActionBarImpl$TabImpl (7 unique instances)
> 02-2413:29:01.866: W/dalvikvm(26766):       134 of cirrious.mvvmcross.binding.droid.views.MvxListItemView (134 unique instances)
> 02-2413:29:01.866: W/dalvikvm(26766):        14 of distech.x50.ui.droid.views.X50View (14 unique instances)
> 02-2413:29:01.866: W/dalvikvm(26766):        14 of mono.android.view.View_OnLayoutChangeListenerImplementor (14 unique instances)
> 02-2413:29:01.866: W/dalvikvm(26766):         1 of distech.x50.ui.droid.views.BasePointsView_1_ColorAlternateAdapter
> 02-2413:29:01.866: W/dalvikvm(26766):         1 of cirrious.mvvmcross.binding.droid.views.MvxListView
> 02-2413:29:01.866: W/dalvikvm(26766):         1 of distech.x50.ui.droid.views.PointsView
> 02-2413:29:01.866: W/dalvikvm(26766):         7 of mono.android.app.TabEventDispatcher (7 unique instances)
> 02-2413:29:01.866: E/dalvikvm(26766): Excessive JNI global references (2001)
> 02-2413:29:01.866: I/dalvikvm(26766): "main" prio=5 tid=1 RUNNABLE
> 02-2413:29:01.866: I/dalvikvm(26766):   | group="main" sCount=0 dsCount=0 obj=0xb0f2d480 self=0xb7eed1e0
> 02-2413:29:01.866: I/dalvikvm(26766):   | sysTid=26766 nice=0 sched=0/0 cgrp=[fopen-error:2] handle=-1216700384
> 02-2413:29:01.866: I/dalvikvm(26766):   | state=R schedstat=( 0 0 0 ) utm=517 stm=1806 core=0
> 02-2413:29:01.866: I/dalvikvm(26766):   at cirrious.mvvmcross.binding.droid.binders.MvxBindingLayoutInflatorFactory.n_onCreateView(Native Method)
> 02-2413:29:01.866: I/dalvikvm(26766):   at cirrious.mvvmcross.binding.droid.binders.MvxBindingLayoutInflatorFactory.onCreateView(MvxBindingLayoutInflatorFactory.java:29)
> 02-2413:29:01.866: I/dalvikvm(26766):   at android.view.LayoutInflater.createViewFromTag(LayoutInflater.java:685)
> 02-2413:29:01.866: I/dalvikvm(26766):   at android.view.LayoutInflater.rInflate(LayoutInflater.java:755)
> 02-2413:29:01.866: I/dalvikvm(26766):   at android.view.LayoutInflater.inflate(LayoutInflater.java:492)
> 02-2413:29:01.866: I/dalvikvm(26766):   at android.view.LayoutInflater.inflate(LayoutInflater.java:397)
> 02-2413:29:01.866: I/dalvikvm(26766):   at distech.x50.ui.droid.views.X50MenuViewAdapter.n_getView(Native Method)
> 02-2413:29:01.866: I/dalvikvm(26766):   at distech.x50.ui.droid.views.X50MenuViewAdapter.getView(X50MenuViewAdapter.java:35)
> 02-2413:29:01.866: I/dalvikvm(26766):   at android.widget.AbsListView.obtainView(AbsListView.java:2177)
> 02-2413:29:01.866: I/dalvikvm(26766):   at android.widget.GridView.onMeasure(GridView.java:1040)
> 02-2413:29:01.906: I/dalvikvm(26766):   at android.view.View.measure(View.java:15848)
> 02-2413:29:01.906: I/dalvikvm(26766):   at android.view.ViewGroup.measureChildWithMargins(ViewGroup.java:5012)
> 02-2413:29:01.906: I/dalvikvm(26766):   at android.widget.LinearLayout.measureChildBeforeLayout(LinearLayout.java:1404)
> 02-2413:29:01.906: I/dalvikvm(26766):   at android.widget.LinearLayout.measureHorizontal(LinearLayout.java:1052)
> 02-2413:29:01.906: I/dalvikvm(26766):   at android.widget.LinearLayout.onMeasure(LinearLayout.java:590)
> 02-2413:29:01.906: I/dalvikvm(26766):   at android.view.View.measure(View.java:15848)
> 02-2413:29:01.906: I/dalvikvm(26766):   at android.view.ViewGroup.measureChildWithMargins(ViewGroup.java:5012)
> 02-2413:29:01.906: I/dalvikvm(26766):   at android.widget.FrameLayout.onMeasure(FrameLayout.java:310)
> 02-2413:29:01.906: I/dalvikvm(26766):   at android.view.View.measure(View.java:15848)
> 02-2413:29:01.906: I/dalvikvm(26766):   at android.view.ViewGroup.measureChildWithMargins(ViewGroup.java:5012)
> 02-2413:29:01.906: I/dalvikvm(26766):   at com.android.internal.widget.ActionBarOverlayLayout.onMeasure(ActionBarOverlayLayout.java:302)
> 02-2413:29:01.906: I/dalvikvm(26766):   at android.view.View.measure(View.java:15848)
> 02-2413:29:01.906: I/dalvikvm(26766):   at android.view.ViewGroup.measureChildWithMargins(ViewGroup.java:5012)
> 02-2413:29:01.906: I/dalvikvm(26766):   at android.widget.FrameLayout.onMeasure(FrameLayout.java:310)
> 02-2413:29:01.926: I/dalvikvm(26766):   at com.android.internal.policy.impl.PhoneWindow$DecorView.onMeasure(PhoneWindow.java:2189)
> 02-2413:29:01.926: I/dalvikvm(26766):   at android.view.View.measure(View.java:15848)
> 02-2413:29:01.926: I/dalvikvm(26766):   at android.view.ViewRootImpl.performMeasure(ViewRootImpl.java:1905)
> 02-2413:29:01.926: I/dalvikvm(26766):   at android.view.ViewRootImpl.measureHierarchy(ViewRootImpl.java:1104)
> 02-2413:29:01.926: I/dalvikvm(26766):   at android.view.ViewRootImpl.performTraversals(ViewRootImpl.java:1284)
> 02-2413:29:01.926: I/dalvikvm(26766):   at android.view.ViewRootImpl.doTraversal(ViewRootImpl.java:1004)
> 02-2413:29:01.926: I/dalvikvm(26766):   at android.view.ViewRootImpl$TraversalRunnable.run(ViewRootImpl.java:5481)
> 02-2413:29:01.926: I/dalvikvm(26766):   at android.view.Choreographer$CallbackRecord.run(Choreographer.java:749)
> 02-2413:29:01.926: I/dalvikvm(26766):   at android.view.Choreographer.doCallbacks(Choreographer.java:562)
> 02-2413:29:01.926: I/dalvikvm(26766):   at android.view.Choreographer.doFrame(Choreographer.java:532)
> 02-2413:29:01.926: I/dalvikvm(26766):   at android.view.Choreographer$FrameDisplayEventReceiver.run(Choreographer.java:735)
> 02-2413:29:01.926: I/dalvikvm(26766):   at android.os.Handler.handleCallback(Handler.java:730)
> 02-2413:29:01.926: I/dalvikvm(26766):   at android.os.Handler.dispatchMessage(Handler.java:92)
> 02-2413:29:01.926: I/dalvikvm(26766):   at android.os.Looper.loop(Looper.java:137)
> 02-2413:29:01.926: I/dalvikvm(26766):   at android.app.ActivityThread.main(ActivityThread.java:5103)
> 02-2413:29:01.926: I/dalvikvm(26766):   at java.lang.reflect.Method.invokeNative(Native Method)
> 02-2413:29:01.926: I/dalvikvm(26766):   at java.lang.reflect.Method.invoke(Method.java:525)
> 02-2413:29:01.926: I/dalvikvm(26766):   at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:737)
> 02-2413:29:01.926: I/dalvikvm(26766):   at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:553)
> 02-2413:29:01.926: I/dalvikvm(26766):   at dalvik.system.NativeStart.main(Native Method)
> 02-2413:29:01.926: E/dalvikvm(26766): VM aborting
> 02-2413:29:01.926: E/mono-rt(26766): Stacktrace:
> 02-2413:29:01.926: E/mono-rt(26766):   at <unknown> <0xffffffff>
> 02-2413:29:01.926: E/mono-rt(26766):   at (wrapper managed-to-native) object.wrapper_native_0xb63cc920 (intptr,intptr) <0xffffffff>
> 02-2413:29:01.926: E/mono-rt(26766):   at Android.Runtime.JNIEnv.NewGlobalRef (intptr) <0x0003a>
> 02-2413:29:01.926: E/mono-rt(26766):   at Java.Lang.Object.RegisterInstance (Android.Runtime.IJavaObject,intptr,Android.Runtime.JniHandleOwnership,intptr&) <0x00067>
> 02-2413:29:01.926: E/mono-rt(26766):   at Java.Lang.Object.SetHandle (intptr,Android.Runtime.JniHandleOwnership) <0x00023>
> 02-2413:29:01.926: E/mono-rt(26766):   at Java.Lang.String..ctor (string) <0x0024f>
> 02-2413:29:01.926: E/mono-rt(26766):   at Android.Widget.TextView.set_Text (string) <0x0002f>
> 02-2413:29:01.926: E/mono-rt(26766):   at Cirrious.MvvmCross.Binding.Droid.Target.MvxTextViewTextTargetBinding.SetValueImpl (object,object) <0x00047>
> 02-2413:29:01.926: E/mono-rt(26766):   at Cirrious.MvvmCross.Binding.Bindings.Target.MvxConvertingTargetBinding.SetValue (object) <0x0014c>
> 02-2413:29:01.926: E/mono-rt(26766):   at Cirrious.MvvmCross.Binding.Bindings.MvxFullBinding.UpdateTargetFromSource (object) <0x00069>
> 02-2413:29:01.926: E/mono-rt(26766):   at Cirrious.MvvmCross.Binding.Bindings.MvxFullBinding.UpdateTargetOnBind () <0x0005f>
> 02-2413:29:01.926: E/mono-rt(26766):   at Cirrious.MvvmCross.Binding.Bindings.MvxFullBinding.CreateSourceBinding (object) <0x0018b>
> 02-2413:29:01.926: E/mono-rt(26766):   at Cirrious.MvvmCross.Binding.Bindings.MvxFullBinding..ctor (Cirrious.MvvmCross.Binding.MvxBindingRequest) <0x0005b>
> 02-2413:29:01.926: E/mono-rt(26766):   at Cirrious.MvvmCross.Binding.Binders.MvxFromTextBinder.BindSingle (Cirrious.MvvmCross.Binding.MvxBindingRequest) <0x00027>
> 02-2413:29:01.926: E/mono-rt(26766):   at Cirrious.MvvmCross.Binding.Binders.MvxFromTextBinder/<>c__DisplayClass1.<Bind>b__0 (Cirrious.MvvmCross.Binding.Bindings.MvxBindingDescription) <0x00053>
> 02-2413:29:01.926: E/mono-rt(26766):   at System.Linq.Enumerable/<CreateSelectIterator>c__Iterator10`2.MoveNext () <0x0012d>
> 02-2413:29:01.926: E/mono-rt(26766):   at System.Collections.Generic.List`1.AddEnumerable (System.Collections.Generic.IEnumerable`1<T>) <0x0008f>
> 02-2413:29:01.926: E/mono-rt(26766):   at System.Collections.Generic.List`1.AddRange (System.Collections.Generic.IEnumerable`1<T>) <0x00063>
> 02-2413:29:01.926: E/mono-rt(26766):   at Cirrious.MvvmCross.Binding.Droid.Binders.MvxAndroidViewBinder.ApplyBindingsFromAttribute (Android.Views.View,Android.Content.Res.TypedArray,int) <0x00073>
> 02-2413:29:01.926: E/mono-rt(26766):   at Cirrious.MvvmCross.Binding.Droid.Binders.MvxAndroidViewBinder.BindView (Android.Views.View,Android.Content.Context,Android.Util.IAttributeSet) <0x000a7>
> 02-2413:29:01.926: E/mono-rt(26766):   at Cirrious.MvvmCross.Binding.Droid.Binders.MvxBindingLayoutInflatorFactory.OnCreateView (string,Android.Content.Context,Android.Util.IAttributeSet) <0x00074>
> 02-2413:29:01.926: E/mono-rt(26766):   at Android.Views.LayoutInflater/IFactoryInvoker.n_OnCreateView_Ljava_lang_String_Landroid_content_Context_Landroid_util_AttributeSet_ (intptr,intptr,intptr,intptr,intptr) <0x00079>
> 02-2413:29:01.926: E/mono-rt(26766):   at (wrapper dynamic-method) object.dc5b93f6-1fe8-49fc-8921-28f3cf5cb362 (intptr,intptr,intptr,intptr,intptr) <0x00023>
> 02-2413:29:01.926: E/mono-rt(26766):   at (wrapper native-to-managed) object.dc5b93f6-1fe8-49fc-8921-28f3cf5cb362 (intptr,intptr,intptr,intptr,intptr) <0xffffffff>
> 02-2413:29:01.926: E/mono-rt(26766):   at <unknown> <0xffffffff>
> 02-2413:29:01.926: E/mono-rt(26766):   at (wrapper managed-to-native) object.wrapper_native_0xb63cbaf0 (intptr,intptr,intptr,Android.Runtime.JValue[]) <0xffffffff>
> 02-2413:29:01.926: E/mono-rt(26766):   at Android.Runtime.JNIEnv.CallObjectMethod (intptr,intptr,Android.Runtime.JValue[]) <0x00068>
> 02-2413:29:01.926: E/mono-rt(26766):   at Android.Views.LayoutInflater.Inflate (int,Android.Views.ViewGroup,bool) <0x00193>
> 02-2413:29:01.926: E/mono-rt(26766):   at Cirrious.MvvmCross.Binding.Droid.BindingContext.MvxAndroidBindingContext.CommonInflate (int,Android.Views.ViewGroup,Cirrious.MvvmCross.Binding.Droid.Binders.IMvxLayoutInfactorFactory,bool) <0x000a2>
> 02-2413:29:01.926: E/mono-rt(26766):   at Cirrious.MvvmCross.Binding.Droid.BindingContext.MvxAndroidBindingContext.BindingInflate (int,Android.Views.ViewGroup,bool) <0x00043>
> 02-2413:29:01.926: E/mono-rt(26766):   at Cirrious.MvvmCross.Binding.Droid.BindingContext.MvxAndroidBindingContext.BindingInflate (int,Android.Views.ViewGroup) <0x0001b>
> 02-2413:29:01.926: E/mono-rt(26766):   at Cirrious.MvvmCross.Binding.Droid.Views.MvxListItemView..ctor (Android.Content.Context,Cirrious.MvvmCross.Binding.Droid.Views.IMvxLayoutInflater,object,int) <0x00037>
> 02-2413:29:01.926: E/mono-rt(26766):   at Cirrious.MvvmCross.Binding.Droid.Views.MvxAdapter.CreateBindableView (object,int) <0x00053>
> 02-2413:29:01.926: E/mono-rt(26766):   at Cirrious.MvvmCross.Binding.Droid.Views.MvxAdapter.GetBindableView (Android.Views.View,object,int) <0x000ec>
> 02-2413:29:01.926: E/mono-rt(26766):   at Cirrious.MvvmCross.Binding.Droid.Views.MvxAdapter.GetView (int,Android.Views.View,Android.Views.ViewGroup,int) <0x00065>
> 02-2413:29:01.926: E/mono-rt(26766):   at Cirrious.MvvmCross.Binding.Droid.Views.MvxAdapter.GetView (int,Android.Views.View,Android.Views.ViewGroup) <0x00052>
> 02-2413:29:01.926: E/mono-rt(26766):   at Distech.X50.UI.Droid.Views.X50MenuViewAdapter.GetView (int,Android.Views.View,Android.Views.ViewGroup) <0x0001b>
> 02-2413:29:01.926: E/mono-rt(26766):   at Android.Widget.BaseAdapter.n_GetView_ILandroid_view_View_Landroid_view_ViewGroup_ (intptr,intptr,int,intptr,intptr) <0x00064>
> 02-2413:29:01.926: E/mono-rt(26766):   at (wrapper dynamic-method) object.ffcd6903-31ec-4ea2-9cea-8ec1c120fb20 (intptr,intptr,int,intptr,intptr) <0x00023>
> 02-2413:29:01.926: E/mono-rt(26766):   at (wrapper native-to-managed) object.ffcd6903-31ec-4ea2-9cea-8ec1c120fb20 (intptr,intptr,int,intptr,intptr) <0xffffffff>
> 02-2413:29:01.926: E/mono-rt(26766): =================================================================
> 02-2413:29:01.926: E/mono-rt(26766): Got a SIGSEGV while executing native code. This usually indicates
> 02-2413:29:01.926: E/mono-rt(26766): a fatal error in the mono runtime or one of the native libraries 
> 02-2413:29:01.926: E/mono-rt(26766): used by your application.
> 02-2413:29:01.926: E/mono-rt(26766): =================================================================
> 02-2413:29:01.926: A/libc(26766): Fatal signal 11 (SIGSEGV) at 0xdeadd00d (code=1), thread 26766 (ch.x50.ui.droid)
Comment 10 Jonathan Pryor 2015-02-24 14:16:59 UTC
> It makes the call to the Thread.Abort when the Manager has lost connection:

BAD LIB! BAD!

http://blog.mischel.com/2013/09/16/do-not-suspend-or-abort-threads/
https://msdn.microsoft.com/en-us/library/1c9txz50(v=vs.110).aspx

Nice tidbit from MSDN:

> Don't use Thread.Abort to terminate other threads. Calling Abort on another thread
> is akin to throwing an exception on that thread, without knowing what point that 
> thread has reached in its processing.

Pity the Thread.Abort() docs don't say that...

> The Log I wanted to show you is (Sorry for the huge logs but I wanted you to have all the info):
> 02-2413:29:01.866: D/Mono(26766): GC_MAJOR: (user request) pause 14.30ms, total 15.88ms, bridge 23.07ms major 3696K/3696K los 10411K/10411K
> 02-2413:29:01.866: D/dalvikvm(26766): GREF has increased to 2001
> 02-2413:29:01.866: W/dalvikvm(26766): JNI global reference table (0xb9b07f80) dump:

Indeed, THAT is a GREF overflow.

is this on the emulator or hardware? (What manufacturer decided to mis-compile Android this time?)

Related:

https://bugzilla.xamarin.com/show_bug.cgi?id=26685#c7
Comment 11 Iliass Yousfi 2015-02-24 14:41:33 UTC
> Pity the Thread.Abort() docs don't say that...
Absolutely right :-(

> is this on the emulator or hardware?
This was on the emulator (gref limit is 2000 and  know that mono try to call GC once we approach that)
The worst is that we (our test team) can reproduce it easily on a Samsung Galaxy Tab 3 GT-P5210 with KitKat 442. even on Nexus9 with Lolipop on it
Comment 12 Jonathan Pryor 2015-02-24 15:17:09 UTC
> The worst is that we (our test team) can reproduce it easily on a Samsung Galaxy Tab 3

They can reproduce *what*? There are two crashes here, the ThreadAbortException from Comment #7 and the GREF limit from Comment #9.

Aside: How on earth are you getting *401* Class instances created?

> 02-2413:29:01.866: W/dalvikvm(26766):       401 of java.lang.Class (188 unique instances)

I'll try to see if our Nexus 9 also exhibits a 2000 GREF limit, but I haven't heard of that happening before...
Comment 13 Jonathan Pryor 2015-02-24 15:49:17 UTC
> I'll try to see if our Nexus 9 also exhibits a 2000 GREF limit

It does not; our Nexus 9 running Android Lollipop is able to create 50951 GREFs before aborting the process:

    var ints = new List<Java.Lang.Integer>();
    for (int i = 0; i < int.MaxValue; ++i)
        ints.Add (new Java.Lang.Integer (i));
Comment 14 Iliass Yousfi 2015-02-24 15:55:45 UTC
>They can reproduce *what*? There are two crashes here, the ThreadAbortException from Comment #7 and the GREF limit from Comment #9.
I am talking about the GREF Limit. But on the logcat I can see the following :

> 02-24 15:24:31.595: W/monodroid-gc(15870): GREF GC Threshold: 46800
which mean that the gref limit has been almost reached but

i am trying to get a log from that tablet that is not too much contaminated by diiferent tags on it

> How on earth are you getting *401* Class instances created
Those are the classes created on the whole mobile device at the dump. Isn't it?
Comment 15 Iliass Yousfi 2015-02-24 15:58:47 UTC
Sorry for missing, the above log 
> 02-24 15:24:31.595: W/monodroid-gc(15870): GREF GC Threshold: 46800
is on the galaxy tab 3
Comment 16 Jonathan Pryor 2015-02-24 16:26:45 UTC
> > 02-24 15:24:31.595: W/monodroid-gc(15870): GREF GC Threshold: 46800
> which mean that the gref limit has been almost reached but

No; the above message is advisory, as part of the Xamarin.Android process startup code. The above "GC Threshold" message means "when Xamarin.Android believes that 46800 GREFs exist at the same time, an automatic GC.Collect() will be performed."

Note that Xamarin.Android only knows about GREFs created by Xamarin.Android, so if other native libraries create GREFs these can't be counted.

It also assumes that the instances can be collected; if they can't be, such as in Comment #13, then the process will crash when all GREFs are exhausted.

Finally, you *never* want to actually hit that GREF threshold value. If you have that many GREFs alive at once, GC times will suck (probably *seconds* per GC), resulting in an unresponsive app. That's a sign that something "bad" is going on, alongside rethinking app architecture (more Adapters, probably).

> > How on earth are you getting *401* Class instances created
> Those are the classes created on the whole mobile device at the dump. Isn't it?

Those are java.lang.Class instances for the process which crashed. It means that Java.Lang.Class.FromType() or JNIEnv.FindClass() were called 401 times for 188 unique classes, which seems a tad odd. Normally a JNIEnv.FindClass() is done within the static constructor of every Java class which is bound AND USED, so this implies that you're using at least 188 different/unique classes, which isn't necessarily bad per-se... Though I can't explain the other 213 Class instances.
Comment 17 Iliass Yousfi 2015-02-24 17:48:00 UTC
Thank you Jon for those explanations.

> Those are java.lang.Class instances for the process which crashed
Our app is using several libraries, and is based on MvvmCross (as you could see), and the initialization process have a lot of instance created up at the start, and the dump was snapshot after drilling down and up into the application...

I was suspecting (I may still be) the GREF threshold on the galaxy tab, but once I tried to enable CheckJNI flag and play around on the app in debug mode, it doesn't point on that as on the emulator (with smaller GREF limit).
I could make it crash again with a different log that honnestly I cannot figure out what it did beside the SEGSVR on the mono-rt:

> 02-2417:25:30.265: E/mono-rt(19948): Stacktrace:
> 02-2417:25:30.265: E/mono-rt(19948): =================================================================
> 02-2417:25:30.265: E/mono-rt(19948): Got a SIGSEGV while executing native code. This usually indicates
> 02-2417:25:30.265: E/mono-rt(19948): a fatal error in the mono runtime or one of the native libraries 
> 02-2417:25:30.265: E/mono-rt(19948): used by your application.
> 02-2417:25:30.265: E/mono-rt(19948): =================================================================
> 02-2417:25:30.265: A/libc(19948): Fatal signal 11 (SIGSEGV) at 0x3f7ffff4 (code=1), thread 19948 (ch.x50.ui.droid)
> 02-2417:25:30.325: I/DEBUG(16949): *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** ***
> 02-2417:25:30.325: I/DEBUG(16949): Build fingerprint: 'samsung/santos10wifixx/santos10wifi:4.4.2/KOT49H/P5210XXUBNK2:user/release-keys'
> 02-2417:25:30.325: I/DEBUG(16949): Revision: '0'
> 02-2417:25:30.325: I/DEBUG(16949): pid: 19948, tid: 19948, name: ch.x50.ui.droid  >>> com.distech.x50.ui.droid <<<
> 02-2417:25:30.325: I/DEBUG(16949): signal 11 (SIGSEGV), code 1 (SEGV_MAPERR), fault addr 3f7ffff4
> 02-2417:25:30.535: D/KeyguardUpdateMonitor(2494): sendKeyguardVisibilityChanged(true)
> 02-2417:25:30.535: I/KeyguardUpdateMonitor(2494): visibility is same
> 02-2417:25:30.535: D/KeyguardUpdateMonitor(2494): sendKeyguardVisibilityChanged(true)
> 02-2417:25:30.535: I/KeyguardUpdateMonitor(2494): visibility is same
> 02-2417:25:30.535: D/CustomFrequencyManagerService(2328): releaseDVFSLockLocked : Getting Lock type frm List : DVFS_MIN_LIMIT  frequency : 1600000  uid : 1000  pid : 2328  tag : ACTIVITY_RESUME_BOOSTER@5
> 02-2417:25:30.535: W/ActivityManager(2328): mDVFSHelper.release()
> 02-2417:25:30.535: D/CustomFrequencyManagerService(2328): acquireDVFSLockLocked : type : DVFS_MIN_LIMIT  frequency : 1600000  uid : 1000  pid : 2328  pkgName : ACTIVITY_RESUME_BOOSTER@9
> 02-2417:25:30.545: I/SurfaceFlinger(1889): Device Built-in Screen -> ls 0 
> 02-2417:25:30.545: I/SurfaceFlinger(1889): Device Built-in Screen -> ls 0 
> 02-2417:25:30.545: I/SurfaceFlinger(1889): Device Built-in Screen -> ls 0 
> 02-2417:25:30.545: E/IMGSRV(1889): :0: PVRDRMOpen: TP3, ret = 56
> 02-2417:25:30.545: I/SurfaceFlinger(1889): Device Built-in Screen -> ls 0 
> 02-2417:25:30.555: D/KeyguardUpdateMonitor(2494): sendKeyguardVisibilityChanged(true)
> 02-2417:25:30.555: I/KeyguardUpdateMonitor(2494): visibility is same
> 02-2417:25:30.835: D/CustomFrequencyManagerService(2328): releaseDVFSLockLocked : Getting Lock type frm List : DVFS_MIN_LIMIT  frequency : 1600000  uid : 1000  pid : 2328  tag : ACTIVITY_RESUME_BOOSTER@9
> 02-2417:25:30.975: I/DEBUG(16949):     eax 3f800000  ebx 4018fe74  ecx 00000000  edx 00000000
> 02-2417:25:30.975: I/DEBUG(16949):     esi 6decfd14  edi 00000000
> 02-2417:25:30.975: I/DEBUG(16949):     xcs 00000073  xds 0000007b  xes 0000007b  xfs 00000000  xss 0000007b
> 02-2417:25:30.975: I/DEBUG(16949):     eip 40180838  ebp 3f7ffff0  esp bfe95d70  flags 00210246
> 02-2417:25:30.985: I/DEBUG(16949): backtrace:
> 02-2417:25:30.985: I/DEBUG(16949):     #00  pc 0001b838  /system/lib/libutils.so
> 02-2417:25:30.985: I/DEBUG(16949):     #01  pc 0001bbce  /system/lib/libutils.so
> 02-2417:25:30.985: I/DEBUG(16949):     #02  pc 0001de71  /system/lib/libhwui.so
> 02-2417:25:30.985: I/DEBUG(16949):     #03  pc 0001e0ec  /system/lib/libhwui.so
> 02-2417:25:30.985: I/DEBUG(16949):     #04  pc 000aa54b  /system/lib/libandroid_runtime.so
> 02-2417:25:30.985: I/DEBUG(16949):     #05  pc 00083335  /system/lib/libdvm.so
> 02-2417:25:30.985: I/DEBUG(16949):     #06  pc 00002f3f  <unknown>
> 02-2417:25:30.985: I/DEBUG(16949):     #07  pc 000e06dc  /system/lib/libdvm.so
> 02-2417:25:30.985: I/DEBUG(16949):     #08  pc 00237c79  /system/lib/libdvm.so
> 02-2417:25:30.985: I/DEBUG(16949):     #09  pc 00008743  <unknown>
> 02-2417:25:30.985: I/DEBUG(16949):     #10  pc 00098c80  /system/lib/libdvm.so
> 02-2417:25:30.985: I/DEBUG(16949):     #11  pc 000948c1  /system/lib/libdvm.so
> 02-2417:25:30.985: I/DEBUG(16949):     #12  pc 00113798  /system/lib/libdvm.so
> 02-2417:25:30.985: I/DEBUG(16949):     #13  pc 00126c69  /system/lib/libdvm.so
> 02-2417:25:30.985: I/DEBUG(16949):     #14  pc 00237c79  /system/lib/libdvm.so
> 02-2417:25:30.985: I/DEBUG(16949):     #15  pc 00008e9b  <unknown>
> 02-2417:25:30.985: I/DEBUG(16949):     #16  pc 00098c80  /system/lib/libdvm.so
> 02-2417:25:30.985: I/DEBUG(16949):     #17  pc 000948c1  /system/lib/libdvm.so
> 02-2417:25:30.985: I/DEBUG(16949):     #18  pc 001144ae  /system/lib/libdvm.so
> 02-2417:25:30.985: I/DEBUG(16949):     #19  pc 000d47ad  /system/lib/libdvm.so
> 02-2417:25:30.985: I/DEBUG(16949):     #20  pc 000624ba  /system/lib/libandroid_runtime.so
> 02-2417:25:30.985: I/DEBUG(16949):     #21  pc 000647a4  /system/lib/libandroid_runtime.so
> 02-2417:25:30.985: I/DEBUG(16949):     #22  pc 00000f14  /system/bin/app_process
> 02-2417:25:30.985: I/DEBUG(16949):     #23  pc 0001dd4a  /system/lib/libc.so
> 02-2417:25:30.985: I/DEBUG(16949):     #24  pc 00001206  /system/bin/app_process
> 02-2417:25:30.985: I/DEBUG(16949): stack:
> 02-2417:25:30.985: I/DEBUG(16949):          bfe95d30  00000000  
> 02-2417:25:30.985: I/DEBUG(16949):          bfe95d34  00000000  
> 02-2417:25:30.985: I/DEBUG(16949):          bfe95d38  00000000  
> 02-2417:25:30.985: I/DEBUG(16949):          bfe95d3c  00000000  
> 02-2417:25:30.985: I/DEBUG(16949):          bfe95d40  00000000  
> 02-2417:25:30.995: I/DEBUG(16949):          bfe95d44  00000000  
> 02-2417:25:30.995: I/DEBUG(16949):          bfe95d48  00000000  
> 02-2417:25:30.995: I/DEBUG(16949):          bfe95d4c  00000000  
> 02-2417:25:30.995: I/DEBUG(16949):          bfe95d50  00000000  
> 02-2417:25:30.995: I/DEBUG(16949):          bfe95d54  00000000  
> 02-2417:25:30.995: I/DEBUG(16949):          bfe95d58  00000000  
> 02-2417:25:30.995: I/DEBUG(16949):          bfe95d5c  00000000  
> 02-2417:25:30.995: I/DEBUG(16949):          bfe95d60  00000000  
> 02-2417:25:30.995: I/DEBUG(16949):          bfe95d64  00000000  
> 02-2417:25:30.995: I/DEBUG(16949):          bfe95d68  00000000  
> 02-2417:25:30.995: I/DEBUG(16949):          bfe95d6c  00000000  
> 02-2417:25:30.995: I/DEBUG(16949):     #00  bfe95d70  6b7d6580  
> 02-2417:25:30.995: I/DEBUG(16949):          bfe95d74  00000010  
> 02-2417:25:30.995: I/DEBUG(16949):          bfe95d78  419b5a2c  /system/lib/libhwui.so
> 02-2417:25:30.995: I/DEBUG(16949):          bfe95d7c  4198738c  /system/lib/libhwui.so
> 02-2417:25:30.995: I/DEBUG(16949):          bfe95d80  00000000  
> 02-2417:25:30.995: I/DEBUG(16949):          bfe95d84  40039000  
> 02-2417:25:30.995: I/DEBUG(16949):          bfe95d88  00000000  
> 02-2417:25:30.995: I/DEBUG(16949):          bfe95d8c  6b7d6580  
> 02-2417:25:30.995: I/DEBUG(16949):          bfe95d90  6e1b0504  
> 02-2417:25:30.995: I/DEBUG(16949):          bfe95d94  6e132b30  
> 02-2417:25:30.995: I/DEBUG(16949):          bfe95d98  6a8fec20  
> 02-2417:25:30.995: I/DEBUG(16949):          bfe95d9c  419b5a2c  /system/lib/libhwui.so
> 02-2417:25:30.995: I/DEBUG(16949):          bfe95da0  00000000  
> 02-2417:25:30.995: I/DEBUG(16949):          bfe95da4  00000000  
> 02-2417:25:30.995: I/DEBUG(16949):          bfe95da8  6decfcb0  
> 02-2417:25:30.995: I/DEBUG(16949):          bfe95dac  40180bcf  /system/lib/libutils.so
> 02-2417:25:30.995: I/DEBUG(16949):     #01  bfe95db0  6decfd14  
> 02-2417:25:30.995: I/DEBUG(16949):          bfe95db4  00000000  
> 02-2417:25:30.995: I/DEBUG(16949):          bfe95db8  00000000  
> 02-2417:25:30.995: I/DEBUG(16949):          bfe95dbc  419b5a2c  /system/lib/libhwui.so
> 02-2417:25:30.995: I/DEBUG(16949):          bfe95dc0  00000001  
> 02-2417:25:30.995: I/DEBUG(16949):          bfe95dc4  4012fa06  /system/lib/libstdc++.so
> 02-2417:25:30.995: I/DEBUG(16949):          bfe95dc8  419b5a2c  /system/lib/libhwui.so
> 02-2417:25:30.995: I/DEBUG(16949):          bfe95dcc  41943e72  /system/lib/libhwui.so
> 02-2417:25:30.995: I/DEBUG(16949):     #02  bfe95dd0  6decfd14  
> 02-2417:25:30.995: I/DEBUG(16949):          bfe95dd4  6bed8ed0  
> 02-2417:25:30.995: I/DEBUG(16949):          bfe95dd8  00000001  
> 02-2417:25:30.995: I/DEBUG(16949):          bfe95ddc  405ca040  /system/lib/libEGL.so
> 02-2417:25:30.995: I/DEBUG(16949):          bfe95de0  4034e300  /system/lib/libandroid_runtime.so
> 02-2417:25:30.995: I/DEBUG(16949):          bfe95de4  405356a6  /system/lib/libEGL.so
> 02-2417:25:30.995: I/DEBUG(16949):          bfe95de8  4053b909  /system/lib/libEGL.so
> 02-2417:25:30.995: I/DEBUG(16949):          bfe95dec  4034e300  /system/lib/libandroid_runtime.so
> 02-2417:25:30.995: I/DEBUG(16949):          bfe95df0  432fbf40  
> 02-2417:25:30.995: I/DEBUG(16949):          bfe95df4  6e149160  
> 02-2417:25:30.995: I/DEBUG(16949):          bfe95df8  41943a89  /system/lib/libhwui.so
> 02-2417:25:30.995: I/DEBUG(16949):          bfe95dfc  419b5a2c  /system/lib/libhwui.so
> 02-2417:25:30.995: I/DEBUG(16949):          bfe95e00  6decfcb0  
> 02-2417:25:30.995: I/DEBUG(16949):          bfe95e04  bfe95e60  [stack]
> 02-2417:25:30.995: I/DEBUG(16949):          bfe95e08  bfe95e88  [stack]
> 02-2417:25:30.995: I/DEBUG(16949):          bfe95e0c  419440ed  /system/lib/libhwui.so
> 02-2417:25:31.015: I/DEBUG(16949): memory map around fault addr 3f7ffff4:
> 02-2417:25:31.015: I/DEBUG(16949):     (no map below)
> 02-2417:25:31.015: I/DEBUG(16949):     (no map for address)
> 02-2417:25:31.015: I/DEBUG(16949):     40000000-40002000 r-x /system/bin/app_process
> 02-2417:25:31.145: I/DEBUG(16949): !@dumpstate -k -t -z -d -o /data/log/dumpstate_app_native -m 19948
> 02-2417:25:31.155: I/InputReader(2328): Touch event's action is 0x0 (deviceType=0) [pCnt=1, s=0.969 ] when=32813710767000
> 02-2417:25:31.155: I/InputDispatcher(2328): Delivering touch to: action: 0x4, toolType: 1
> 02-2417:25:31.155: I/InputDispatcher(2328): Delivering touch to: action: 0x0, toolType: 1
> 02-2417:25:31.155: W/ActivityManager(2328):   Force finishing activity com.distech.x50.ui.droid/distech.x50.ui.droid.views.X50View
> 02-2417:25:31.155: I/BootReceiver(2328): Copying /data/tombstones/tombstone_01 to DropBox (SYSTEM_TOMBSTONE)
> 02-2417:25:31.165: W/ActivityManager(2328):   Force finishing activity com.distech.x50.ui.droid/distech.x50.ui.droid.views.NetworkView
> 02-2417:25:31.165: D/PointerIcon(2328): setMouseIconStyle1 pointerType: 1001iconType:101 flag:0
> 02-2417:25:31.165: D/PointerIcon(2328): setMouseCustomIcon IconType is same.101
> 02-2417:25:31.185: I/dumpstate(20066): begin
> 02-2417:25:31.185: D/InputDispatcher(2328): Waiting for application to become ready for input: xxxx Reason: Waiting because the touched window is paused.
> 02-2417:25:31.205: D/STATUSBAR-StatusBarManagerService(2328): manageDisableList what=0x0 pkg=WindowManager.LayoutParams
> 02-2417:25:31.215: D/PointerIcon(2328): setMouseIconStyle1 pointerType: 1001iconType:101 flag:0
> 02-2417:25:31.215: D/PointerIcon(2328): setMouseCustomIcon IconType is same.101
> 02-2417:25:31.225: D/KeyguardUpdateMonitor(2494): sendKeyguardVisibilityChanged(true)
> 02-2417:25:31.225: I/KeyguardUpdateMonitor(2494): visibility is same
> 02-2417:25:31.235: I/SurfaceFlinger(1889): Device Built-in Screen -> ls 0 
> 02-2417:25:31.235: I/SurfaceFlinger(1889): Device Built-in Screen -> ls 0 
> 02-2417:25:31.235: I/SurfaceFlinger(1889): Device Built-in Screen -> ls 0 
> 02-2417:25:31.235: I/SurfaceFlinger(1889): Device Built-in Screen -> ls 0 
> 02-2417:25:31.235: D/KeyguardUpdateMonitor(2494): sendKeyguardVisibilityChanged(true)
> 02-2417:25:31.235: I/KeyguardUpdateMonitor(2494): visibility is same
> 02-2417:25:31.245: E/IMGSRV(1889): :0: PVRDRMOpen: TP3, ret = 73
> 02-2417:25:31.255: I/InputReader(2328): Touch event's action is 0x1 (deviceType=0) [pCnt=1, s=] when=32813818024000
> 02-2417:25:31.255: D/KeyguardUpdateMonitor(2494): sendKeyguardVisibilityChanged(true)
> 02-2417:25:31.255: I/BootReceiver(2328): Notify a SYSTEM_TOMBSTONE FilePath:tombstone_01
> 02-2417:25:31.265: I/KeyguardUpdateMonitor(2494): visibility is same
> 02-2417:25:31.265: D/SensorService(2328):   0.0 -7.4 6.5
> 02-2417:25:31.265: I/SurfaceFlinger(1889): Device Built-in Screen -> ls 0 
> 02-2417:25:31.265: I/SurfaceFlinger(1889): Device Built-in Screen -> ls 0 
> 02-2417:25:31.265: I/SurfaceFlinger(1889): Device Built-in Screen -> ls 0 
> 02-2417:25:31.265: I/SurfaceFlinger(1889): Device Built-in Screen -> ls 0 
> 02-2417:25:31.265: W/ContextImpl(2328): Calling a method in the system process without a qualified user: android.app.ContextImpl.sendBroadcast:1501 android.content.ContextWrapper.sendBroadcast:377 android.content.ContextWrapper.sendBroadcast:377 com.android.server.BootReceiver$2.onEvent:333 android.os.FileObserver$ObserverThread.onEvent:125 
> 02-2417:25:31.275: D/KeyguardUpdateMonitor(2494): sendKeyguardVisibilityChanged(true)
> 02-2417:25:31.275: I/KeyguardUpdateMonitor(2494): visibility is same
> 02-2417:25:31.385: D/dalvikvm(2328): GC_FOR_ALLOC freed 1190K, 14% free 23983K/27816K, paused 97ms, total 99ms
> 02-2417:25:31.395: I/SurfaceFlinger(1889): Device Built-in Screen -> ls 0 
> 02-2417:25:31.395: I/SurfaceFlinger(1889): Device Built-in Screen -> ls 0 
> 02-2417:25:31.395: I/SurfaceFlinger(1889): Device Built-in Screen -> ls 0 
> 02-2417:25:31.395: I/SurfaceFlinger(1889): Device Built-in Screen -> ls 0 
> 02-2417:25:31.395: I/SurfaceFlinger(1889): Device Built-in Screen -> ls 0 
> 02-2417:25:31.395: I/SurfaceFlinger(1889): Device Built-in Screen -> ls 0 
> 02-2417:25:31.475: D/dalvikvm(2328): GC_FOR_ALLOC freed 305K, 14% free 23931K/27816K, paused 75ms, total 77ms
> 02-2417:25:31.475: D/CrashAnrDetector(2328): Build: samsung/santos10wifixx/santos10wifi:4.4.2/KOT49H/P5210XXUBNK2:user/release-keys
> 02-2417:25:31.475: D/CrashAnrDetector(2328): Hardware: clovertrail
> 02-2417:25:31.475: D/CrashAnrDetector(2328): Revision: 0
> 02-2417:25:31.475: D/CrashAnrDetector(2328): Bootloader: P5210XXUAMG6
> 02-2417:25:31.475: D/CrashAnrDetector(2328): Radio: unknown
> 02-2417:25:31.475: D/CrashAnrDetector(2328): Kernel: Linux version 3.4.34-3241387 (dpi@SWDD5921) (gcc version 4.6 20120106 (prerelease) (GCC) ) #1 SMP PREEMPT Mon Nov 10 19:19:02 KST 2014
> 02-2417:25:31.475: D/CrashAnrDetector(2328): *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** ***
> 02-2417:25:31.475: D/CrashAnrDetector(2328): Build fingerprint: 'samsung/santos10wifixx/santos10wifi:4.4.2/KOT49H/P5210XXUBNK2:user/release-keys'
> 02-2417:25:31.475: D/CrashAnrDetector(2328): Revision: '0'
> 02-2417:25:31.475: D/CrashAnrDetector(2328): pid: 19948, tid: 19948, name: ch.x50.ui.droid  >>> com.distech.x50.ui.droid <<<
> 02-2417:25:31.475: D/CrashAnrDetector(2328): signal 11 (SIGSEGV), code 1 (SEGV_MAPERR), fault addr 3f7ffff4
> 02-2417:25:31.475: D/CrashAnrDetector(2328):     eax 3f800000  ebx 4018fe74  ecx 00000000  edx 00000000
> 02-2417:25:31.475: D/CrashAnrDetector(2328):     esi 6decfd14  edi 00000000
> 02-2417:25:31.475: D/CrashAnrDetector(2328):     xcs 00000073  xds 0000007b  xes 0000007b  xfs 00000000  xss 0000007b
> 02-2417:25:31.475: D/CrashAnrDetector(2328):     eip 40180838  ebp 3f7ffff0  esp bfe95d70  flags 00210246
> 02-2417:25:31.475: D/CrashAnrDetector(2328): backtrace:
> 02-2417:25:31.475: D/CrashAnrDetector(2328):     #00  pc 0001b838  /system/lib/libutils.so
> 02-2417:25:31.475: D/CrashAnrDetector(2328):     #01  pc 0001bbce  /system/lib/libutils.so
> 02-2417:25:31.475: D/CrashAnrDetector(2328):     #02  pc 0001de71  /system/lib/libhwui.so
> 02-2417:25:31.475: D/CrashAnrDetector(2328):     #03  pc 0001e0ec  /system/lib/libhwui.so
> 02-2417:25:31.475: D/CrashAnrDetector(2328):     #04  pc 000aa54b  /system/lib/libandroid_runtime.so
> 02-2417:25:31.475: D/CrashAnrDetector(2328):     #05  pc 00083335  /system/lib/libdvm.so
> 02-2417:25:31.475: D/CrashAnrDetector(2328):     #06  pc 00002f3f  <unknown>
> 02-2417:25:31.475: D/CrashAnrDetector(2328):     #07  pc 000e06dc  /system/lib/libdvm.so
> 02-2417:25:31.475: D/CrashAnrDetector(2328):     #08  pc 00237c79  /system/lib/libdvm.so
> 02-2417:25:31.475: D/CrashAnrDetector(2328):     #09  pc 00008743  <unknown>
> 02-2417:25:31.475: D/CrashAnrDetector(2328):     #10  pc 00098c80  /system/lib/libdvm.so
> 02-2417:25:31.475: D/CrashAnrDetector(2328):     #11  pc 000948c1  /system/lib/libdvm.so
> 02-2417:25:31.475: D/CrashAnrDetector(2328):     #12  pc 00113798  /system/lib/libdvm.so
> 02-2417:25:31.475: D/CrashAnrDetector(2328):     #13  pc 00126c69  /system/lib/libdvm.so
> 02-2417:25:31.475: D/CrashAnrDetector(2328):     #14  pc 00237c79  /system/lib/libdvm.so
> 02-2417:25:31.475: D/CrashAnrDetector(2328):     #15  pc 00008e9b  <unknown>
> 02-2417:25:31.475: D/CrashAnrDetector(2328):     #16  pc 00098c80  /system/lib/libdvm.so
> 02-2417:25:31.475: D/CrashAnrDetector(2328):     #17  pc 000948c1  /system/lib/libdvm.so
> 02-2417:25:31.475: D/CrashAnrDetector(2328):     #18  pc 001144ae  /system/lib/libdvm.so
> 02-2417:25:31.475: D/CrashAnrDetector(2328):     #19  pc 000d47ad  /system/lib/libdvm.so
> 02-2417:25:31.475: D/CrashAnrDetector(2328):     #20  pc 000624ba  /system/lib/libandroid_runtime.so
> 02-2417:25:31.475: D/CrashAnrDetector(2328):     #21  pc 000647a4  /system/lib/libandroid_runtime.so
> 02-2417:25:31.475: D/CrashAnrDetector(2328):     #22  pc 00000f14  /system/bin/app_process
> 02-2417:25:31.475: D/CrashAnrDetector(2328):     #23  pc 0001dd4a  /system/lib/libc.so
> 02-2417:25:31.475: D/CrashAnrDetector(2328):     #24  pc 00001206  /system/bin/app_process
> 02-2417:25:31.475: D/CrashAnrDetector(2328): stack:
> 02-2417:25:31.475: D/CrashAnrDetector(2328):          bfe95d30  00000000  
> 02-2417:25:31.475: D/CrashAnrDetector(2328):          bfe95d34  00000000  
> 02-2417:25:31.475: D/CrashAnrDetector(2328):          bfe95d38  00000000  
> 02-2417:25:31.475: D/CrashAnrDetector(2328):          bfe95d3c  00000000  
> 02-2417:25:31.475: D/CrashAnrDetector(2328):          bfe95d40  00000000  
> 02-2417:25:31.475: D/CrashAnrDetector(2328):          bfe95d44  00000000  
> 02-2417:25:31.475: D/CrashAnrDetector(2328):          bfe95d48  00000000  
> 02-2417:25:31.475: D/CrashAnrDetector(2328):          bfe95d4c  00000000  
> 02-2417:25:31.475: D/CrashAnrDetector(2328):          bfe95d50  00000000  
> 02-2417:25:31.475: D/CrashAnrDetector(2328):          bfe95d54  00000000  
> 02-2417:25:31.475: D/CrashAnrDetector(2328):          bfe95d58  00000000  
> 02-2417:25:31.475: D/CrashAnrDetector(2328):          bfe95d5c  00000000  
> 02-2417:25:31.475: D/CrashAnrDetector(2328):          bfe95d60  00000000  
> 02-2417:25:31.475: D/CrashAnrDetector(2328):          bfe95d64  00000000  
> 02-2417:25:31.475: D/CrashAnrDetector(2328):          bfe95d68  00000000  
> 02-2417:25:31.475: D/CrashAnrDetector(2328):          bfe95d6c  00000000  
> 02-2417:25:31.475: D/CrashAnrDetector(2328):     #00  bfe95d70  6b7d6580  
> 02-2417:25:31.475: D/CrashAnrDetector(2328):          bfe95d74  00000010  
> 02-2417:25:31.475: D/CrashAnrDetector(2328):          bfe95d78  419b5a2c  /system/lib/libhwui.so
> 02-2417:25:31.475: D/CrashAnrDetector(2328):          bfe95d7c  4198738c  /system/lib/libhwui.so
> 02-2417:25:31.475: D/CrashAnrDetector(2328):          bfe95d80  00000000  
> 02-2417:25:31.475: D/CrashAnrDetector(2328):          bfe95d84  40039000  
> 02-2417:25:31.475: D/CrashAnrDetector(2328):          bfe95d88  00000000  
> 02-2417:25:31.475: D/CrashAnrDetector(2328):          bfe95d8c  6b7d6580  
> 02-2417:25:31.475: D/CrashAnrDetector(2328):          bfe95d90  6e1b0504  
> 02-2417:25:31.475: D/CrashAnrDetector(2328):          bfe95d94  6e132b30  
> 02-2417:25:31.475: D/CrashAnrDetector(2328):          bfe95d98  6a8fec20  
> 02-2417:25:31.475: D/CrashAnrDetector(2328):          bfe95d9c  419b5a2c  /system/lib/libhwui.so
> 02-2417:25:31.475: D/CrashAnrDetector(2328):          bfe95da0  00000000  
> 02-2417:25:31.475: D/CrashAnrDetector(2328):          bfe95da4  00000000  
> 02-2417:25:31.475: D/CrashAnrDetector(2328):          bfe95da8  6decfcb0  
> 02-2417:25:31.475: D/CrashAnrDetector(2328):          bfe95dac  40180bcf  /system/lib/libutils.so
> 02-2417:25:31.475: D/CrashAnrDetector(2328):     #01  bfe95db0  6decfd14  
> 02-2417:25:31.475: D/CrashAnrDetector(2328):          bfe95db4  00000000  
> 02-2417:25:31.475: D/CrashAnrDetector(2328):          bfe95db8  00000000  
> 02-2417:25:31.475: D/CrashAnrDetector(2328):          bfe95dbc  419b5a2c  /system/lib/libhwui.so
> 02-2417:25:31.475: D/CrashAnrDetector(2328):          bfe95dc0  00000001  
> 02-2417:25:31.475: D/CrashAnrDetector(2328):          bfe95dc4  4012fa06  /system/lib/libstdc++.so
> 02-2417:25:31.475: D/CrashAnrDetector(2328):          bfe95dc8  419b5a2c  /system/lib/libhwui.so
> 02-2417:25:31.475: D/CrashAnrDetector(2328):          bfe95dcc  41943e72  /system/lib/libhwui.so
> 02-2417:25:31.475: D/CrashAnrDetector(2328):     #02  bfe95dd0  6decfd14  
> 02-2417:25:31.475: D/CrashAnrDetector(2328):          bfe95dd4  6bed8ed0  
> 02-2417:25:31.475: D/CrashAnrDetector(2328):          bfe95dd8  00000001  
> 02-2417:25:31.475: D/CrashAnrDetector(2328):          bfe95ddc  405ca040  /system/lib/libEGL.so
> 02-2417:25:31.475: D/CrashAnrDetector(2328):          bfe95de0  4034e300  /system/lib/libandroid_runtime.so
> 02-2417:25:31.475: D/CrashAnrDetector(2328):          bfe95de4  405356a6  /system/lib/libEGL.so
> 02-2417:25:31.475: D/CrashAnrDetector(2328):          bfe95de8  4053b909  /system/lib/libEGL.so
> 02-2417:25:31.475: D/CrashAnrDetector(2328):          bfe95dec  4034e300  /system/lib/libandroid_runtime.so
> 02-2417:25:31.475: D/CrashAnrDetector(2328):          bfe95df0  432fbf40  
> 02-2417:25:31.475: D/CrashAnrDetector(2328):          bfe95df4  6e149160  
> 02-2417:25:31.475: D/CrashAnrDetector(2328):          bfe95df8  41943a89  /system/lib/libhwui.so
> 02-2417:25:31.475: D/CrashAnrDetector(2328):          bfe95dfc  419b5a2c  /system/lib/libhwui.so
> 02-2417:25:31.475: D/CrashAnrDetector(2328):          bfe95e00  6decfcb0  
> 02-2417:25:31.475: D/CrashAnrDetector(2328):          bfe95e04  bfe95e60  [stack]
> 02-2417:25:31.475: D/CrashAnrDetector(2328):          bfe95e08  bfe95e88  [stack]
> 02-2417:25:31.475: D/CrashAnrDetector(2328):          bfe95e0c  419440ed  /system/lib/libhwui.so
> 02-2417:25:31.475: D/CrashAnrDetector(2328):     #03  b
> 02-2417:25:31.475: D/CrashAnrDetector(2328): processName:com.distech.x50.ui.droid
> 02-2417:25:31.475: D/CrashAnrDetector(2328): broadcastEvent : com.distech.x50.ui.droid SYSTEM_TOMBSTONE
> 02-2417:25:31.475: E/android.os.Debug(2328): !@Dumpstate > dumpstate -k -t -z -d -o /data/log/dumpstate_app_error
Comment 18 Jonathan Pryor 2015-02-25 09:14:50 UTC
> I could make it crash again with a different log that honnestly I cannot figure
> out what it did beside the SEGSVR on the mono-rt:

I also don't know the cause. I can provide more context. As per the stack trace:

> 02-2417:25:31.475: D/CrashAnrDetector(2328): backtrace:
> 02-2417:25:31.475: D/CrashAnrDetector(2328):     #00  pc 0001b838  /system/lib/libutils.so
> 02-2417:25:31.475: D/CrashAnrDetector(2328):     #01  pc 0001bbce  /system/lib/libutils.so
> 02-2417:25:31.475: D/CrashAnrDetector(2328):     #02  pc 0001de71  /system/lib/libhwui.so
> 02-2417:25:31.475: D/CrashAnrDetector(2328):     #03  pc 0001e0ec  /system/lib/libhwui.so
> 02-2417:25:31.475: D/CrashAnrDetector(2328):     #04  pc 000aa54b  /system/lib/libandroid_runtime.so
> 02-2417:25:31.475: D/CrashAnrDetector(2328):     #05  pc 00083335  /system/lib/libdvm.so
> 02-2417:25:31.475: D/CrashAnrDetector(2328):     #06  pc 00002f3f  <unknown>

The #06 "<unknown>" frame is probably a JIT'd method which is calling a JNIEnv method. The JNIEnv method in turn calls a function pointer on the JNIEnv struct, e.g. JNIEnv::CallVoidMethod(). This in turn calls into Dalvik, livdvm.so, on frame #05. We don't know what function this is, because all the JNIEnv function pointers are `static` (not exported), and everything is likely stripped, but we're getting *somewhere* into Dalvik.

From there Dalvik calls into libandroid_runtime.so (frame 04), which calls into libhwui.so (frame 04-02), which calls into libutils.so (frame 01-00), which promptly blows up.

That still doesn't provide any detail as to what's happening, why it's crashing, or what can be done to fix it. Unfortunately, lots of that is within Android/Samsung.

From the Xamarin side of things, what we can do is enable method tracing:

    adb shell setprop debug.mono.trace all

Tracing is...flakey, occasionally introduces errors, spams `adb logcat`, and makes things slow to a crawl. As part of "spamming logcat", it will also print out every method that is entered and exited. This will allow you to determine the last methods invoked before the SIGSEGV, and might -- might! -- allow for more information for future Google searches about the SIGSEGV.
Comment 19 Iliass Yousfi 2015-02-25 10:52:14 UTC
Thank you a lot Jon for your assistance and patience

> Tracing is...flakey, occasionally introduces errors, spams `adb logcat`, and
makes things slow to a crawl
For sure, but it's a good idea. I am trying to have a pattern in the application where I can handle this and get back with an interesting logcat
Comment 20 Iliass Yousfi 2015-02-27 11:30:34 UTC
> adb shell setprop debug.mono.trace all
With this prop set, the app was really crawling as you said and I couldn't even get in the area at the right moment

What I could now have as result, is trying to desymb the log you see here (upper) :

> 02-2417:25:31.475: D/CrashAnrDetector(2328):     #00  pc 0001b838  /system/lib/libutils.so
> 02-2417:25:31.475: D/CrashAnrDetector(2328):     #01  pc 0001bbce  /system/lib/libutils.so
> 02-2417:25:31.475: D/CrashAnrDetector(2328):     #02  pc 0001de71  /system/lib/libhwui.so
> 02-2417:25:31.475: D/CrashAnrDetector(2328):     #03  pc 0001e0ec  /system/lib/libhwui.so
> 02-2417:25:31.475: D/CrashAnrDetector(2328):     #04  pc 000aa54b  /system/lib/libandroid_runtime.so

using the ndk tools, all my tombstone reports points to this on the libandroid_runtime.so

> android::register_android_view_GraphicBuffer(_JNIEnv*)
??:0

Hope this help
Comment 21 Jonathan Pryor 2015-02-27 12:06:15 UTC
> With this prop set...I couldn't even get in the area at the right moment.

Pity. :-(

> using the ndk tools, all my tombstone reports points to this on the libandroid_runtime.so
> android::register_android_view_GraphicBuffer(_JNIEnv*)

That's helpful, in that it points us to register_android_view_GraphicBuffer():

https://android.googlesource.com/platform/frameworks/base/+/android-4.4.2_r1/core/jni/android_view_GraphicBuffer.cpp

It's full of lots of macros, e.g. line 309:

    // Line 309:
    FIND_CLASS(clazz, "android/view/GraphicBuffer");

    // Line 278:
    #define FIND_CLASS(var, className) \
        var = env->FindClass(className); \
        LOG_FATAL_IF(! var, "Unable to find class " className);

LOG_FATAL_IF is defined at:

https://android.googlesource.com/platform/system/core/+/android-4.4.2_r1/include/log/log.h

which uses LOG_TAG, which is "GraphicBuffer".

My guess is that you're hitting one of the numerous implicit asserts within register_android_view_GraphicBuffer(), which causes the process to abort. There are three ways this could be failing:

1. This is a "Debug"-like build, in which case there should be an assert message printed to `adb logcat` with "GraphicBuffer" as the tag

You would need to check your `adb logcat` output to see if there are any messages from "GraphicBuffer"; Comment #17 doesn't contain enough history.

2. This is a "Release"-like build, in which case there *won't* be an assert message. Instead, one of the JNI functions it performs will return NULL/etc., which will cause a subsequent statement to crash when it uses NULL in an unexpected manner.

Either (1) or (2) implies that your platform vendor fucked up, as libandroid_runtime.so is out of sync with the android.jar on the device.

3. The crash wasn't actually in register_android_view_GraphicBuffer(), and that was just the nearest symbol that the crash logger could find.

If this is the case, I'm still not sure how to progress.

---

My best guess remains that your app is doing "something unexpected," as far as the OS is concerned, causing something to be `null` when shouldn't be. If true, you "just" need to narrow down what methods cause the crash...and then change them to avoid the crash. (Easy! I'll go cry now.)
Comment 22 Iliass Yousfi 2015-02-27 14:10:25 UTC
> 1. This is a "Debug"-like build ...
That was a debug version, and I couldn't see the GraphicBuffer log tag.

That may point your suggestion #3 which I'm scared of

On the other hand, our Q&A team used to stress the HomeButton in the application's action bar to drill up&down and up in the application.
To avoid this stress test, I was only playing only with the back button (go back on the application stack), and navigate down again in the application, then doing this points the new tombstone log:

> 02-27 13:34:21.958: E/mono-rt(16470): Stacktrace:
> 02-27 13:34:21.958: E/mono-rt(16470):   at <unknown> <0xffffffff>
> 02-27 13:34:21.958: E/mono-rt(16470):   at (wrapper managed-to-native) System.MonoType.GetPropertiesByName (System.MonoType,string,System.Reflection.BindingFlags,bool,System.Type) <0xffffffff>
> 02-27 13:34:21.958: E/mono-rt(16470):   at System.MonoType.GetProperties (System.Reflection.BindingFlags) <0x0001b>
> 02-27 13:34:21.958: E/mono-rt(16470):   at System.Reflection.RuntimeReflectionExtensions.GetRuntimeProperties (System.Type) <0x00026>
> 02-27 13:34:21.958: E/mono-rt(16470):   at Cirrious.CrossCore.ReflectionExtensions.GetProperties (System.Type,Cirrious.CrossCore.BindingFlags) <0x0005b>
> 02-27 13:34:21.958: E/mono-rt(16470):   at Cirrious.CrossCore.ReflectionExtensions.GetProperty (System.Type,string) <0x00053>
> 02-27 13:34:21.958: E/mono-rt(16470):   at Cirrious.MvvmCross.Binding.Bindings.Target.Construction.MvxTargetBindingFactoryRegistry.TryCreateReflectionBasedBinding (object,string,Cirrious.MvvmCross.Binding.Bindings.Target.IMvxTargetBinding&) <0x00093>
> 02-27 13:34:21.958: E/mono-rt(16470):   at Cirrious.MvvmCross.Binding.Bindings.Target.Construction.MvxTargetBindingFactoryRegistry.CreateBinding (object,string) <0x0003c>
> 02-27 13:34:21.958: E/mono-rt(16470):   at Cirrious.MvvmCross.Binding.Bindings.MvxFullBinding.CreateTargetBinding (object) <0x0003c>
> 02-27 13:34:21.958: E/mono-rt(16470):   at Cirrious.MvvmCross.Binding.Bindings.MvxFullBinding..ctor (Cirrious.MvvmCross.Binding.MvxBindingRequest) <0x00047>
> 02-27 13:34:21.958: E/mono-rt(16470):   at Cirrious.MvvmCross.Binding.Binders.MvxFromTextBinder.BindSingle (Cirrious.MvvmCross.Binding.MvxBindingRequest) <0x00027>
> 02-27 13:34:21.958: E/mono-rt(16470):   at Cirrious.MvvmCross.Binding.Binders.MvxFromTextBinder/<>c__DisplayClass1.<Bind>b__0 (Cirrious.MvvmCross.Binding.Bindings.MvxBindingDescription) <0x00053>
> 02-27 13:34:21.958: E/mono-rt(16470):   at System.Linq.Enumerable/<CreateSelectIterator>c__Iterator10`2.MoveNext () <0x0012d>
> 02-27 13:34:21.958: E/mono-rt(16470):   at System.Collections.Generic.List`1.AddEnumerable (System.Collections.Generic.IEnumerable`1<T>) <0x0008f>
> 02-27 13:34:21.958: E/mono-rt(16470):   at System.Collections.Generic.List`1.AddRange (System.Collections.Generic.IEnumerable`1<T>) <0x00063>
> 02-27 13:34:21.958: E/mono-rt(16470):   at Cirrious.MvvmCross.Binding.Droid.Binders.MvxAndroidViewBinder.ApplyBindingsFromAttribute (Android.Views.View,Android.Content.Res.TypedArray,int) <0x00073>
> 02-27 13:34:21.958: E/mono-rt(16470):   at Cirrious.MvvmCross.Binding.Droid.Binders.MvxAndroidViewBinder.BindView (Android.Views.View,Android.Content.Context,Android.Util.IAttributeSet) <0x000a7>
> 02-27 13:34:21.958: E/mono-rt(16470):   at Cirrious.MvvmCross.Binding.Droid.Binders.MvxBindingLayoutInflatorFactory.OnCreateView (string,Android.Content.Context,Android.Util.IAttributeSet) <0x00074>
> 02-27 13:34:21.958: E/mono-rt(16470):   at Android.Views.LayoutInflater/IFactoryInvoker.n_OnCreateView_Ljava_lang_String_Landroid_content_Context_Landroid_util_AttributeSet_ (intptr,intptr,intptr,intptr,intptr) <0x00079>
> 02-27 13:34:21.958: E/mono-rt(16470):   at (wrapper dynamic-method) object.c17b7796-dc71-400d-8dd8-74c6caed5b61 (intptr,intptr,intptr,intptr,intptr) <0x00023>
> 02-27 13:34:21.958: E/mono-rt(16470):   at (wrapper native-to-managed) object.c17b7796-dc71-400d-8dd8-74c6caed5b61 (intptr,intptr,intptr,intptr,intptr) <0xffffffff>
> 02-27 13:34:21.958: E/mono-rt(16470):   at <unknown> <0xffffffff>
> 02-27 13:34:21.958: E/mono-rt(16470):   at (wrapper managed-to-native) object.wrapper_native_0x42b93560 (intptr,intptr,intptr,Android.Runtime.JValue[]) <0xffffffff>
> 02-27 13:34:21.958: E/mono-rt(16470):   at Android.Runtime.JNIEnv.CallObjectMethod (intptr,intptr,Android.Runtime.JValue[]) <0x00068>
> 02-27 13:34:21.958: E/mono-rt(16470):   at Android.Views.LayoutInflater.Inflate (int,Android.Views.ViewGroup,bool) <0x00193>
> 02-27 13:34:21.958: E/mono-rt(16470):   at Cirrious.MvvmCross.Binding.Droid.BindingContext.MvxAndroidBindingContext.CommonInflate (int,Android.Views.ViewGroup,Cirrious.MvvmCross.Binding.Droid.Binders.IMvxLayoutInfactorFactory,bool) <0x000a2>
> 02-27 13:34:21.958: E/mono-rt(16470):   at Cirrious.MvvmCross.Binding.Droid.BindingContext.MvxAndroidBindingContext.BindingInflate (int,Android.Views.ViewGroup,bool) <0x00043>
> 02-27 13:34:21.958: E/mono-rt(16470):   at Cirrious.MvvmCross.Binding.Droid.BindingContext.MvxAndroidBindingContext.BindingInflate (int,Android.Views.ViewGroup) <0x0001b>
> 02-27 13:34:21.958: E/mono-rt(16470):   at Cirrious.MvvmCross.Binding.Droid.BindingContext.MvxBindingContextOwnerExtensions.BindingInflate (Cirrious.MvvmCross.Binding.BindingContext.IMvxBindingContextOwner,int,Android.Views.ViewGroup) <0x00097>
> 02-27 13:34:21.958: E/mono-rt(16470):   at Cirrious.MvvmCross.Droid.Views.MvxActivity.SetContentView (int) <0x00017>
> 02-27 13:34:21.958: E/mono-rt(16470):   at Distech.X50.UI.Droid.Views.X50View.OnViewModelSet () <0x00066>
> 02-27 13:34:21.958: E/mono-rt(16470):   at Cirrious.MvvmCross.Droid.Views.MvxActivity.set_ViewModel (Cirrious.MvvmCross.ViewModels.IMvxViewModel) <0x00027>
> 02-27 13:34:21.958: E/mono-rt(16470):   at Cirrious.MvvmCross.Views.MvxViewExtensionMethods.OnViewCreate (Cirrious.MvvmCross.Views.IMvxView,System.Func`1<Cirrious.MvvmCross.ViewModels.IMvxViewModel>) <0x000c9>
> 02-27 13:34:21.958: E/mono-rt(16470):   at Cirrious.MvvmCross.Droid.Views.MvxActivityViewExtensions.OnViewCreate (Cirrious.MvvmCross.Droid.Views.IMvxAndroidView,Android.OS.Bundle) <0x001ab>
> 02-27 13:34:21.958: E/mono-rt(16470):   at Cirrious.MvvmCross.Droid.Views.MvxActivityAdapter.EventSourceOnCreateCalled (object,Cirrious.CrossCore.Core.MvxValueEventArgs`1<Android.OS.Bundle>) <0x000af>
> 02-27 13:34:21.958: E/mono-rt(16470):   at (wrapper delegate-invoke) System.EventHandler`1.invoke_void_object_TEventArgs (object,TEventArgs) <0xffffffff>
> 02-27 13:34:21.958: E/mono-rt(16470):   at Cirrious.CrossCore.Core.MvxDelegateExtensionMethods.Raise<T> (System.EventHandler`1<Cirrious.CrossCore.Core.MvxValueEventArgs`1<T>>,object,T) <0x00054>
> 02-27 13:34:21.958: E/mono-rt(16470):   at Cirrious.CrossCore.Droid.Views.MvxEventSourceActivity.OnCreate (Android.OS.Bundle) <0x00047>
> 02-27 13:34:21.958: E/mono-rt(16470):   at Distech.X50.UI.Droid.Views.BaseView`1.OnCreate (Android.OS.Bundle) <0x0005f>
> 02-27 13:34:21.958: E/mono-rt(16470):   at Distech.X50.UI.Droid.Views.X50View.OnCreate (Android.OS.Bundle) <0x00013>
> 02-27 13:34:21.958: E/mono-rt(16470):   at Android.App.Activity.n_OnCreate_Landroid_os_Bundle_ (intptr,intptr,intptr) <0x00048>
> 02-27 13:34:21.958: E/mono-rt(16470):   at (wrapper dynamic-method) object.b04b9d7e-7d2e-4b7f-816e-a75f529e2356 (intptr,intptr,intptr) <0x0001f>
> 02-27 13:34:21.958: E/mono-rt(16470):   at (wrapper native-to-managed) object.b04b9d7e-7d2e-4b7f-816e-a75f529e2356 (intptr,intptr,intptr) <0xffffffff>
> 02-27 13:34:21.958: E/mono-rt(16470): =================================================================
> 02-27 13:34:21.958: E/mono-rt(16470): Got a SIGSEGV while executing native code. This usually indicates
> 02-27 13:34:21.958: E/mono-rt(16470): a fatal error in the mono runtime or one of the native libraries 
> 02-27 13:34:21.958: E/mono-rt(16470): used by your application.
> 02-27 13:34:21.958: E/mono-rt(16470): =================================================================
> 02-27 13:34:21.958: A/libc(16470): Fatal signal 11 (SIGSEGV) at 0x3f800000 (code=1), thread 16470 (ch.x50.ui.droid)
> 02-27 13:34:21.958: D/MotionRecognitionService(2394):  ssp status : false
> 02-27 13:34:21.978: V/dcNetDroid(16470): Closing ManualReset
> 02-27 13:34:22.058: I/DEBUG(1893): *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** ***
> 02-27 13:34:22.058: I/DEBUG(1893): Build fingerprint: 'samsung/santos10wifixx/santos10wifi:4.4.2/KOT49H/P5210XXUBNK2:user/release-keys'
> 02-27 13:34:22.058: I/DEBUG(1893): Revision: '0'
> 02-27 13:34:22.058: I/DEBUG(1893): pid: 16470, tid: 16470, name: ch.x50.ui.droid  >>> com.distech.x50.ui.droid <<<
> 02-27 13:34:22.058: I/DEBUG(1893): signal 11 (SIGSEGV), code 1 (SEGV_MAPERR), fault addr 3f800000
> 02-27 13:34:22.698: I/DEBUG(1893):     eax 00000000  ebx 65595ff4  ecx 6bd803e4  edx bf8f9078
> 02-27 13:34:22.698: I/DEBUG(1893):     esi bf8f9078  edi 653fb960
> 02-27 13:34:22.698: I/DEBUG(1893):     xcs 00000073  xds 0000007b  xes 0000007b  xfs 00000000  xss 0000007b
> 02-27 13:34:22.698: I/DEBUG(1893):     eip 653f06ab  ebp 3f800000  esp bf8f8fe0  flags 00210206
> 02-27 13:34:22.698: I/DEBUG(1893): backtrace:
> 02-27 13:34:22.698: I/DEBUG(1893):     #00  pc 001a86ab  /data/app-lib/Mono.Android.DebugRuntime-1/libmonosgen-2.0.so
> 02-27 13:34:22.698: I/DEBUG(1893):     #01  pc 001a8763  /data/app-lib/Mono.Android.DebugRuntime-1/libmonosgen-2.0.so
> 02-27 13:34:22.698: I/DEBUG(1893):     #02  pc 001ba105  /data/app-lib/Mono.Android.DebugRuntime-1/libmonosgen-2.0.so
> 02-27 13:34:22.698: I/DEBUG(1893):     #03  pc 001450d3  /data/app-lib/Mono.Android.DebugRuntime-1/libmonosgen-2.0.so

where the desymbolized call points to a hash table access problem in the libmonosgen-2.0.so
Comment 23 Jonathan Pryor 2015-02-27 14:15:15 UTC
I think we're at the point where we'd need a complete repro + repro instructions +  which device this repros on so that we can investigate locally. :-(
Comment 24 Iliass Yousfi 2015-02-27 14:58:37 UTC
> which device this repros
We experience this on a Samsung Galaxy Tab GT-P5210

> I think we're at the point where we'd need a complete repro + repro
instructions
I Agree with you, how would you like to do that? Our app needs to connect to a server (on specific port). I can manage with IT to have to be able for you to connect there.
For the app I can send you the released app (or even the debug one if you prefer)

Thanks
Comment 25 Jonathan Pryor 2015-02-27 15:46:06 UTC
> I Agree with you, how would you like to do that?

Source? :-)

Even better, source to as small a repro as possible? :-)
Preferably one without a dependency on your server? :-D
Comment 26 Iliass Yousfi 2015-02-27 15:52:16 UTC
> Source? :-)
We have stated in the past an NDA protocol with xamarin, so for teh source part there will be no issue. 

> Preferably one without a dependency on your server? :-D
Except that the repro should use the network connection cause you can't do anything without connection to the server
Comment 27 Jonathan Pryor 2015-02-27 16:19:46 UTC
> Except that the repro should use the network connection cause you can't do
> anything without connection to the server

...hence the "as small a repro as possible" bit.

Given the stack trace in Comment #0 and Comment #7, the crash appears to be in UI code, so I'm not sure that a network component is *required*; that's just what the app *currently does*, which could be miles away from a minimal repro...
Comment 32 Iliass Yousfi 2015-03-09 11:16:36 UTC
The device on which we're experiencing the issue most often is the Samsung Galaxy Tab GT-P5210 with 4.4.2
Comment 33 Iliass Yousfi 2015-03-09 12:16:28 UTC
Here is another log. I'm hardly trying to reflect the stack trace to addr2Line to get some hint on where the crash happens :
> 03-09 12:00:07.359: I/DEBUG(6737): *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** ***
> 03-09 12:00:07.359: I/DEBUG(6737): Build fingerprint: 'samsung/santos10wifixx/santos10wifi:4.4.2/KOT49H/P5210XXUBNK2:user/release-keys'
> 03-09 12:00:07.359: I/DEBUG(6737): Revision: '0'
> 03-09 12:00:07.359: I/DEBUG(6737): pid: 6780, tid: 6780, name: ch.x50.ui.droid  >>> com.distech.x50.ui.droid <<<
> 03-09 12:00:07.359: I/DEBUG(6737): signal 11 (SIGSEGV), code 1 (SEGV_MAPERR), fault addr 3f7ffff4
> 03-09 12:00:07.549: E/IMGSRV(1896): :0: PVRDRMOpen: TP3, ret = 59
> 03-09 12:00:08.089: I/DEBUG(6737):     eax 3f800000  ebx 4018fe74  ecx 00000000  edx 00000000
> 03-09 12:00:08.089: I/DEBUG(6737):     esi 6d728864  edi 00000000
> 03-09 12:00:08.089: I/DEBUG(6737):     xcs 00000073  xds 0000007b  xes 0000007b  xfs 00000000  xss 0000007b
> 03-09 12:00:08.089: I/DEBUG(6737):     eip 40180838  ebp 3f7ffff0  esp bf8f9ca0  flags 00210246
> 03-09 12:00:08.109: I/DEBUG(6737): backtrace:
> 03-09 12:00:08.109: I/DEBUG(6737):     #00  pc 0001b838  /system/lib/libutils.so
> 03-09 12:00:08.109: I/DEBUG(6737):     #01  pc 0001bbce  /system/lib/libutils.so
> 03-09 12:00:08.109: I/DEBUG(6737):     #02  pc 0001de71  /system/lib/libhwui.so
> 03-09 12:00:08.109: I/DEBUG(6737):     #03  pc 0001e0ec  /system/lib/libhwui.so
> 03-09 12:00:08.109: I/DEBUG(6737):     #04  pc 000aa54b  /system/lib/libandroid_runtime.so
> 03-09 12:00:08.109: I/DEBUG(6737):     #05  pc 00083335  /system/lib/libdvm.so
> 03-09 12:00:08.109: I/DEBUG(6737):     #06  pc 00002f3f  <unknown>
> 03-09 12:00:08.109: I/DEBUG(6737):     #07  pc 000e06dc  /system/lib/libdvm.so
> 03-09 12:00:08.109: I/DEBUG(6737):     #08  pc 00237c79  /system/lib/libdvm.so
> 03-09 12:00:08.109: I/DEBUG(6737):     #09  pc 00008823  <unknown>
> 03-09 12:00:08.109: I/DEBUG(6737):     #10  pc 00098c80  /system/lib/libdvm.so
> 03-09 12:00:08.109: I/DEBUG(6737):     #11  pc 000948c1  /system/lib/libdvm.so
> 03-09 12:00:08.109: I/DEBUG(6737):     #12  pc 00113798  /system/lib/libdvm.so
> 03-09 12:00:08.109: I/DEBUG(6737):     #13  pc 00126c69  /system/lib/libdvm.so
> 03-09 12:00:08.109: I/DEBUG(6737):     #14  pc 00237c79  /system/lib/libdvm.so
> 03-09 12:00:08.109: I/DEBUG(6737):     #15  pc 00008e9b  <unknown>
> 03-09 12:00:08.109: I/DEBUG(6737):     #16  pc 00098c80  /system/lib/libdvm.so
> 03-09 12:00:08.109: I/DEBUG(6737):     #17  pc 000948c1  /system/lib/libdvm.so
> 03-09 12:00:08.109: I/DEBUG(6737):     #18  pc 001144ae  /system/lib/libdvm.so
> 03-09 12:00:08.109: I/DEBUG(6737):     #19  pc 000d47ad  /system/lib/libdvm.so
> 03-09 12:00:08.109: I/DEBUG(6737):     #20  pc 000624ba  /system/lib/libandroid_runtime.so
> 03-09 12:00:08.109: I/DEBUG(6737):     #21  pc 000647a4  /system/lib/libandroid_runtime.so
> 03-09 12:00:08.109: I/DEBUG(6737):     #22  pc 00000f14  /system/bin/app_process
> 03-09 12:00:08.109: I/DEBUG(6737):     #23  pc 0001dd4a  /system/lib/libc.so
> 03-09 12:00:08.119: I/DEBUG(6737):     #24  pc 00001206  /system/bin/app_process
> 03-09 12:00:08.149: I/DEBUG(6737): memory map around fault addr 3f7ffff4:
> 03-09 12:00:08.149: I/DEBUG(6737):     (no map below)
> 03-09 12:00:08.149: I/DEBUG(6737):     (no map for address)
> 03-09 12:00:08.149: I/DEBUG(6737):     40000000-40002000 r-x /system/bin/app_process
> 03-09 12:00:08.279: I/DEBUG(6737): !@dumpstate -k -t -z -d -o /data/log/dumpstate_app_native -m 6780

Since this morning, I am trying to focus on a unique pattern that reproduces it. From my perspective, all the traces I am getting point to the graphic handling on this tablet :
> 03-09 12:00:08.109: I/DEBUG(6737): backtrace:
> 03-09 12:00:08.109: I/DEBUG(6737):     #00  pc 0001b838  /system/lib/libutils.so (android::VectorImpl::_shrink(unsigned int, unsigned int))
> 03-09 12:00:08.109: I/DEBUG(6737):     #01  pc 0001bbce  /system/lib/libutils.so (android::VectorImpl::clear())
> 03-09 12:00:08.109: I/DEBUG(6737):     #02  pc 0001de71  /system/lib/libhwui.so (android::uirenderer::DisplayList::destroyDisplayListDeferred(android::uirenderer::DisplayList*))
> 03-09 12:00:08.109: I/DEBUG(6737):     #03  pc 0001e0ec  /system/lib/libhwui.so (android::uirenderer::DisplayList::reset())
> 03-09 12:00:08.109: I/DEBUG(6737):     #04  pc 000aa54b  /system/lib/libandroid_runtime.so (android::register_android_view_GraphicBuffer(_JNIEnv*))
> 03-09 12:00:08.109: I/DEBUG(6737):     #05  pc 00083335  /system/lib/libdvm.so (dvmPlatformInvoke)
> 03-09 12:00:08.109: I/DEBUG(6737):     #06  pc 00002f3f  <unknown>
> 03-09 12:00:08.109: I/DEBUG(6737):     #07  pc 000e06dc  /system/lib/libdvm.so (dvmCallJNIMethod(unsigned int const*, JValue*, Method const*, Thread*))
> 03-09 12:00:08.109: I/DEBUG(6737):     #08  pc 00237c79  /system/lib/libdvm.so (dvmJitToInterpNoChain)
> ...
Comment 34 Iliass Yousfi 2015-03-09 17:15:04 UTC
In addition, now I can get some logs from the Nexus9 where the fingerprint is more accurate than the Galaxy Tab.
Here are recent logs that i got on Nexus9:

1. In the log below, we can see the VectorImpl that crashes (may be a mem corruption I think)

> 03-09  16:45:22.672: A/libc(4016): Fatal signal 11 (SIGSEGV), code 1, fault addr 0xfffffff8 in tid 4038 (RenderThread)
> 03-09  16:45:22.775: I/DEBUG(201): *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** ***
> 03-09  16:45:22.775: I/DEBUG(201): Build fingerprint: 'google/volantis/flounder:5.0.1/LRX22C/1602158:user/release-keys'
> 03-09  16:45:22.775: I/DEBUG(201): Revision: '0'
> 03-09  16:45:22.775: I/DEBUG(201): ABI: 'arm'
> 03-09  16:45:22.775: I/DEBUG(201): pid: 4016, tid: 4038, name: RenderThread  >>> com.distech.x50.ui.droid <<<
> 03-09  16:45:22.775: I/DEBUG(201): signal 11 (SIGSEGV), code 1 (SEGV_MAPERR), fault addr 0xfffffff8
> 03-09  16:45:22.793: I/DEBUG(201):     r0 ac0ca680  r1 00000000  r2 00000000  r3 00000004
> 03-09  16:45:22.793: I/DEBUG(201):     r4 ac0ca680  r5 00000000  r6 00000000  r7 00000000
> 03-09  16:45:22.793: I/DEBUG(201):     r8 ab915b0c  r9 e0dfbd28  sl e0dfbd20  fp ab915b48
> 03-09  16:45:22.793: I/DEBUG(201):     ip f6eb9ea4  sp e0dfbc40  lr f6eb4481  pc f6eb3fb8  cpsr 600f0030
> 03-09  16:45:22.793: I/DEBUG(201): backtrace:
> 03-09  16:45:22.794: I/DEBUG(201):     #00 pc 00010fb8  /system/lib/libutils.so (android::VectorImpl::capacity() const+3)
> 03-09  16:45:22.794: I/DEBUG(201):     #01 pc 0001147d  /system/lib/libutils.so (android::VectorImpl::_shrink(unsigned int, unsigned int)+20)
> 03-09  16:45:22.794: I/DEBUG(201):     #02 pc 0001bae9  /system/lib/libhwui.so
> 03-09  16:45:22.794: I/DEBUG(201):     #03 pc 0001bb29  /system/lib/libhwui.so
> 03-09  16:45:22.794: I/DEBUG(201):     #04 pc 000324bb  /system/lib/libhwui.so
> 03-09  16:45:22.794: I/DEBUG(201):     #05 pc 00032523  /system/lib/libhwui.so
> 03-09  16:45:22.794: I/DEBUG(201):     #06 pc 00032523  /system/lib/libhwui.so
> 03-09  16:45:22.794: I/DEBUG(201):     #07 pc 00032523  /system/lib/libhwui.so
> 03-09  16:45:22.794: I/DEBUG(201):     #08 pc 00032523  /system/lib/libhwui.so
> 03-09  16:45:22.794: I/DEBUG(201):     #09 pc 00032523  /system/lib/libhwui.so
> 03-09  16:45:22.794: I/DEBUG(201):     #10 pc 00032523  /system/lib/libhwui.so
> 03-09  16:45:22.794: I/DEBUG(201):     #11 pc 00032523  /system/lib/libhwui.so
> 03-09  16:45:22.794: I/DEBUG(201):     #12 pc 0003bbb7  /system/lib/libhwui.so
> 03-09  16:45:22.794: I/DEBUG(201):     #13 pc 0003cfd5  /system/lib/libhwui.so
> 03-09  16:45:22.794: I/DEBUG(201):     #14 pc 0003cea5  /system/lib/libhwui.so
> 03-09  16:45:22.794: I/DEBUG(201):     #15 pc 0003e27b  /system/lib/libhwui.so (android::uirenderer::renderthread::RenderThread::threadLoop()+66)
> 03-09  16:45:22.794: I/DEBUG(201):     #16 pc 000104d5  /system/lib/libutils.so (android::Thread::_threadLoop(void*)+112)
> 03-09  16:45:22.794: I/DEBUG(201):     #17 pc 0005df4d  /system/lib/libandroid_runtime.so (android::AndroidRuntime::javaThreadShell(void*)+72)
> 03-09  16:45:22.794: I/DEBUG(201):     #18 pc 00010045  /system/lib/libutils.so
> 03-09  16:45:22.794: I/DEBUG(201):     #19 pc 00015ed3  /system/lib/libc.so (__pthread_start(void*)+30)
> 03-09  16:45:22.794: I/DEBUG(201):     #20 pc 00013ea7  /system/lib/libc.so (__start_thread+6)
> 03-09  16:45:22.963: I/DEBUG(201): Tombstone written to: /data/tombstones/tombstone_02

2. Here we have another log that refers to RenderThread:
> 03-09  17:00:59.948: E/mono-rt(4451): =================================================================
> 03-09  17:00:59.948: E/mono-rt(4451): Got a SIGSEGV while executing native code. This usually indicates
> 03-09  17:00:59.948: E/mono-rt(4451): a fatal error in the mono runtime or one of the native libraries 
> 03-09  17:00:59.948: E/mono-rt(4451): used by your application.
> 03-09  17:00:59.948: E/mono-rt(4451): =================================================================
> 03-09  17:00:59.948: A/libc(4451): Fatal signal 11 (SIGSEGV), code 2, fault addr 0x3f800000 in tid 4472 (RenderThread)
> 03-09  17:01:00.052: I/DEBUG(201): *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** ***
> 03-09  17:01:00.052: I/DEBUG(201): Build fingerprint: 'google/volantis/flounder:5.0.1/LRX22C/1602158:user/release-keys'
> 03-09  17:01:00.052: I/DEBUG(201): Revision: '0'
> 03-09  17:01:00.052: I/DEBUG(201): ABI: 'arm'
> 03-09  17:01:00.052: I/DEBUG(201): pid: 4451, tid: 4472, name: RenderThread  >>> com.distech.x50.ui.droid <<<
> 03-09  17:01:00.052: I/DEBUG(201): signal 11 (SIGSEGV), code 2 (SEGV_ACCERR), fault addr 0x3f800000
> 03-09  17:01:00.067: I/DEBUG(201):     r0 ac4d69e8  r1 abf45100  r2 00000008  r3 ac0c0c80
> 03-09  17:01:00.067: I/DEBUG(201):     r4 ac44a458  r5 ac487f38  r6 e1077480  r7 e1077400
> 03-09  17:01:00.067: I/DEBUG(201):     r8 00000007  r9 00000000  sl e1077414  fp 0000001c
> 03-09  17:01:00.067: I/DEBUG(201):     ip 3f800000  sp e10773d0  lr f6eb43d1  pc f68f4262  cpsr 800f0030
> 03-09  17:01:00.067: I/DEBUG(201): backtrace:
> 03-09  17:01:00.067: I/DEBUG(201):     #00 pc 00034262  /system/lib/libhwui.so
> 03-09  17:01:00.067: I/DEBUG(201):     #01 pc 000342ef  /system/lib/libhwui.so
> 03-09  17:01:00.067: I/DEBUG(201):     #02 pc 000328f1  /system/lib/libhwui.so
> 03-09  17:01:00.067: I/DEBUG(201):     #03 pc 0003428b  /system/lib/libhwui.so
> 03-09  17:01:00.067: I/DEBUG(201):     #04 pc 000342ef  /system/lib/libhwui.so
> 03-09  17:01:00.067: I/DEBUG(201):     #05 pc 000328f1  /system/lib/libhwui.so
> 03-09  17:01:00.068: I/DEBUG(201):     #06 pc 0003428b  /system/lib/libhwui.so
> 03-09  17:01:00.068: I/DEBUG(201):     #07 pc 000342ef  /system/lib/libhwui.so
> 03-09  17:01:00.068: I/DEBUG(201):     #08 pc 000328f1  /system/lib/libhwui.so
> 03-09  17:01:00.068: I/DEBUG(201):     #09 pc 0003428b  /system/lib/libhwui.so
> 03-09  17:01:00.068: I/DEBUG(201):     #10 pc 000342ef  /system/lib/libhwui.so
> 03-09  17:01:00.068: I/DEBUG(201):     #11 pc 000328f1  /system/lib/libhwui.so
> 03-09  17:01:00.068: I/DEBUG(201):     #12 pc 0003428b  /system/lib/libhwui.so
> 03-09  17:01:00.068: I/DEBUG(201):     #13 pc 000342ef  /system/lib/libhwui.so
> 03-09  17:01:00.068: I/DEBUG(201):     #14 pc 000328f1  /system/lib/libhwui.so
> 03-09  17:01:00.068: I/DEBUG(201):     #15 pc 0003428b  /system/lib/libhwui.so
> 03-09  17:01:00.068: I/DEBUG(201):     #16 pc 000342ef  /system/lib/libhwui.so
> 03-09  17:01:00.068: I/DEBUG(201):     #17 pc 000328f1  /system/lib/libhwui.so
> 03-09  17:01:00.068: I/DEBUG(201):     #18 pc 0003428b  /system/lib/libhwui.so
> 03-09  17:01:00.068: I/DEBUG(201):     #19 pc 000342ef  /system/lib/libhwui.so
> 03-09  17:01:00.068: I/DEBUG(201):     #20 pc 000328f1  /system/lib/libhwui.so
> 03-09  17:01:00.068: I/DEBUG(201):     #21 pc 0003428b  /system/lib/libhwui.so
> 03-09  17:01:00.068: I/DEBUG(201):     #22 pc 000342ef  /system/lib/libhwui.so
> 03-09  17:01:00.068: I/DEBUG(201):     #23 pc 0002bb27  /system/lib/libhwui.so
> 03-09  17:01:00.068: I/DEBUG(201):     #24 pc 0003b835  /system/lib/libhwui.so
> 03-09  17:01:00.068: I/DEBUG(201):     #25 pc 0003c74d  /system/lib/libhwui.so
> 03-09  17:01:00.068: I/DEBUG(201):     #26 pc 0003e27b  /system/lib/libhwui.so (android::uirenderer::renderthread::RenderThread::threadLoop()+66)
> 03-09  17:01:00.068: I/DEBUG(201):     #27 pc 000104d5  /system/lib/libutils.so (android::Thread::_threadLoop(void*)+112)
> 03-09  17:01:00.068: I/DEBUG(201):     #28 pc 0005df4d  /system/lib/libandroid_runtime.so (android::AndroidRuntime::javaThreadShell(void*)+72)
> 03-09  17:01:00.068: I/DEBUG(201):     #29 pc 00010045  /system/lib/libutils.so
> 03-09  17:01:00.068: I/DEBUG(201):     #30 pc 00015ed3  /system/lib/libc.so (__pthread_start(void*)+30)
> 03-09  17:01:00.068: I/DEBUG(201):     #31 pc 00013ea7  /system/lib/libc.so (__start_thread+6)
Comment 37 Iliass Yousfi 2015-03-23 08:50:37 UTC
Any help please ?
I've got another log pointing to dictionary manipulation's exception that should never happen (see below).
I'm wondering if there is a problem with linking or what?

> 03-20 14:56:22.621: V/dcX50ModelBacnet(2738): Building the X50 entities on device ECB_453_TEST finished. 28 X50 entity(s) have been found
> 03-20 14:56:22.621: D/dcX50ModelBacnet(2738): Refreshing Alarms using service
> 03-20 14:56:22.621: D/dcX50ModelBacnet(2738): Refreshing Alarms using service
> 03-20 14:56:22.650: E/dcX50CoreX50Menu(2738): System.IndexOutOfRangeException: Array index is out of range.
> 03-20 14:56:22.650: E/dcX50CoreX50Menu(2738):   at System.Collections.Generic.Dictionary`2[System.String,Distech.Shared.Portable.Properties.DynamicMemberInfo].Add (System.String key, Distech.Shared.Portable.Properties.DynamicMemberInfo value) [0x00000] in <filename unknown>:0 
> 03-20 14:56:22.650: E/dcX50CoreX50Menu(2738):   at Distech.Shared.Portable.Properties.DynamicTypeInfo.GetObjectMemberInfo (System.String memberName) [0x00000] in <filename unknown>:0 
> 03-20 14:56:22.650: E/dcX50CoreX50Menu(2738):   at Distech.Shared.Portable.Properties.DynamicTypeInfo.GetObjectMemberAttributes (System.String memberName) [0x00000] in <filename unknown>:0 
> 03-20 14:56:22.650: E/dcX50CoreX50Menu(2738):   at Distech.Shared.Portable.Properties.DynamicObjectTypeRepository.GetObjectMemberAttributes (System.Type objectType, System.String memberName) [0x00000] in <filename unknown>:0 
> 03-20 14:56:22.650: E/dcX50CoreX50Menu(2738):   at Distech.Shared.Portable.Properties.ObjectMember.InitializeAttributeCollections () [0x00000] in <filename unknown>:0 
> 03-20 14:56:22.650: E/dcX50CoreX50Menu(2738):   at Distech.Shared.Portable.Properties.ObjectMember.get_Attributes () [0x00000] in <filename unknown>:0 
> 03-20 14:56:22.650: E/dcX50CoreX50Menu(2738):   at Distech.Shared.Portable.Properties.ObjectMember.GetAttributes (System.Type attributeType, Boolean inherit) [0x00000] in <filename unknown>:0 
> 03-20 14:56:22.650: E/dcX50CoreX50Menu(2738):   at Distech.Shared.Portable.Properties.ObjectMember.GetAttribute (System.Type attributeType, Boolean inherit) [0x00000] in <filename unknown>:0 
> 03-20 14:56:22.650: E/dcX50CoreX50Menu(2738):   at Distech.Shared.Portable.Properties.ObjectProperty.get_DefaultValue () [0x00000] in <filename unknown>:0 
> 03-20 14:56:22.650: E/dcX50CoreX50Menu(2738):   at Distech.Shared.Portable.Properties.ObjectProperty..ctor (System.Object owner, System.String name) [0x00000] in <filename unknown>:0 
> 03-20 14:56:22.650: E/dcX50CoreX50Menu(2738):   at Distech.Network.Data.Bacnet.Portable.BacnetProperty..ctor (System.Object owner, System.String name, Boolean isNull) [0x00000] in <filename unknown>:0 
> 03-20 14:56:22.650: E/dcX50CoreX50Menu(2738):   at Distech.Network.Data.Bacnet.Portable.GenericBacnetProperty`1[Distech.Network.Data.Bacnet.Portable.EnrollmentSummaryEventStateFilter]..ctor (System.Object owner, System.String name) [0x00000] in <filename unknown>:0 
> 03-20 14:56:22.650: E/dcX50CoreX50Menu(2738):   at Distech.Network.Data.Bacnet.Portable.GetEnrollmentSummaryServiceRequest..ctor () [0x00000] in <filename unknown>:0 
> 03-20 14:56:22.650: E/dcX50CoreX50Menu(2738):   at Distech.Network.Data.Bacnet.Portable.BcpProtocol.FieldBus.GetEnrollmentSummaryRequest..ctor () [0x00000] in <filename unknown>:0 
> 03-20 14:56:22.650: E/dcX50CoreX50Menu(2738):   at Distech.Network.Data.Bacnet.Portable.BacnetDeviceAlarmManager.ReadAlarms (EnrollmentSummaryEventStateFilter eventState, AlarmAcknowledgmentState acknowledgementState, System.Collections.Generic.List`1 alarms) [0x00000] in <filename unknown>:0 
> 03-20 14:56:22.650: E/dcX50CoreX50Menu(2738):   at Distech.Network.Data.Bacnet.Portable.BacnetDeviceAlarmManager.RefreshAlarmList () [0x00000] in <filename unknown>:0 
> 03-20 14:56:22.650: E/dcX50CoreX50Menu(2738):   at Distech.X50.Model.Bacnet.Alarms.BacnetAlarmManager.RefreshAndNotifyAlarmList () [0x00000] in <filename unknown>:0 
> 03-20 14:56:22.650: E/dcX50CoreX50Menu(2738):   at Distech.X50.Model.Bacnet.BacnetX50Device.Refresh (IList`1 pointList, Distech.X50.Model.Common.Categories.X50ViewCategory category, Boolean pollContext) [0x00000] in <filename unknown>:0 
> 03-20 14:56:22.650: E/dcX50CoreX50Menu(2738):   at Distech.X50.Model.Bacnet.BacnetX50Device.Refresh (IList`1 pointList, Distech.X50.Model.Common.Categories.X50ViewCategory category) [0x00000] in <filename unknown>:0 
> 03-20 14:56:22.650: E/dcX50CoreX50Menu(2738):   at Distech.X50.Core.ViewModels.X50ViewModel.RefreshX50ItemStates () [0x00000] in <filename unknown>:0 
> 03-20 14:56:22.650: E/dcX50CoreX50Menu(2738):   at Distech.X50.Core.ViewModels.X50ViewModel.LoadDevice () [0x00000] in <filename unknown>:0 
> 03-20 14:56:22.651: E/dcX50CoreX50Menu(2738): System.ArgumentException: length
> 03-20 14:56:22.651: E/dcX50CoreX50Menu(2738):   at System.Array.Copy (System.Array sourceArray, Int32 sourceIndex, System.Array destinationArray, Int32 destinationIndex, Int32 length) [0x00000] in <filename unknown>:0 
> 03-20 14:56:22.651: E/dcX50CoreX50Menu(2738):   at System.Collections.Generic.Dictionary`2[System.String,Distech.Shared.Portable.Properties.DynamicMemberInfo].Resize () [0x00000] in <filename unknown>:0 
> 03-20 14:56:22.651: E/dcX50CoreX50Menu(2738):   at System.Collections.Generic.Dictionary`2[System.String,Distech.Shared.Portable.Properties.DynamicMemberInfo].Add (System.String key, Distech.Shared.Portable.Properties.DynamicMemberInfo value) [0x00000] in <filename unknown>:0 
> 03-20 14:56:22.651: E/dcX50CoreX50Menu(2738):   at Distech.Shared.Portable.Properties.DynamicTypeInfo.GetObjectMemberInfo (System.String memberName) [0x00000] in <filename unknown>:0 
> 03-20 14:56:22.651: E/dcX50CoreX50Menu(2738):   at Distech.Shared.Portable.Properties.DynamicTypeInfo.GetObjectMemberAttributes (System.String memberName) [0x00000] in <filename unknown>:0 
> 03-20 14:56:22.651: E/dcX50CoreX50Menu(2738):   at Distech.Shared.Portable.Properties.DynamicObjectTypeRepository.GetObjectMemberAttributes (System.Type objectType, System.String memberName) [0x00000] in <filename unknown>:0 
> 03-20 14:56:22.651: E/dcX50CoreX50Menu(2738):   at Distech.Shared.Portable.Properties.ObjectMember.InitializeAttributeCollections () [0x00000] in <filename unknown>:0 
> 03-20 14:56:22.651: E/dcX50CoreX50Menu(2738):   at Distech.Shared.Portable.Properties.ObjectMember.get_Attributes () [0x00000] in <filename unknown>:0 
> 03-20 14:56:22.651: E/dcX50CoreX50Menu(2738):   at Distech.Shared.Portable.Properties.ObjectMember.GetAttributes (System.Type attributeType, Boolean inherit) [0x00000] in <filename unknown>:0 
> 03-20 14:56:22.651: E/dcX50CoreX50Menu(2738):   at Distech.Shared.Portable.Properties.ObjectMember.GetAttribute (System.Type attributeType, Boolean inherit) [0x00000] in <filename unknown>:0 
> 03-20 14:56:22.651: E/dcX50CoreX50Menu(2738):   at Distech.Shared.Portable.Properties.ObjectProperty.get_DefaultValue () [0x00000] in <filename unknown>:0 
> 03-20 14:56:22.651: E/dcX50CoreX50Menu(2738):   at Distech.Shared.Portable.Properties.ObjectProperty..ctor (System.Object owner, System.String name) [0x00000] in <filename unknown>:0 
> 03-20 14:56:22.651: E/dcX50CoreX50Menu(2738):   at Distech.Network.Data.Bacnet.Portable.BacnetProperty..ctor (System.Object owner, System.String name, Boolean isNull) [0x00000] in <filename unknown>:0 
> 03-20 14:56:22.651: E/dcX50CoreX50Menu(2738):   at Distech.Network.Data.Bacnet.Portable.GenericBacnetProperty`1[Distech.Network.Data.Bacnet.Portable.EnrollmentSummaryEventStateFilter]..ctor (System.Object owner, System.String name) [0x00000] in <filename unknown>:0 
> 03-20 14:56:22.651: E/dcX50CoreX50Menu(2738):   at Distech.Network.Data.Bacnet.Portable.GetEnrollmentSummaryServiceRequest..ctor () [0x00000] in <filename unknown>:0 
> 03-20 14:56:22.651: E/dcX50CoreX50Menu(2738):   at Distech.Network.Data.Bacnet.Portable.BcpProtocol.FieldBus.GetEnrollmentSummaryRequest..ctor () [0x00000] in <filename unknown>:0 
> 03-20 14:56:22.651: E/dcX50CoreX50Menu(2738):   at Distech.Network.Data.Bacnet.Portable.BacnetDeviceAlarmManager.ReadAlarms (EnrollmentSummaryEventStateFilter eventState, AlarmAcknowledgmentState acknowledgementState, System.Collections.Generic.List`1 alarms) [0x00000] in <filename unknown>:0 
> 03-20 14:56:22.651: E/dcX50CoreX50Menu(2738):   at Distech.Network.Data.Bacnet.Portable.BacnetDeviceAlarmManager.RefreshAlarmList () [0x00000] in <filename unknown>:0 
> 03-20 14:56:22.651: E/dcX50CoreX50Menu(2738):   at Distech.X50.Model.Bacnet.Alarms.BacnetAlarmManager.RefreshAndNotifyAlarmList () [0x00000] in <filename unknown>:0 
> 03-20 14:56:22.651: E/dcX50CoreX50Menu(2738):   at Distech.X50.Model.Bacnet.BacnetX50Device.Refresh (IList`1 pointList, Distech.X50.Model.Common.Categories.X50ViewCategory category, Boolean pollContext) [0x00000] in <filename unknown>:0 
> 03-20 14:56:22.651: E/dcX50CoreX50Menu(2738):   at Distech.X50.Model.Bacnet.BacnetX50Device.Refresh (IList`1 pointList, Distech.X50.Model.Common.Categories.X50ViewCategory category) [0x00000] in <filename unknown>:0 
> 03-20 14:56:22.651: E/dcX50CoreX50Menu(2738):   at Distech.X50.Core.ViewModels.X50ViewModel.RefreshX50ItemStates () [0x00000] in <filename unknown>:0 
> 03-20 14:56:22.651: E/dcX50CoreX50Menu(2738):   at Distech.X50.Core.ViewModels.X50ViewModel.LoadDevice () [0x00000] in <filename unknown>:0
Comment 38 Jonathan Pryor 2015-03-23 11:58:30 UTC
@Iliass: There's a matter of things I can fix...and things I can't fix.

Comment #33 and Comment #34 are "outside" Xamarin.Android; there's nothing there for me to address. Some native thread, presumably controlled by Android (but not necessarily!), is crashing the process. Xamarin.Android doesn't appear *anywhere* in those stack traces, except maybe, *maybe*, the <unknown> frames in Comment #33, but even then it would "just" be C# methods calling into Java calling into libutils.so, which promptly blows up.

That's outside my ballpark, as it were.
Comment 39 Jonathan Pryor 2015-03-23 12:08:15 UTC
@Iliass: Comment #35 is weird and IS a Xamarin bug; it's a SIGSEGV from ves_icall_type_from_name():

https://github.com/mono/mono/blob/mono-3.10.0-branch/mono/metadata/icall.c#L1347-1369

We're not sure why that would fail; a testcase of some form would be required. Specifically, we know that `name` won't be NULL (it's checked in Type.cs), but beyond that we'd need a testcase to determine why this is failing. We haven't seen a crash from there before.

Regarding Comment #37, is the Dictionary<string, DynamicMemberInfo> being shared between multiple threads without locking?

https://github.com/mono/mono/blob/mono-3.10.0-branch/mcs/class/corlib/System.Collections.Generic/Dictionary.cs#L404-448

Every use of `index` is the modulus of the number of elements within `table`, so it can't be out of bounds, and `cur` shouldn't be out of bounds (as far as we can tell)...unless the Dictionary is being used by multiple threads, in which case all bets are off.
Comment 40 Iliass Yousfi 2015-03-23 16:09:42 UTC
Hi Jon

> Regarding Comment #37, is the Dictionary<string, DynamicMemberInfo> being shared between multiple threads without locking?
You are right, There may be multiple threads performing the add on that dictionary, but shouldn't be thread safe the Dictionary Add itself?
Comment 41 Jonathan Pryor 2015-03-23 17:36:18 UTC
> but shouldn't be thread safe the Dictionary Add itself?

No:

https://msdn.microsoft.com/en-us/library/xfhwa508(v=vs.110).aspx#threadSafetyToggle

> To allow the collection to be accessed by multiple threads for reading and writing,
> you must implement your own synchronization.

Furthermore, making Dictionary<TKey, TValue>.Add() thread-safe by default would be a Bad Idea:

http://www.jprl.com/Blog/archive/development/2008/May-27.html
Comment 42 Iliass Yousfi 2015-03-23 20:26:46 UTC
Thanks Jon,
Absolutely agree with you. We are using a third party like source code that implemented that on none thread safe manner.
That's where come the Concurrent Dictionary if they just use that instead :-)
Comment 43 Iliass Yousfi 2015-03-23 20:53:42 UTC
So Jon, I think we're getting a hint on what's going on, and that may apply for other cases.
I have the class X50ViewModel (the model that backs the android view X50View)
> public X50ViewModel()
> {
> 	// some code ...
> 	System.Threading.Tasks.TaskEx.Run(async () => await LoadDevice());
> }
I start the LoadDevice task in the ThreadPool so it will go on a separate thread. The LoadDevice will refresh some states from the network:
> private async System.Threading.Tasks.Task LoadDevice()
> {
> 	try
> 	{
> 		// some code ...
> 		RefreshX50ItemStates ();
> 	}
> 	catch (Exception e) { //toast error ... }
> }
If the RefreshX50ItemStates throws an exception (like we have in the "https://bugzilla.xamarin.com/show_bug.cgi?id=27256#c37" with the dictionary), it is handled whithin the try catch and should be properly handled (for this example a toast will be displayed lets say), while the app crashes instead! and that is the crash stack trace reported in the comment 37.
Comment 44 Iliass Yousfi 2015-03-24 17:34:47 UTC
No I can only believe that something's going wrong with mono runtime somewhere !!
The following crash trace showing MvvmCross itself crashing in a weird way. It can't be a bug within it:
> 03-19 16:30:31.997: E/mono-rt(30408): Stacktrace:
> 03-19 16:30:31.997: E/mono-rt(30408):   at <unknown> <0xffffffff>
> 03-19 16:30:31.997: E/mono-rt(30408):   at (wrapper managed-to-native) System.MonoType.GetPropertiesByName (System.MonoType,string,System.Reflection.BindingFlags,bool,System.Type) <IL 0x00032, 0xffffffff>
> 03-19 16:30:31.997: E/mono-rt(30408):   at System.MonoType.GetProperties (System.Reflection.BindingFlags) <IL 0x00005, 0x0005f>
> 03-19 16:30:31.997: E/mono-rt(30408):   at System.Reflection.RuntimeReflectionExtensions.GetRuntimeProperties (System.Type) <IL 0x0001a, 0x000bb>
> 03-19 16:30:31.997: E/mono-rt(30408):   at Cirrious.CrossCore.ReflectionExtensions.GetProperties (System.Type,Cirrious.CrossCore.BindingFlags) <IL 0x00025, 0x0011b>
> 03-19 16:30:31.997: E/mono-rt(30408):   at Cirrious.CrossCore.ReflectionExtensions.GetProperty (System.Type,string) <IL 0x00010, 0x000b3>
> 03-19 16:30:31.997: E/mono-rt(30408):   at Cirrious.MvvmCross.Binding.Bindings.Target.Construction.MvxTargetBindingFactoryRegistry.TryCreateReflectionBasedBinding (object,string,Cirrious.MvvmCross.Binding.Bindings.Target.IMvxTargetBinding&) <IL 0x0002d, 0x001cb>
> 03-19 16:30:31.997: E/mono-rt(30408):   at Cirrious.MvvmCross.Binding.Bindings.Target.Construction.MvxTargetBindingFactoryRegistry.CreateBinding (object,string) <IL 0x00013, 0x00103>
> 03-19 16:30:31.997: E/mono-rt(30408):   at Cirrious.MvvmCross.Binding.Bindings.MvxFullBinding.CreateTargetBinding (object) <IL 0x00015, 0x000cf>
> 03-19 16:30:31.998: E/mono-rt(30408):   at Cirrious.MvvmCross.Binding.Bindings.MvxFullBinding..ctor (Cirrious.MvvmCross.Binding.MvxBindingRequest) <IL 0x00019, 0x000f3>
> 03-19 16:30:31.998: E/mono-rt(30408):   at Cirrious.MvvmCross.Binding.Binders.MvxFromTextBinder.BindSingle (Cirrious.MvvmCross.Binding.MvxBindingRequest) <IL 0x00001, 0x0005f>
> 03-19 16:30:31.998: E/mono-rt(30408):   at Cirrious.MvvmCross.Binding.Binders.MvxFromTextBinder/<>c__DisplayClass1.<Bind>b__0 (Cirrious.MvvmCross.Binding.Bindings.MvxBindingDescription) <IL 0x00018, 0x00097>
> 03-19 16:30:31.998: E/mono-rt(30408):   at System.Linq.Enumerable/<CreateSelectIterator>c__Iterator10`2.MoveNext () <IL 0x00066, 0x002bf>
> 03-19 16:30:31.998: E/mono-rt(30408):   at System.Collections.Generic.List`1.AddEnumerable (System.Collections.Generic.IEnumerable`1<T>) <IL 0x0001b, 0x0018f>
> 03-19 16:30:31.998: E/mono-rt(30408):   at System.Collections.Generic.List`1.AddRange (System.Collections.Generic.IEnumerable`1<T>) <IL 0x0002c, 0x0011b>
> 03-19 16:30:31.998: E/mono-rt(30408):   at Cirrious.MvvmCross.Binding.Droid.Binders.MvxAndroidViewBinder.ApplyBindingsFromAttribute (Android.Views.View,Android.Content.Res.TypedArray,int) <IL 0x00026, 0x0015f>
> 03-19 16:30:31.998: E/mono-rt(30408):   at Cirrious.MvvmCross.Binding.Droid.Binders.MvxAndroidViewBinder.BindView (Android.Views.View,Android.Content.Context,Android.Util.IAttributeSet) <IL 0x00036, 0x0026f>
> 03-19 16:30:31.998: E/mono-rt(30408):   at Cirrious.MvvmCross.Binding.Droid.Binders.MvxBindingLayoutInflatorFactory.OnCreateView (string,Android.Content.Context,Android.Util.IAttributeSet) <IL 0x0002a, 0x00193>
> 03-19 16:30:31.998: E/mono-rt(30408):   at Android.Views.LayoutInflater/IFactoryInvoker.n_OnCreateView_Ljava_lang_String_Landroid_content_Context_Landroid_util_AttributeSet_ (intptr,intptr,intptr,intptr,intptr) [0x00022] in /Users/builder/data/lanes/monodroid-mlion-monodroid-4.20-series/ba9bbbdd/source/monodroid/src/Mono.Android/platforms/android-21/src/generated/Android.Views.LayoutInflater.cs:78
> 03-19 16:30:31.998: E/mono-rt(30408):   at (wrapper dynamic-method) object.dc905522-cc43-4304-8cf3-aa5369eae12a (intptr,intptr,intptr,intptr,intptr) <IL 0x00023, 0x0005f>
> 03-19 16:30:31.998: E/mono-rt(30408):   at (wrapper native-to-managed) object.dc905522-cc43-4304-8cf3-aa5369eae12a (intptr,intptr,intptr,intptr,intptr) <IL 0x00028, 0xffffffff>
> 03-19 16:30:31.998: E/mono-rt(30408):   at <unknown> <0xffffffff>
> 03-19 16:30:31.999: E/mono-rt(30408):   at (wrapper managed-to-native) object.wrapper_native_0x4223f499 (intptr,intptr,intptr,Android.Runtime.JValue[]) <IL 0x00127, 0xffffffff>
> 03-19 16:30:31.999: E/mono-rt(30408):   at (wrapper delegate-invoke) <Module>.invoke_intptr_intptr_intptr_intptr_JValue[] (intptr,intptr,intptr,Android.Runtime.JValue[]) <IL 0x00063, 0xffffffff>
> 03-19 16:30:31.999: E/mono-rt(30408):   at Android.Runtime.JNIEnv.CallObjectMethod (intptr,intptr,Android.Runtime.JValue[]) [0x00040] in /Users/builder/data/lanes/monodroid-mlion-monodroid-4.20-series/ba9bbbdd/source/monodroid/src/Mono.Android/src/Runtime/JNIEnv.g.cs:191
> 03-19 16:30:31.999: E/mono-rt(30408):   at Android.Views.LayoutInflater.Inflate (int,Android.Views.ViewGroup,bool) [0x00043] in /Users/builder/data/lanes/monodroid-mlion-monodroid-4.20-series/ba9bbbdd/source/monodroid/src/Mono.Android/platforms/android-21/src/generated/Android.Views.LayoutInflater.cs:609
> 03-19 16:30:31.999: E/mono-rt(30408):   at Cirrious.MvvmCross.Binding.Droid.BindingContext.MvxAndroidBindingContext.CommonInflate (int,Android.Views.ViewGroup,Cirrious.MvvmCross.Binding.Droid.Binders.IMvxLayoutInfactorFactory,bool) <IL 0x00033, 0x00213>
> 03-19 16:30:31.999: E/mono-rt(30408):   at Cirrious.MvvmCross.Binding.Droid.BindingContext.MvxAndroidBindingContext.BindingInflate (int,Android.Views.ViewGroup,bool) <IL 0x00015, 0x00107>
> 03-19 16:30:31.999: E/mono-rt(30408):   at Cirrious.MvvmCross.Binding.Droid.BindingContext.MvxAndroidBindingContext.BindingInflate (int,Android.Views.ViewGroup) <IL 0x00004, 0x00063>
> 03-19 16:30:31.999: E/mono-rt(30408):   at Cirrious.MvvmCross.Binding.Droid.Views.MvxListItemView..ctor (Android.Content.Context,Cirrious.MvvmCross.Binding.Droid.Views.IMvxLayoutInflater,object,int) <IL 0x0001a, 0x000cf>
> 03-19 16:30:31.999: E/mono-rt(30408):   at Cirrious.MvvmCross.Binding.Droid.Views.MvxAdapter.CreateBindableView (object,int) <IL 0x00013, 0x000bb>
> 03-19 16:30:31.999: E/mono-rt(30408):   at Cirrious.MvvmCross.Binding.Droid.Views.MvxAdapter.GetBindableView (Android.Views.View,object,int) <IL 0x00027, 0x00283>
> 03-19 16:30:31.999: E/mono-rt(30408):   at Cirrious.MvvmCross.Binding.Droid.Views.MvxAdapter.GetView (int,Android.Views.View,Android.Views.ViewGroup,int) <IL 0x00028, 0x0015f>
> 03-19 16:30:32.000: E/mono-rt(30408):   at Cirrious.MvvmCross.Binding.Droid.Views.MvxAdapter.GetView (int,Android.Views.View,Android.Views.ViewGroup) <IL 0x0001d, 0x00143>
> 03-19 16:30:32.000: E/mono-rt(30408):   at Distech.X50.UI.Droid.Views.X50MenuViewAdapter.GetView (int,Android.Views.View,Android.Views.ViewGroup) [0x00001] in c:\TFS\Mobile\x50\Main\Src\Distech.X50.UI.Droid\Views\X50View.cs:108
> 03-19 16:30:32.000: E/mono-rt(30408):   at Android.Widget.BaseAdapter.n_GetView_ILandroid_view_View_Landroid_view_ViewGroup_ (intptr,intptr,int,intptr,intptr) [0x0001a] in /Users/builder/data/lanes/monodroid-mlion-monodroid-4.20-series/ba9bbbdd/source/monodroid/src/Mono.Android/platforms/android-21/src/generated/Android.Widget.BaseAdapter.cs:460
> 03-19 16:30:32.000: E/mono-rt(30408):   at (wrapper dynamic-method) object.d7a9b881-47ef-40fa-856e-dc982f448896 (intptr,intptr,int,intptr,intptr) <IL 0x00023, 0x0005f>
> 03-19 16:30:32.000: E/mono-rt(30408):   at (wrapper native-to-managed) object.d7a9b881-47ef-40fa-856e-dc982f448896 (intptr,intptr,int,intptr,intptr) <IL 0x00028, 0xffffffff>
Comment 46 Iliass Yousfi 2015-03-24 17:43:35 UTC
Will this be related to the bug listed here "https://bugzilla.xamarin.com/show_bug.cgi?id=26307"
Comment 47 Iliass Yousfi 2015-03-25 08:42:05 UTC
By the way, just to confirm that those strange behavior are happening only on Nexus7 (version 2012), Samsung Galaxy Tab 3.
When I do tests on Nexus 5, I can't reproduce that
Comment 48 Jonathan Pryor 2015-03-25 14:40:49 UTC
@Iliass: Are you using Xamarin.Android 4.20 (current stable) or the 5.0 preview?

Xamarin.Android 4.20 is based on mono 3.10, and thus doesn't suffer from Bug #26307 (which is present in Mono 3.12). 5.0 presumably would trigger that bug.

Regarding Comment #43:

> 	System.Threading.Tasks.TaskEx.Run(async () => await LoadDevice());

What is TaskEx?

Assuming it's supposed to be Task, if I add this to OnCreate():

    Task.Run (async () => await LoadDevice ());

And this to the body of the default MainActivity type:

    async Task LoadDevice ()
    {
      try {
        throw new InvalidProgramException ("DIE DIE DIE");
      }
      catch (Exception e) {
        Console.WriteLine ("LoadDevice failed! {0}", e);
        Toast.MakeText (this, "LoadDevice Exception: " + e.Message,
            ToastLength.Short)
          .Show ();
      }
      return;
    }

I don't see any crash. (The exception is printed to `adb logcat`, but the app doesn't die.)

Finally, regarding Comment #44, unfortunately that stack trace isn't enough to build off of; Reflection tends to pull in ~everything, so it's hard to say why it's crashing without being able to reproduce it. ;-(
Comment 49 Iliass Yousfi 2015-03-25 15:38:30 UTC
Yes Jon, 
On Comment #1 I had all my Xamarin versions. It's Xamarin.Android   4.20.0.28 (ba9bbbdd44cfdc4bf485e8885bd2ad24fba525f7)

> What is TaskEx? in : System.Threading.Tasks.TaskEx.Run(async () => await LoadDevice());
It's from the Microsoft.Bcl.Async (used directly in PCL)

>Assuming it's supposed to be Task, if I add this to OnCreate():
Yes it is Task.
But I used from within my PCL project (containing X50ViewModel class) that refers to Microsoft.Bcl.Async to use async/await for asynchronous tasks on a PCL library.
So I don't call it from the Android project

> I don't see any crash. (The exception is printed to `adb logcat`, but the app doesn't die.)
You are right, I can get most of the time the exception logged on my logcat if any (for example when we got disconnected from the server).
But things gets weird only sometimes when we leave the android X50View (which is an activity in Android project backed by the PCL X50ViewModel class as upon MvvmCross mechanism) by pressing the back button, which can happen while the task called on the ThreadPool using
> System.Threading.Tasks.TaskEx.Run(async () => await LoadDevice());)
is still running.

>Finally, regarding Comment #44, unfortunately that stack trace isn't enough
Well this is my headache :-(
The stack trace shows "at <unknown> <0xffffffff>", which doesn't help at all? what is the exception? Is it an exception or not??
For me it looks like a SEGFault with memory corruption in the native part which I have no idea what it is?

>Reflection tends to pull in ~everything
This is the whole story, not only in the Comment #44, I gathered almost ~35 adb logs, and 95% of them shows the issue hapening in the Mono Reflection part like in here :

> 03-24 15:15:16.229: E/mono-rt(1255):   at <unknown> <0xffffffff>
> 03-24 15:15:16.229: E/mono-rt(1255):   at (wrapper managed-to-native) System.MonoType.GetPropertiesByName (System.MonoType,string,System.Reflection.BindingFlags,bool,System.Type) <IL 0x00032, 0xffffffff>
> 03-24 15:15:16.229: E/mono-rt(1255):   at System.MonoType.GetProperties (System.Reflection.BindingFlags) <IL 0x00005, 0x0005f>
> 03-24 15:15:16.230: E/mono-rt(1255):   at System.Type.FindMembers (System.Reflection.MemberTypes,System.Reflection.BindingFlags,System.Reflection.MemberFilter,object) <IL 0x000cb, 0x005cb>
> 03-24 15:15:16.230: E/mono-rt(1255):   at System.Type.GetMember (string,System.Reflection.MemberTypes,System.Reflection.BindingFlags) <IL 0x00031, 0x0017f>
> 03-24 15:15:16.230: E/mono-rt(1255):   at System.Type.GetMember (string,System.Reflection.BindingFlags) <IL 0x00008, 0x00063>
> 03-24 15:15:16.230: E/mono-rt(1255):   at X50.Shared.Portable.Plugins.Droid.ReflectionServiceImpl.GetMember (System.Type,string,X50.Shared.Portable.Plugins.Reflection.BindingFlags) <IL 0x0002c, 0x00153>
> 03-24 15:15:16.230: E/mono-rt(1255):   at X50.Shared.Portable.Extensions.ReflectionExtensions.GetMember (System.Type,string,X50.Shared.Portable.Plugins.Reflection.BindingFlags) <IL 0x00008, 0x00093>

Or this one:
> 03-19 16:08:59.393: E/mono-rt(26625): Stacktrace:
> 03-19 16:08:59.393: E/mono-rt(26625):   at <unknown> <0xffffffff>
> 03-19 16:08:59.393: E/mono-rt(26625):   at (wrapper managed-to-native) System.Array.SetValueImpl (System.Array,object,int) <0xffffffff>
> 03-19 16:08:59.393: E/mono-rt(26625):   at System.Array.Copy (System.Array,int,System.Array,int,int) <0x001db>
> 03-19 16:08:59.393: E/mono-rt(26625):   at System.Array.Copy (System.Array,System.Array,int) <0x0008b>
> 03-19 16:08:59.393: E/mono-rt(26625):   at System.Collections.ArrayList.CopyTo (System.Array) <0x00023>
> 03-19 16:08:59.393: E/mono-rt(26625):   at System.Type.FindMembers (System.Reflection.MemberTypes,System.Reflection.BindingFlags,System.Reflection.MemberFilter,object) <0x006bf>
> 03-19 16:08:59.393: E/mono-rt(26625):   at System.MonoType.GetMembers (System.Reflection.BindingFlags) <0x0003b>
> 03-19 16:08:59.393: E/mono-rt(26625):   at X50.Shared.Portable.Plugins.Droid.ReflectionServiceImpl.GetMembers (System.Type,X50.Shared.Portable.Plugins.Reflection.BindingFlags) <0x0002b>
> 03-19 16:08:59.393: E/mono-rt(26625):   at X50.Shared.Portable.Extensions.ReflectionExtensions.GetMembers (System.Type,X50.Shared.Portable.Plugins.Reflection.BindingFlags) <0x00037>

Another point here. Why the log trace shows "at <unknown> <0xffffffff>" when it gets to the native wrapper layer? does it mean that there is no stack there because we're not in the right mem ? or simply the no more ref in the mem?

If you have any suggestion I'll be more than grateful :-)

Thanks again
Comment 50 Iliass Yousfi 2015-04-16 10:49:12 UTC
I got a new exception trace. It may help for instance :
> 04-16 10:34:52.808: E/dcLegacy(5359): System.ObjectDisposedException: The object was used after being disposed.
> 04-16 10:34:52.808: E/dcLegacy(5359):   at System.Net.Sockets.NetworkStream.CheckDisposed () [0x00000] in <filename unknown>:0 
> 04-16 10:34:52.808: E/dcLegacy(5359):   at System.Net.Sockets.NetworkStream.Read (System.Byte[] buffer, Int32 offset, Int32 size) [0x00000] in <filename unknown>:0 
> 04-16 10:34:52.808: E/dcLegacy(5359):   at DC.Network.Data.Portable.Plugins.Droid.NetworkStreamImpl.DC.Network.Data.Portable.Plugins.INetworkStream.Read (System.Byte[] buffer, Int32 offset, Int32 size) [0x00001] in c:\TFS\Mobile\x50\Main\Shared\Src\Droid\DC.Network.Data.Portable.Plugins.Droid\NetworkStreamImpl.cs:43 
> 04-16 10:34:52.808: E/dcLegacy(5359):   at DC.Network.Data.Portable.BcpProtocol.v3.BcpIncomingMessage.ReadMessageFromServer () [0x00000] in <filename unknown>:0 
> 04-16 10:34:52.808: E/dcLegacy(5359):   at DC.Network.Data.Portable.BcpProtocol.v3.BcpIncomingMessage.Execute () [0x00000] in <filename unknown>:0 
> 04-16 10:34:52.808: E/dcLegacy(5359):   at DC.Network.Data.Portable.BcpProtocol.v3.BcpIncomingMessageManager.ReadNextMessage () [0x00000] in <filename unknown>:0 
> 04-16 10:34:52.808: E/dcLegacy(5359):   at DC.Network.Data.Portable.BcpProtocol.v3.BcpIncomingMessageManager.CheckIncomingMessages () [0x00000] in <filename unknown>:0
Comment 51 Jonathan Pryor 2015-04-16 11:07:13 UTC
> I got a new exception trace. It may help for instance :

That just suggests an app bug: NetworkStream.Read() was invoked after NetworkStream.Dispose() was called.

Why? I have no idea. I'd suggest looking for all Close() and Dispose() calls, see if the Stream is from a class field, and if it is ensure that the field is null'ed out after Close()ing it.

...which would then result in a NullReferenceException instead of an ObjectDisposedException, which might not be any better...

Note You need to log in before you can comment on or make changes to this bug.