Crash in sub-activity on Back Button [Solved]

Put your problem here if it does not fit any of the other categories.

Crash in sub-activity on Back Button [Solved]

Postby yvecai » Sat Oct 31, 2009 10:56 pm

I have a sub-activity used to enter and return some text to the main activity.

Now, the app 'quit unexpectedly' when I press the back button.
I've turn around with onStop() and onDestroy() but with no result.

Any idea?

Yves
Last edited by yvecai on Sat Oct 31, 2009 11:26 pm, edited 1 time in total.
yvecai
Freshman
Freshman
 
Posts: 4
Joined: Sun Oct 18, 2009 5:06 pm

Top

Postby yvecai » Sat Oct 31, 2009 11:25 pm

adb logcat output:

Code: Select all
I/ActivityManager(  567): Start proc yves.score04 for activity yves.score04/.score04: pid=982 uid=10021 gids={}
I/jdwp    (  982): received file descriptor 20 from ADB
I/ActivityManager(  567): Displayed activity yves.score04/.score04: 1174 ms
I/ActivityManager(  567): Starting activity: Intent { comp={yves.score04/yves.score04.playername} }
D/PhoneWindow(  982): couldn't save which view has focus because the focused view android.widget.EditText@4373f730 has no id.
I/ActivityManager(  567): Displayed activity yves.score04/.playername: 297 ms
D/AndroidRuntime(  982): Shutting down VM
W/dalvikvm(  982): threadid=3: thread exiting with uncaught exception (group=0x4000fe70)
E/AndroidRuntime(  982): Uncaught handler: thread main exiting due to uncaught exception
E/AndroidRuntime(  982): java.lang.RuntimeException: Failure delivering result ResultInfo{who=null, request=24, result=0, data=null} to activity {yves.score04/yves.score04.score04}: java.lang.NullPointerException
E/AndroidRuntime(  982):    at android.app.ActivityThread.deliverResults(ActivityThread.java:3005)
E/AndroidRuntime(  982):    at android.app.ActivityThread.handleSendResult(ActivityThread.java:3047)
E/AndroidRuntime(  982):    at android.app.ActivityThread.access$2300(ActivityThread.java:112)
E/AndroidRuntime(  982):    at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1721)
E/AndroidRuntime(  982):    at android.os.Handler.dispatchMessage(Handler.java:99)
E/AndroidRuntime(  982):    at android.os.Looper.loop(Looper.java:123)
E/AndroidRuntime(  982):    at android.app.ActivityThread.main(ActivityThread.java:3948)
E/AndroidRuntime(  982):    at java.lang.reflect.Method.invokeNative(Native Method)
E/AndroidRuntime(  982):    at java.lang.reflect.Method.invoke(Method.java:521)
E/AndroidRuntime(  982):    at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:782)
E/AndroidRuntime(  982):    at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:540)
E/AndroidRuntime(  982):    at dalvik.system.NativeStart.main(Native Method)
E/AndroidRuntime(  982): Caused by: java.lang.NullPointerException
E/AndroidRuntime(  982):    at yves.score04.score04.onActivityResult(score04.java:284)
E/AndroidRuntime(  982):    at android.app.Activity.dispatchActivityResult(Activity.java:3595)
E/AndroidRuntime(  982):    at android.app.ActivityThread.deliverResults(ActivityThread.java:3001)
E/AndroidRuntime(  982):    ... 11 more
I/Process (  567): Sending signal. PID: 982 SIG: 3
I/dalvikvm(  982): threadid=7: reacting to signal 3
I/dalvikvm(  982): Wrote stack trace to '/data/anr/traces.txt'
I/Process (  982): Sending signal. PID: 982 SIG: 9
I/ActivityManager(  567): Process yves.score04 (pid 982) has died.
I/WindowManager(  567): WIN DEATH: Window{436a5700 yves.score04/yves.score04.score04 paused=false}
I/WindowManager(  567): WIN DEATH: Window{437052c8 yves.score04/yves.score04.playername paused=false}
W/InputManagerService(  567): Got RemoteException sending setActive(false) notification to pid 982 uid 10021



The origin of the problem can be found here:

[/quote]E/AndroidRuntime( 982): java.lang.RuntimeException: Failure delivering result ResultInfo{who=null, request=24, result=0, data=null} to activity {yves.score04/yves.score04.score04}: java.lang.NullPointerException[quote]

I add something in data, know it works.

Ok, I heard you saying, why did you post, if you can find the answer by yourself 5 minutes later?
But, should I haven't post?
yvecai
Freshman
Freshman
 
Posts: 4
Joined: Sun Oct 18, 2009 5:06 pm

Postby SlumberMachine » Mon Nov 02, 2009 10:55 am

Thank you for posting. It helps noobs like me learn more and solve problems by seeing how others solved their problems.
SlumberMachine
Developer
Developer
 
Posts: 39
Joined: Tue Feb 24, 2009 9:00 pm

Top

Return to Other Coding-Problems

Who is online

Users browsing this forum: MSNbot Media and 30 guests