Please, look at this test case

https://github.com/PVoLan/TestAccelerometer

Try to launch it anywhere with working accelerometer and GREF limit 2000.
Here is a result of launching it on my Tablet LUNA RMD 7 with Android 2.3.1

*****************************************************
I/-------------(13856): Works for: 00:01:03.0616770

I/-------------(13856): X: -0,4190114 Y: -0,4190114 Z: -9,218251

I/-------------(13856): Works for: 00:01:03.0917880

I/-------------(13856): X: 0 Y: 0 Z: -9,218251

I/-------------(13856): Works for: 00:01:03.1223860

I/-------------(13856): X: -0,4190114 Y: -0,4190114 Z: -9,218251

I/mono    (13856): Stacktrace:

I/mono    (13856): 

I/mono    (13856):   at Android.Runtime.JNIEnv.NewGlobalRef (intptr)
<0x00043>

I/mono    (13856):   at Java.Lang.Object.RegisterInstance
(Android.Runtime.IJavaObject,intptr,Android.Runtime.JniHandleOwnership)
<0x000ab>

I/mono    (13856):   at Java.Lang.Object.SetHandle
(intptr,Android.Runtime.JniHandleOwnership) <0x00023>

I/mono    (13856):   at Java.Lang.Object..ctor
(intptr,Android.Runtime.JniHandleOwnership) <0x0003f>

I/mono    (13856):   at Android.Runtime.JavaArray`1..ctor
(intptr,Android.Runtime.JniHandleOwnership) <0x00023>

I/mono    (13856):   at Android.Hardware.SensorEvent.get_Values () <0x000a7>

I/mono    (13856):   at
TestAccelerometer.Activity1/SensorListener.OnSensorChanged
(Android.Hardware.SensorEvent) <0x0001f>

I/mono    (13856):   at
Android.Hardware.ISensorEventListenerInvoker.n_OnSensorChanged_Landroid_hardware_SensorEvent_
(intptr,intptr,intptr) <0x0005b>

I/mono    (13856):   at (wrapper dynamic-method)
object.acbbd3ad-b7ba-425f-b991-404a34d5e9e9 (intptr,intptr,intptr) <0x00033>

I/mono    (13856):   at (wrapper native-to-managed)
object.acbbd3ad-b7ba-425f-b991-404a34d5e9e9 (intptr,intptr,intptr)
<0xffffffff>
*****************************************************

Note that Exception is thrown from SensorEvent.get_Values () (it always is
thrown there usually). Test case is very simple, there is no any GREFs I
create by myself, so, looks like bug is inside of monodroid.

--
View this message in context: 
http://mono-for-android.1047100.n5.nabble.com/Excessive-JNI-global-references-2001-on-hardware-tp5081943p5453733.html
Sent from the Mono for Android mailing list archive at Nabble.com.
_______________________________________________
Monodroid mailing list
Monodroid@lists.ximian.com

UNSUBSCRIBE INFORMATION:
http://lists.ximian.com/mailman/listinfo/monodroid

Reply via email to