[mono-android] monodroid-samples/ApiDemo exception at start-up
Len Charest
len at shingl.com
Tue Mar 15 18:01:37 EDT 2011
Thanks for your feedback, Jon. I've attached the relevant part of the log.
-Len
On Tue, Mar 15, 2011 at 2:08 PM, Jonathan Pryor <jpryor at novell.com> wrote:
> On Mar 15, 2011, at 3:39 PM, Len Charest wrote:
> > I'm trying to run the ApiDemo sample app (found at
> https://github.com/mono/monodroid-samples) in an emulator. The app crashes
> at start-up with the following error:
> >
> > E/mono ( 1591): Unhandled Exception:
> System.TypeInitializationException: An exception was thrown by the type
> initializer for Android.Util.Log ---> System.NullReferenceException: Object
> reference not set to an instance of an object
> > E/mono ( 1591): at Android.Runtime.JNIEnv.FindClass (System.String
> classname) [0x00000] in <filename unknown>:0
> > E/mono ( 1591): at Android.Util.Log..cctor () [0x00000] in <filename
> unknown>:0
> > E/mono ( 1591): --- End of inner exception stack trace ---
>
> That is very, very, odd.
>
> That said, I get a _different_ error when I try a Release build of ApiDemo
> with Preview 14:
>
> I/MonoDroid( 510): UNHANDLED EXCEPTION:
> System.TypeInitializationException: An exception was thrown by the type
> initializer for Android.Widget.ItemClickImplementor --->
> System.ArgumentException: Couldn't bind to method 'GetOnItemClickHandler'.
>
> My bug appears to be a linker bug; disabling the linker
> (`/p:AndroidLinkMode=None`) allows it to work for me.
>
> However, my issues seem unrelated to yours, so what output do you see
> before those messages? Specifically, can you provide everything from the
> message similar to:
>
> I/ActivityManager(12944): Starting: Intent {
> act=android.intent.action.MAIN cat=[android.intent.category.LAUNCHER]
> flg=0x10200000 cmp=Mono.Samples.HelloTests/mono.samples.HelloApp } from pid
> 1637
>
> until the crash?
>
> - Jon
>
> _______________________________________________
> Monodroid mailing list
> Monodroid at lists.ximian.com
>
> UNSUBSCRIBE INFORMATION:
> http://lists.ximian.com/mailman/listinfo/monodroid
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.ximian.com/mailman/private/monodroid/attachments/20110315/996c5556/attachment-0001.html
-------------- next part --------------
I/ActivityManager( 69): Starting activity: Intent { act=android.intent.action.MAIN flg=0x10000000 cmp=mono.samples.apidemo/monodroid.apidemo.ApiDemo }
D/AndroidRuntime( 653): Shutting down VM
D/jdwp ( 653): adbd disconnected
I/AndroidRuntime( 653): NOTE: attach of thread 'Binder Thread #3' failed
I/ActivityManager( 69): Start proc mono.samples.apidemo for activity mono.samples.apidemo/monodroid.apidemo.ApiDemo: pid=662 uid=10042 gids={1006}
I/ActivityThread( 662): Publishing provider mono.samples.apidemo.__mono_init__: mono.MonoRuntimeProvider
D/dalvikvm( 662): Trying to load lib /data/data/mono.samples.apidemo/lib/libmonodroid.so 0x44edeb20
D/dalvikvm( 662): Added shared lib /data/data/mono.samples.apidemo/lib/libmonodroid.so 0x44edeb20
D/dalvikvm( 662): GC_FOR_MALLOC freed 12894 objects / 479808 bytes in 81ms
D/dalvikvm( 662): GC_FOR_MALLOC freed 10251 objects / 480312 bytes in 61ms
I/monodroid( 662): Activating instance of type MonoDroid.ApiDemo.ApiDemo
I/monodroid( 662): signature
I/ActivityManager( 69): Process com.android.mms (pid 259) has died.
D/dalvikvm( 662): GC_FOR_MALLOC freed 7621 objects / 373608 bytes in 62ms
W/ActivityManager( 69): Launch timeout has expired, giving up wake lock!
D/dalvikvm( 662): GREF has increased to 201
D/dalvikvm( 662): GREF has increased to 301
D/dalvikvm( 662): GREF has increased to 401
D/dalvikvm( 662): GREF has increased to 501
D/dalvikvm( 662): GREF has increased to 601
W/ActivityManager( 69): Activity idle timeout for HistoryRecord{4500c1b0 mono.samples.apidemo/monodroid.apidemo.ApiDemo}
D/dalvikvm( 662): GREF has increased to 701
D/dalvikvm( 662): GREF has increased to 801
D/dalvikvm( 662): GREF has increased to 901
D/dalvikvm( 662): GREF has increased to 1001
D/dalvikvm( 662): GREF has increased to 1101
D/dalvikvm( 662): GREF has increased to 1201
W/dalvikvm( 662): ReferenceTable overflow (max=512)
W/dalvikvm( 662): Last 10 entries in JNI local reference table:
W/dalvikvm( 662): 502: 0x44f5fb38 cls=Ljava/lang/String; (28 bytes)
W/dalvikvm( 662): 503: 0x44f911f0 cls=Ljava/lang/String; (28 bytes)
W/dalvikvm( 662): 504: 0x44f91238 cls=Ljava/lang/String; (28 bytes)
W/dalvikvm( 662): 505: 0x44ef4050 cls=Ljava/lang/String; (28 bytes)
W/dalvikvm( 662): 506: 0x44f91280 cls=Ljava/lang/String; (28 bytes)
W/dalvikvm( 662): 507: 0x44f912c8 cls=Ljava/lang/String; (28 bytes)
W/dalvikvm( 662): 508: 0x44f00d00 cls=Ljava/lang/String; (28 bytes)
W/dalvikvm( 662): 509: 0x44f91310 cls=Ljava/lang/String; (28 bytes)
W/dalvikvm( 662): 510: 0x44f91358 cls=Ljava/lang/String; (28 bytes)
W/dalvikvm( 662): 511: 0x44ed5790 cls=Ljava/lang/String; (28 bytes)
W/dalvikvm( 662): JNI local reference table summary (512 entries):
W/dalvikvm( 662): 2 of Ljava/lang/Class; 164B (2 unique)
W/dalvikvm( 662): 488 of Ljava/lang/String; 28B (432 unique)
W/dalvikvm( 662): 21 of Ljava/lang/String; 36B (20 unique)
W/dalvikvm( 662): 1 of [Ljava/lang/String; 28B
W/dalvikvm( 662): Memory held directly by tracked refs is 13172 bytes
E/dalvikvm( 662): Failed adding to JNI local ref table (has 512 entries)
I/dalvikvm( 662): "main" prio=5 tid=1 RUNNABLE
I/dalvikvm( 662): | group="main" sCount=0 dsCount=0 s=N obj=0x4001d8e0 self=0xccb0
I/dalvikvm( 662): | sysTid=662 nice=0 sched=0/0 cgrp=default handle=-1345026008
I/dalvikvm( 662): | schedstat=( 8754726658 1078231151 221 )
I/dalvikvm( 662): at monodroid.apidemo.ApiDemo.n_onCreate(Native Method)
I/dalvikvm( 662): at monodroid.apidemo.ApiDemo.onCreate(ApiDemo.java:25)
I/dalvikvm( 662): at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1047)
I/dalvikvm( 662): at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2627)
I/dalvikvm( 662): at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2679)
I/dalvikvm( 662): at android.app.ActivityThread.access$2300(ActivityThread.java:125)
I/dalvikvm( 662): at android.app.ActivityThread$H.handleMessage(ActivityThread.java:2033)
I/dalvikvm( 662): at android.os.Handler.dispatchMessage(Handler.java:99)
I/dalvikvm( 662): at android.os.Looper.loop(Looper.java:123)
I/dalvikvm( 662): at android.app.ActivityThread.main(ActivityThread.java:4627)
I/dalvikvm( 662): at java.lang.reflect.Method.invokeNative(Native Method)
I/dalvikvm( 662): at java.lang.reflect.Method.invoke(Method.java:521)
I/dalvikvm( 662): at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:868)
I/dalvikvm( 662): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:626)
I/dalvikvm( 662): at dalvik.system.NativeStart.main(Native Method)
I/dalvikvm( 662):
E/dalvikvm( 662): VM aborting
W/dalvikvm( 662): ReferenceTable overflow (max=512)
W/dalvikvm( 662): Last 10 entries in JNI local reference table:
W/dalvikvm( 662): 502: 0x44f5fb38 cls=Ljava/lang/String; (28 bytes)
W/dalvikvm( 662): 503: 0x44f911f0 cls=Ljava/lang/String; (28 bytes)
W/dalvikvm( 662): 504: 0x44f91238 cls=Ljava/lang/String; (28 bytes)
W/dalvikvm( 662): 505: 0x44ef4050 cls=Ljava/lang/String; (28 bytes)
W/dalvikvm( 662): 506: 0x44f91280 cls=Ljava/lang/String; (28 bytes)
W/dalvikvm( 662): 507: 0x44f912c8 cls=Ljava/lang/String; (28 bytes)
W/dalvikvm( 662): 508: 0x44f00d00 cls=Ljava/lang/String; (28 bytes)
W/dalvikvm( 662): 509: 0x44f91310 cls=Ljava/lang/String; (28 bytes)
W/dalvikvm( 662): 510: 0x44f91358 cls=Ljava/lang/String; (28 bytes)
W/dalvikvm( 662): 511: 0x44ed5790 cls=Ljava/lang/String; (28 bytes)
W/dalvikvm( 662): JNI local reference table summary (512 entries):
W/dalvikvm( 662): 2 of Ljava/lang/Class; 164B (2 unique)
W/dalvikvm( 662): 488 of Ljava/lang/String; 28B (432 unique)
W/dalvikvm( 662): 21 of Ljava/lang/String; 36B (20 unique)
W/dalvikvm( 662): 1 of [Ljava/lang/String; 28B
W/dalvikvm( 662): Memory held directly by tracked refs is 13172 bytes
E/dalvikvm( 662): Failed adding to JNI local ref table (has 512 entries)
I/dalvikvm( 662): "main" prio=5 tid=1 RUNNABLE
I/dalvikvm( 662): | group="main" sCount=0 dsCount=0 s=N obj=0x4001d8e0 self=0xccb0
I/dalvikvm( 662): | sysTid=662 nice=0 sched=0/0 cgrp=default handle=-1345026008
I/dalvikvm( 662): | schedstat=( 8902060994 1080926413 223 )
I/dalvikvm( 662): at monodroid.apidemo.ApiDemo.n_onCreate(Native Method)
I/dalvikvm( 662): at monodroid.apidemo.ApiDemo.onCreate(ApiDemo.java:25)
I/dalvikvm( 662): at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1047)
I/dalvikvm( 662): at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2627)
I/dalvikvm( 662): at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2679)
I/dalvikvm( 662): at android.app.ActivityThread.access$2300(ActivityThread.java:125)
I/dalvikvm( 662): at android.app.ActivityThread$H.handleMessage(ActivityThread.java:2033)
I/dalvikvm( 662): at android.os.Handler.dispatchMessage(Handler.java:99)
I/dalvikvm( 662): at android.os.Looper.loop(Looper.java:123)
I/dalvikvm( 662): at android.app.ActivityThread.main(ActivityThread.java:4627)
I/dalvikvm( 662): at java.lang.reflect.Method.invokeNative(Native Method)
I/dalvikvm( 662): at java.lang.reflect.Method.invoke(Method.java:521)
I/dalvikvm( 662): at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:868)
I/dalvikvm( 662): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:626)
I/dalvikvm( 662): at dalvik.system.NativeStart.main(Native Method)
I/dalvikvm( 662):
E/dalvikvm( 662): VM aborting
E/mono ( 662):
E/mono ( 662): Unhandled Exception: System.TypeInitializationException: An exception was thrown by the type initializer for Android.Util.Log ---> System.NullReferenceException: Object reference not set to an instance of an object
E/mono ( 662): at Android.Runtime.JNIEnv.FindClass (System.String classname) [0x00000] in <filename unknown>:0
E/mono ( 662): at Android.Util.Log..cctor () [0x00000] in <filename unknown>:0
E/mono ( 662): --- End of inner exception stack trace ---
E/mono ( 662): at Android.Runtime.AndroidEnvironment.UnhandledException (System.Exception) <0x0003b>
E/mono ( 662): at (wrapper dynamic-method) object.10ae8552-d063-438c-9ede-c443d0749933 (intptr,intptr,intptr) <0x00087>
E/mono ( 662): at (wrapper native-to-managed) object.10ae8552-d063-438c-9ede-c443d0749933 (intptr,intptr,intptr) <0x0004f>
E/mono ( 662):
D/Zygote ( 33): Process 662 exited cleanly (1)
I/ActivityManager( 69): Process mono.samples.apidemo (pid 662) has died.
I/UsageStats( 69): Unexpected resume of com.android.launcher while already resumed in mono.samples.apidemo
W/InputManagerService( 69): Window already focused, ignoring focus gain of: com.android.internal.view.IInputMethodClient$Stub$Proxy at 44fcc180
D/dalvikvm( 487): GC_EXPLICIT freed 690 objects / 51776 bytes in 140ms
More information about the Monodroid
mailing list