[Mono-bugs] [Bug 638936] New: Application crashes when call an intent with extras

bugzilla_noreply at novell.com bugzilla_noreply at novell.com
Mon Sep 13 10:59:19 EDT 2010


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

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


           Summary: Application crashes when call an intent with extras
    Classification: Mono
           Product: MonoDroid
           Version: unspecified
          Platform: Other
        OS/Version: Other
            Status: NEW
          Severity: Normal
          Priority: P5 - None
         Component: Runtime
        AssignedTo: mono-bugs at lists.ximian.com
        ReportedBy: olexiys at desco-soft.com
         QAContact: mono-bugs at lists.ximian.com
          Found By: ---
           Blocker: ---


Description of Problem:
Application crashes when call an intent with extras

Steps to reproduce the problem:
1. Write following code
                Intent i = new Intent();
                i.SetClassName(this, "monoDroidTest.ActivityDispatchDetails");
                i.PutExtra("USER_NAME", "user");
                i.AddFlags(ActivityFlags.NewTask);
                StartActivity(i);


Actual Results:
Application crashes

Expected Results:
Switching intent

How often does this happen? 
Always

Additional Information:

Removing line PutExtra "fixes" the problem.


I/ActivityManager(   53): Starting activity: Intent { flg=0x10000000
cmp=MonoDroidTest.MonoDroidTest/monoDroidTest.ActivityDispatchDetails (has
extras
) }
E/MONODROID(  771): method info:
n_onCreate:(Landroid/os/Bundle;)V:GetOnCreate_Landroid_os_Bundle_Handler
E/MONODROID(  771): token info: GetOnCreate_Landroid_os_Bundle_Handler
E/MONODROID(  771): connect instance: Android.Runtime.JNIEnv+GetCallbackHandler
E/MONODROID(  771): callback instance:
System.Action`3[System.IntPtr,System.IntPtr,System.IntPtr]
E/MONODROID(  771): native method info: n_onCreate (Landroid/os/Bundle;)V
E/MONODROID(  771): method info:
E/Mono.Android(  771): System.InvalidCastException: Cannot cast from source
type to destination type.
E/Mono.Android(  771):   at MonoDroidTest.ActivityDispatchDetails.OnCreate
(Android.OS.Bundle bundle) [0x00000] in <filename unknown>:0
E/Mono.Android(  771):   at Android.App.Activity.n_OnCreate_Landroid_os_Bundle_
(IntPtr jnienv, IntPtr native__this, IntPtr native_savedInstanceState)
 [0x00000] in <filename unknown>:0
D/AndroidRuntime(  771): Shutting down VM
W/dalvikvm(  771): threadid=3: thread exiting with uncaught exception
(group=0x4001b188)
E/AndroidRuntime(  771): Uncaught handler: thread main exiting due to uncaught
exception
E/AndroidRuntime(  771): java.lang.RuntimeException: Unable to start activity
ComponentInfo{MonoDroidTest.MonoDroidTest/monoDroidTest.ActivityDispatch
Details}: java.lang.ClassCastException: System.InvalidCastException: Cannot
cast from source type to destination type.
E/AndroidRuntime(  771):   at MonoDroidTest.ActivityDispatchDetails.OnCreate
(Android.OS.Bundle bundle) [0x00000] in <filename unknown>:0
E/AndroidRuntime(  771):   at
Android.App.Activity.n_OnCreate_Landroid_os_Bundle_ (IntPtr jnienv, IntPtr
native__this, IntPtr native_savedInstanceStat
e) [0x00000] in <filename unknown>:0
E/AndroidRuntime(  771):        at
android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2496)
E/AndroidRuntime(  771):        at
android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2512)
E/AndroidRuntime(  771):        at
android.app.ActivityThread.access$2200(ActivityThread.java:119)
E/AndroidRuntime(  771):        at
android.app.ActivityThread$H.handleMessage(ActivityThread.java:1863)
E/AndroidRuntime(  771):        at
android.os.Handler.dispatchMessage(Handler.java:99)
E/AndroidRuntime(  771):        at android.os.Looper.loop(Looper.java:123)
E/AndroidRuntime(  771):        at
android.app.ActivityThread.main(ActivityThread.java:4363)
E/AndroidRuntime(  771):        at java.lang.reflect.Method.invokeNative(Native
Method)
E/AndroidRuntime(  771):        at
java.lang.reflect.Method.invoke(Method.java:521)
E/AndroidRuntime(  771):        at
com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:860)
E/AndroidRuntime(  771):        at
com.android.internal.os.ZygoteInit.main(ZygoteInit.java:618)
E/AndroidRuntime(  771):        at dalvik.system.NativeStart.main(Native
Method)
E/AndroidRuntime(  771): Caused by: java.lang.ClassCastException:
System.InvalidCastException: Cannot cast from source type to destination type.
E/AndroidRuntime(  771):   at MonoDroidTest.ActivityDispatchDetails.OnCreate
(Android.OS.Bundle bundle) [0x00000] in <filename unknown>:0
E/AndroidRuntime(  771):   at
Android.App.Activity.n_OnCreate_Landroid_os_Bundle_ (IntPtr jnienv, IntPtr
native__this, IntPtr native_savedInstanceStat
e) [0x00000] in <filename unknown>:0
E/AndroidRuntime(  771):        at
monoDroidTest.ActivityDispatchDetails.n_onCreate(Native Method)
E/AndroidRuntime(  771):        at
monoDroidTest.ActivityDispatchDetails.onCreate(ActivityDispatchDetails.java:23)
E/AndroidRuntime(  771):        at
android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1047)
E/AndroidRuntime(  771):        at
android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2459)
E/AndroidRuntime(  771):        ... 11 more
I/Process (   53): Sending signal. PID: 771 SIG: 3
I/dalvikvm(  771): threadid=7: reacting to signal 3
I/dalvikvm(  771): Wrote stack trace to '/data/anr/traces.txt'
W/ActivityManager(   53): Launch timeout has expired, giving up wake lock!
W/ActivityManager(   53): Activity idle timeout for HistoryRecord{44dcddb8
MonoDroidTest.MonoDroidTest/monoDroidTest.ActivityDispatchDetails}

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


More information about the mono-bugs mailing list