Getting java.lang.RuntimeException on startup

I have an activity Athat SingleTop, when I want to start this activity inside it, with other data about intentions, for example:

Intent intent = new Intent();
intent.setData(Uri.parse("something://someone"));
startActivity(intent);

This is an exception:

startActivityUncheckedLocked: task left null
V/ActivityManager(  596): java.lang.RuntimeException: here
V/ActivityManager(  596):   at com.android.server.am.ActivityStackSupervisor.startActivityUncheckedLocked(ActivityStackSupervisor.java:1646)
V/ActivityManager(  596):   at com.android.server.am.ActivityStackSupervisor.startActivityLocked(ActivityStackSupervisor.java:1249)
V/ActivityManager(  596):   at com.android.server.am.ActivityStackSupervisor.startActivityMayWait(ActivityStackSupervisor.java:741)
V/ActivityManager(  596):   at com.android.server.am.ActivityManagerService.startActivityAsUser(ActivityManagerService.java:3118)
V/ActivityManager(  596):   at com.android.server.am.ActivityManagerService.startActivity(ActivityManagerService.java:3104)
V/ActivityManager(  596):   at android.app.ActivityManagerNative.onTransact(ActivityManagerNative.java:135)
V/ActivityManager(  596):   at com.android.server.am.ActivityManagerService.onTransact(ActivityManagerService.java:2071)
V/ActivityManager(  596):   at android.os.Binder.execTransact(Binder.java:404)

What should I do? Am I doing something wrong?

thank

EDIT 1
in my AndroidManifest.xmlfile I defined something://to open with operation A.

EDIT 2
when the operation is Anot SingleTop, no problem.

EDIT 3
This error does not cause my application to close by itself, in fact the problem is that sometimes even after receiving this error I get errors like this:

F/libc    (24873): Fatal signal 11 (SIGSEGV) at 0x00007074 (code=1), thread 24939 (Thread-2287)
I/DEBUG   (  195): *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** ***
I/DEBUG   (  195): Build fingerprint: 'google/occam/mako:4.4.2/KOT49H/937116:user/release-keys'
I/DEBUG   (  195): Revision: '11'
I/DEBUG   (  195): pid: 24873, tid: 24939, name: Thread-2287  >>> com.blah.blah <<<
I/DEBUG   (  195): signal 11 (SIGSEGV), code 1 (SEGV_MAPERR), fault addr 00007074
I/DEBUG   (  195):     r0 779b9828  r1 4199b380  r2 00000014  r3 00007075
I/DEBUG   (  195):     r4 76b24ac0  r5 00000014  r6 00000000  r7 779b9828
I/DEBUG   (  195):     r8 774c3afc  r9 76c84d90  sl 76da6250  fp 774c3b14
I/DEBUG   (  195):     ip 733e9cec  sp 774c3ac0  lr 40a49b9d  pc 00007074  cpsr 00070030
I/DEBUG   (  195):     d0  0000000000000000  d1  0000000000000000
I/DEBUG   (  195):     d2  0000000000000000  d3  0000000000000000
I/DEBUG   (  195):     d4  0000000000000000  d5  0000000000000000
I/DEBUG   (  195):     d6  0000000000000000  d7  0000000000000000
I/DEBUG   (  195):     d8  0000000000000000  d9  0000000000000000
I/DEBUG   (  195):     d10 0000000000000000  d11 0000000000000000
I/DEBUG   (  195):     d12 0000000000000000  d13 0000000000000000
I/DEBUG   (  195):     d14 0000000000000000  d15 0000000000000000
I/DEBUG   (  195):     d16 0000000000000000  d17 0000000000000000
I/DEBUG   (  195):     d18 4a9b4d1ae3550b44  d19 1619de72ef18c72c
I/DEBUG   (  195):     d20 a5598b5ef3ee9d2c  d21 ea73a9b3cbecc5ff
I/DEBUG   (  195):     d22 1f5becf8adc083d0  d23 3f09f8604410f094
I/DEBUG   (  195):     d24 4000000000000000  d25 547d42aea2879f2e
I/DEBUG   (  195):     d26 40f86a0000000000  d27 3ff0000000000000
I/DEBUG   (  195):     d28 40f86a0000000000  d29 0000000000000001
I/DEBUG   (  195):     d30 4024000000000000  d31 4000000000000000  
...  
Force finishing activity com.blah.blah.A

which kills my application.

+3
2

. , , , - :

MainActivity, , , , . Extras , ActivityA, , ActivityB. . .

ActivityB ActivityA, ActivityB, Intent MainActivity FLAG_ACTIVITY_CLEAR_TOP FLAG_ACTIVITY_SINGLE_TOP, a la:

Intent intent = new Intent(ctx, MainActivity.class);
intent.addFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP | Intent.FLAG_ACTIVITY_SINGLE_TOP);
startActivity(intent);

, onResume() MainActivity, . , Notification Intent , getIntent() onResume()? , , ActivityB MainActivity, ActivityA, Extras.

, , , :

  • - onResume() , ?
  • , , ?

:

startActivityUncheckedLocked: task left null
                                             java.lang.RuntimeException: here
                                                 at com.android.server.am.ActivityStackSupervisor.startActivityUncheckedLocked(ActivityStackSupervisor.java:2965)
                                                 at com.android.server.am.ActivityStackSupervisor.startActivityLocked(ActivityStackSupervisor.java:1935)
                                                 at com.android.server.am.ActivityStackSupervisor.startActivityMayWait(ActivityStackSupervisor.java:1043)
                                                 at com.android.server.am.ActivityManagerService.startActivityAsUser(ActivityManagerService.java:4069)
                                                 at com.android.server.am.ActivityManagerService.startActivity(ActivityManagerService.java:3963)
                                                 at android.app.ActivityManagerNative.onTransact(ActivityManagerNative.java:159)
                                                 at com.android.server.am.ActivityManagerService.onTransact(ActivityManagerService.java:2638)
                                                 at android.os.Binder.execTransact(Binder.java:404)
                                                 at dalvik.system.NativeStart.run(Native Method)
0

. , , .

- :

Intent intent = new Intent(this, newActivity.class);

intent.setClass(this, newActivity.class);
-1

All Articles