Question

This is my logcat and the problem is that the application is force closing and i want to knw the line or method which is causing this. I m new to android so cant understand a word of logcat. Thanks in advance

01-16 17:32:56.584: D/dalvikvm(276): GC freed 596 objects / 49984 bytes in 101ms
01-16 17:33:09.233: D/AndroidRuntime(276): Shutting down VM
01-16 17:33:09.233: W/dalvikvm(276): threadid=3: thread exiting with uncaught exception (group=0x4001b188)
01-16 17:33:09.233: E/AndroidRuntime(276): Uncaught handler: thread main exiting due to uncaught exception
01-16 17:33:09.273: E/AndroidRuntime(276): java.lang.RuntimeException: Unable to start activity ComponentInfo{com.ymappuser/com.ymappuser.Manualloc}: java.lang.RuntimeException: java.lang.NullPointerException
01-16 17:33:09.273: E/AndroidRuntime(276):  at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2496)
01-16 17:33:09.273: E/AndroidRuntime(276):  at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2512)
01-16 17:33:09.273: E/AndroidRuntime(276):  at android.app.ActivityThread.access$2200(ActivityThread.java:119)
01-16 17:33:09.273: E/AndroidRuntime(276):  at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1863)
01-16 17:33:09.273: E/AndroidRuntime(276):  at android.os.Handler.dispatchMessage(Handler.java:99)
01-16 17:33:09.273: E/AndroidRuntime(276):  at android.os.Looper.loop(Looper.java:123)
01-16 17:33:09.273: E/AndroidRuntime(276):  at android.app.ActivityThread.main(ActivityThread.java:4363)
01-16 17:33:09.273: E/AndroidRuntime(276):  at java.lang.reflect.Method.invokeNative(Native Method)
01-16 17:33:09.273: E/AndroidRuntime(276):  at java.lang.reflect.Method.invoke(Method.java:521)
01-16 17:33:09.273: E/AndroidRuntime(276):  at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:860)
01-16 17:33:09.273: E/AndroidRuntime(276):  at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:618)
01-16 17:33:09.273: E/AndroidRuntime(276):  at dalvik.system.NativeStart.main(Native Method)
01-16 17:33:09.273: E/AndroidRuntime(276): Caused by: java.lang.RuntimeException: java.lang.NullPointerException
01-16 17:33:09.273: E/AndroidRuntime(276):  at com.ymappuser.Manualloc.getCountries(Manualloc.java:270)
01-16 17:33:09.273: E/AndroidRuntime(276):  at com.ymappuser.Manualloc.fillcountry(Manualloc.java:83)
01-16 17:33:09.273: E/AndroidRuntime(276):  at com.ymappuser.Manualloc.onCreate(Manualloc.java:75)
01-16 17:33:09.273: E/AndroidRuntime(276):  at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1047)
01-16 17:33:09.273: E/AndroidRuntime(276):  at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2459)
01-16 17:33:09.273: E/AndroidRuntime(276):  ... 11 more
01-16 17:33:09.273: E/AndroidRuntime(276): Caused by: java.lang.NullPointerException
01-16 17:33:09.273: E/AndroidRuntime(276):  at com.ymappuser.Manualloc.getCountries(Manualloc.java:243)
01-16 17:33:09.273: E/AndroidRuntime(276):  ... 15 more
01-16 17:33:09.384: I/dalvikvm(276): threadid=7: reacting to signal 3
01-16 17:33:09.404: I/dalvikvm(276): Wrote stack trace to '/data/anr/traces.txt'
01-16 17:33:11.353: I/Process(276): Sending signal. PID: 276 SIG: 9
01-16 17:33:13.004: D/dalvikvm(284): GC freed 623 objects / 51024 bytes in 125ms
01-16 17:34:21.646: D/dalvikvm(284): GC freed 288 objects / 14672 bytes in 987ms
Was it helpful?

Solution

you are getting null pointer exception in method getCountries, in class Manualloc at line 270, you can check there by debugging what object on the line is null, and work accordingly.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top