MAP Application Crashes-Check my Log

Put problem concerning MapActivities, MapViews, Overlays and GPS in this forum.

MAP Application Crashes-Check my Log

Postby jgenius07 » Tue Jan 11, 2011 8:35 am

I am trying to take latitude and longitude from a database and pointing on the google map.
All my code is compiled without any error but the application is crashing soon after it is launched on emulator.

please go through the logcat log and tell me where i am having exceptions thrown...

----------------------------LOG------------------------------------------------------------
I/ActivityManager( 38): Starting activity: Intent
{ act=android.intent.action.
MAIN cat=[android.intent.category.LAUNCHER] flg=0x10200000
cmp=com.android.hello
googlemap/.hellogooglemap bnds=[83,238][157,317] }
I/ActivityManager( 38): Start proc com.android.hellogooglemap for
activity com
.android.hellogooglemap/.hellogooglemap: pid=5486 uid=10026
gids={3003, 1015}
D/ddm-heap( 5486): Got feature list request
E/ActivityThread( 5486): Failed to find provider info for
com.google.settings
E/ActivityThread( 5486): Failed to find provider info for
com.google.settings
E/ActivityThread( 5486): Failed to find provider info for
com.google.settings
D/AndroidRuntime( 5486): Shutting down VM
W/dalvikvm( 5486): threadid=3: thread exiting with uncaught exception
(group=0x4
001b188)
E/AndroidRuntime( 5486): Uncaught handler: thread main exiting due to
uncaught e
xception
E/AndroidRuntime( 5486): java.lang.RuntimeException: Unable to start
activity Co
mponentInfo{com.android.hellogooglemap/
com.android.hellogooglemap.hellogooglemap
}: java.lang.NullPointerException
E/AndroidRuntime( 5486): at
android.app.ActivityThread.performLaunchActiv
ity(ActivityThread.java:2496)
E/AndroidRuntime( 5486): at
android.app.ActivityThread.handleLaunchActivi
ty(ActivityThread.java:2512)
E/AndroidRuntime( 5486): at android.app.ActivityThread.access
$2200(Activi
tyThread.java:119)
E/AndroidRuntime( 5486): at android.app.ActivityThread
$H.handleMessage(Ac
tivityThread.java:1863)
E/AndroidRuntime( 5486): at
android.os.Handler.dispatchMessage(Handler.ja
va:99)
E/AndroidRuntime( 5486): at android.os.Looper.loop(Looper.java:
123)
E/AndroidRuntime( 5486): at
android.app.ActivityThread.main(ActivityThrea
d.java:4363)
E/AndroidRuntime( 5486): at
java.lang.reflect.Method.invokeNative(Native
Method)
E/AndroidRuntime( 5486): at
java.lang.reflect.Method.invoke(Method.java:5
21)
E/AndroidRuntime( 5486): at com.android.internal.os.ZygoteInit
$MethodAndA
rgsCaller.run(ZygoteInit.java:860)
E/AndroidRuntime( 5486): at
com.android.internal.os.ZygoteInit.main(Zygot
eInit.java:618)
E/AndroidRuntime( 5486): at
dalvik.system.NativeStart.main(Native Method)

E/AndroidRuntime( 5486): Caused by: java.lang.NullPointerException
E/AndroidRuntime( 5486): at
com.android.hellogooglemap.hellogooglemap.onC
reate(hellogooglemap.java:39)
E/AndroidRuntime( 5486): at
android.app.Instrumentation.callActivityOnCre
ate(Instrumentation.java:1047)
E/AndroidRuntime( 5486): at
android.app.ActivityThread.performLaunchActiv
ity(ActivityThread.java:2459)
E/AndroidRuntime( 5486): ... 11 more
I/Process ( 38): Sending signal. PID: 5486 SIG: 3
I/dalvikvm( 5486): threadid=7: reacting to signal 3
I/dalvikvm( 5486): Wrote stack trace to '/data/anr/traces.txt'
I/Process ( 5486): Sending signal. PID: 5486 SIG: 9
I/ActivityManager( 38): Process com.android.hellogooglemap (pid
5486) has died
.
I/UsageStats( 38): Unexpected resume of com.android.launcher while
already res
umed in com.android.hellogooglemap
W/InputManagerService( 38): Window already focused, ignoring focus
gain of: co
m.android.internal.view.IInputMethodClient$Stub$Proxy@43d86cc0
jgenius07
Freshman
Freshman
 
Posts: 3
Joined: Tue Jan 11, 2011 8:19 am

Top

Re: MAP Application Crashes-Check my Log

Postby JoxTraex » Sat Jan 29, 2011 3:10 am

I see quite a few null pointer exceptions, try using break points in your code and make SURE that you are not referencing anything that is null. If you try to launch a map when the current reference to it is null, then you're going to have a problem. Also another thing is to use Logcat and filter only through errors and look for the errors in YOUR classes that you created. This is the debugging process and learning it can be extremely helpful. My suggestion is look at your log cat and find where it relates to your code and take a look at that line and see if you have it setup properly.
JoxTraex
Developer
Developer
 
Posts: 25
Joined: Wed Jan 26, 2011 12:29 am

Top

Return to Map Problems

Who is online

Users browsing this forum: No registered users and 3 guests