[Mono-bugs] [Bug 671885] New: HelloGridView fails to run (linker + classlib)

bugzilla_noreply at novell.com bugzilla_noreply at novell.com
Mon Feb 14 17:26:16 EST 2011


https://bugzilla.novell.com/show_bug.cgi?id=671885

https://bugzilla.novell.com/show_bug.cgi?id=671885#c0


           Summary: HelloGridView fails to run (linker + classlib)
    Classification: Mono
           Product: MonoDroid
           Version: SVN
          Platform: Other
        OS/Version: Other
            Status: NEW
          Severity: Normal
          Priority: P5 - None
         Component: Class Libraries
        AssignedTo: mkestner at novell.com
        ReportedBy: jpryor at novell.com
         QAContact: mono-bugs at lists.ximian.com
          Found By: ---
           Blocker: ---


Created an attachment (id=413958)
 --> (http://bugzilla.novell.com/attachment.cgi?id=413958)
HelloGridView.zip

Follow the tutorial at: http://monodroid.net/Tutorials/Hello_Views/Grid_View

(which is helpfully attached to the bug so that you don't actually have to
follow the tutorial...)

There are two problems with HelloGridView:

1. The linker is busted:

If you enable the linker (currently disabled in the above .zip), build and run
(on an N1 in this case), `adb logcat` shows:


E/mono    (18085): [0xafd4a828:] EXCEPTION handling: System.ArgumentException:
Couldn't bind to method 'GetOnItemClickHandler'.
E/mono    (18085): [0xafd4a828:] EXCEPTION handling:
System.TypeInitializationException: An exception was thrown by the type
initializer for Android.Widget.ItemClickImplementor
I/MonoDroid(18085): UNHANDLED EXCEPTION: System.TypeInitializationException: An
exception was thrown by the type initializer for
Android.Widget.ItemClickImplementor ---> System.ArgumentException: Couldn't
bind to method 'GetOnItemClickHandler'.
I/MonoDroid(18085):   at System.Delegate.GetCandidateMethod (System.Type type,
System.Type target, System.String method, BindingFlags bflags, Boolean
ignoreCase, Boolean throwOnBindFailure) [0x00000] in <filename unknown>:0 
I/MonoDroid(18085):   at System.Delegate.CreateDelegate (System.Type type,
System.Type target, System.String method, Boolean ignoreCase, Boolean
throwOnBindFailure) [0x00000] in <filename unknown>:0 
I/MonoDroid(18085):   at System.Delegate.CreateDelegate (System.Type type,
System.Type target, System.String method) [0x00000] in <filename unknown>:0 
I/MonoDroid(18085):   at Android.Runtime.JNIEnv.RegisterJniNatives (IntPtr
typeName_ptr, Int32 typeName_len, IntPtr jniClass, IntPtr methods_ptr, Int32
methods_len) [0x00000] in <filename unknown>:0 
I/MonoDroid(18085):   at (wrapper delegate-invoke)
<Module>:invoke_intptr__this___intptr_intptr_string_string
(intptr,intptr,string,string)
I/MonoDroid(18085):   at Android.Runtime.JNIEnv.GetMethodID (IntPtr kls,
System.String name, System.String signature) [0x00000] in <filename unknown>:0 
I/MonoDroid(18085):   at Android.Widget.ItemClickImplementor..cctor ()
[0x00000] in <filename unknown>:0 
I/MonoDroid(18085):   --- End of inner exception stack trace ---
I/MonoDroid(18085): at Android.Widget.AdapterView.add_ItemClick
(System.EventHandler`1<Android.Widget.ItemEventArgs>) <0x00027>
I/MonoDroid(18085): at HelloGridView.Activity1.OnCreate (Android.OS.Bundle)
<0x00113>
I/MonoDroid(18085): at Android.App.Activity.n_OnCreate_Landroid_os_Bundle_
(intptr,intptr,intptr) <0x00057>
I/MonoDroid(18085): at (wrapper dynamic-method)
object.52788013-24af-4eea-b736-417279568c92 (intptr,intptr,intptr) <0x00033>
E/mono    (18085): [0xafd4a828:] EXCEPTION handling:
System.MissingMethodException: No constructor found for
Java.Lang.ExceptionInInitializerError::.ctor(System.String)
E/mono    (18085): 
E/mono    (18085): Unhandled Exception: System.MissingMethodException: No
constructor found for
Java.Lang.ExceptionInInitializerError::.ctor(System.String)
E/mono    (18085): at System.Activator.CreateInstance
(System.Type,System.Reflection.BindingFlags,System.Reflection.Binder,object[],System.Globalization.CultureInfo,object[])
<0x0034c>
E/mono    (18085): at System.Activator.CreateInstance
(System.Type,object[],object[]) <0x0003f>
E/mono    (18085): at System.Activator.CreateInstance (System.Type,object[])
<0x0002f>
E/mono    (18085): at Java.Lang.Throwable.FromException (System.Exception)
<0x001a3>
E/mono    (18085): at Android.Runtime.AndroidEnvironment.UnhandledException
(System.Exception) <0x000d3>
E/mono    (18085): at (wrapper dynamic-method)
object.52788013-24af-4eea-b736-417279568c92 (intptr,intptr,intptr) <0x00087>
E/mono    (18085): at (wrapper native-to-managed)
object.52788013-24af-4eea-b736-417279568c92 (intptr,intptr,intptr) <0x00043>
E/mono    (18085): 
I/ActivityManager(30128): Process hellogridview.hellogridview (pid 18085) has
died.


2. There's an apparent bug in the Mono.Android.dll binding, as building and
running without linking produces:


I/ActivityManager(30128): Start proc hellogridview.hellogridview for activity
hellogridview.hellogridview/hellogridview.Activity1: pid=18203 uid=10066
gids={3003, 1015}
I/ActivityThread(18203): Publishing provider
hellogridview.hellogridview.__mono_init__: mono.MonoRuntimeProvider
D/dalvikvm(18203): Trying to load lib
/data/data/hellogridview.hellogridview/lib/libmonodroid.so 0x449e2f08
D/dalvikvm(18203): Added shared lib
/data/data/hellogridview.hellogridview/lib/libmonodroid.so 0x449e2f08
I/mkestner(18203): environment supports jni NewWeakGlobalRef
V/RenderScript_jni(30218): surfaceDestroyed
D/dalvikvm(18203): GC_FOR_MALLOC freed 12991 objects / 486096 bytes in 33ms
D/dalvikvm(18203): GC_FOR_MALLOC freed 10210 objects / 477000 bytes in 29ms
E/mono    (18203): [0xafd4a828:] EXCEPTION handling:
Java.Lang.ClassNotFoundException: Exception of type
'Java.Lang.ClassNotFoundException' was thrown.
E/mono    (18203): [0xafd4a828:] EXCEPTION handling:
Java.Lang.NoClassDefFoundError: Exception of type
'Java.Lang.NoClassDefFoundError' was thrown.
D/AndroidRuntime(18203): Shutting down VM
W/dalvikvm(18203): threadid=1: thread exiting with uncaught exception
(group=0x4001d7f0)
E/AndroidRuntime(18203): FATAL EXCEPTION: main
E/AndroidRuntime(18203): java.lang.ClassCastException:
android.view.ViewGroup$LayoutParams
E/AndroidRuntime(18203):     at
android.widget.GridView.onMeasure(GridView.java:934)
E/AndroidRuntime(18203):     at android.view.View.measure(View.java:8171)
E/AndroidRuntime(18203):     at
android.view.ViewGroup.measureChildWithMargins(ViewGroup.java:3132)
E/AndroidRuntime(18203):     at
android.widget.FrameLayout.onMeasure(FrameLayout.java:245)
E/AndroidRuntime(18203):     at android.view.View.measure(View.java:8171)
E/AndroidRuntime(18203):     at
android.widget.LinearLayout.measureVertical(LinearLayout.java:526)
E/AndroidRuntime(18203):     at
android.widget.LinearLayout.onMeasure(LinearLayout.java:304)
E/AndroidRuntime(18203):     at android.view.View.measure(View.java:8171)
E/AndroidRuntime(18203):     at
android.view.ViewGroup.measureChildWithMargins(ViewGroup.java:3132)
E/AndroidRuntime(18203):     at
android.widget.FrameLayout.onMeasure(FrameLayout.java:245)
E/AndroidRuntime(18203):     at android.view.View.measure(View.java:8171)
E/AndroidRuntime(18203):     at
android.view.ViewRoot.performTraversals(ViewRoot.java:801)
E/AndroidRuntime(18203):     at
android.view.ViewRoot.handleMessage(ViewRoot.java:1727)
E/AndroidRuntime(18203):     at
android.os.Handler.dispatchMessage(Handler.java:99)
E/AndroidRuntime(18203):     at android.os.Looper.loop(Looper.java:123)
E/AndroidRuntime(18203):     at
android.app.ActivityThread.main(ActivityThread.java:4627)
E/AndroidRuntime(18203):     at java.lang.reflect.Method.invokeNative(Native
Method)
E/AndroidRuntime(18203):     at
java.lang.reflect.Method.invoke(Method.java:521)
E/AndroidRuntime(18203):     at
com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:858)
E/AndroidRuntime(18203):     at
com.android.internal.os.ZygoteInit.main(ZygoteInit.java:616)
E/AndroidRuntime(18203):     at dalvik.system.NativeStart.main(Native Method)
D/dalvikvm(18203): GC_FOR_MALLOC freed 8006 objects / 415480 bytes in 31ms
W/ActivityManager(30128):   Force finishing activity
hellogridview.hellogridview/hellogridview.Activity1
W/ActivityManager(30128): Activity pause timeout for HistoryRecord{44b9cb18
hellogridview.hellogridview/hellogridview.Activity1}
V/RenderScript_jni(30218): surfaceCreated
V/RenderScript_jni(30218): surfaceChanged
I/ActivityManager(30128): No longer want com.android.settings (pid 10413):
hidden #16
W/ActivityManager(30128): Activity destroy timeout for HistoryRecord{44b9cb18
hellogridview.hellogridview/hellogridview.Activity1}
D/dalvikvm(30285): GC_EXPLICIT freed 957 objects / 141456 bytes in 120ms
I/Process (18203): Sending signal. PID: 18203 SIG: 9
W/InputManagerService(30128): Window already focused, ignoring focus gain of:
com.android.internal.view.IInputMethodClient$Stub$Proxy at 44bed698
I/ActivityManager(30128): Process hellogridview.hellogridview (pid 18203) has
died.

-- 
Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the QA contact for the bug.


More information about the mono-bugs mailing list