[mono-android] System.NullReferenceException at OnStart() in Background service.

Maximilian Wilson wilson.max at gmail.com
Sun Oct 7 18:27:30 UTC 2012


On Sun, Oct 7, 2012 at 12:40 AM, smartamrit <carryonamrit at hotmail.com>wrote:

> I am trying to update the the user location every defined time but when
> ever
> i implement requestLocationUpdates function to my application, it crash.
>
> Please find the code and logcat log in the url below and help me solve this
> problem.
>
> My code and logcat
> <
> http://stackoverflow.com/questions/12762624/application-crashed-if-requestlocationupdates-is-called-to-get-new-location-of-u
> >
>

Amrit,

I tried to troubleshoot this, but I couldn't get a repro. I commented back
in the line that causes your crash (RequestLocationUpdates) and threw it
into OnCreate of a Main activity, but it ran fine for me. (Note that I
didn't include NorthStarBackgroundService because it won't compile without
more code like the ConnectToSever class.)

I'm attaching my repro attempt. If you could modify it so that it crashes
and send it back maybe I can help debug it. (If I were a guru maybe I
wouldn't need a repro to spot your problem but I'm still a novice.)

-Max

-- 
Hahahahaaaa!!! That is ME laughing at YOU, cruel world.
    -Jordan Rixon

I could not love thee, dear, so much,
Loved I not Honour more.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.ximian.com/pipermail/monodroid/attachments/20121007/89823ba6/attachment-0001.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: Northstar.zip
Type: application/zip
Size: 19616 bytes
Desc: not available
URL: <http://lists.ximian.com/pipermail/monodroid/attachments/20121007/89823ba6/attachment-0001.zip>


More information about the Monodroid mailing list