Marinell / codenameone

Automatically exported from code.google.com/p/codenameone
0 stars 0 forks source link

J2ME getCurrentLocation KERN-EXEC 3 #810

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
Create form with MapComponent.

Use method like this

static Location getCurrentLocation()
    {
        Location location = null;
        try
        {
            LocationManager lm = LocationManager.getLocationManager();
            if (lm != null)
            {
                try
                {
                    location = lm.getCurrentLocation();
                }
                catch (Throwable e)
                {
                    System.err.println(e);
                    //Dialog.show("getCurrentLocation", e.toString(), "ok", "cancel");
                }
                if (location == null)
                {
                    location = lm.getLastKnownLocation();
                }
            }
            if (location != null && location.getLatitude() == 0 && location.getLongitude() == 0)
            {
                location = null;
            }
        }
        catch (Throwable e)
        {
            System.err.println(e);
            //Dialog.show("getCurrentLocation", e.toString(), "ok", "cancel");
        }
        return location;
    }

Somewhere inside this method you will get KERN-EXEC 3 exception (application 
crash)

I use Symbian Belle SDK v1.0 for testing

Original issue reported on code.google.com by MaximDu...@gmail.com on 30 Jul 2013 at 11:11

Attachments:

GoogleCodeExporter commented 9 years ago

Original comment by shai.almog on 31 Jul 2013 at 12:40

GoogleCodeExporter commented 9 years ago
are you seeing the same on device?

Original comment by cf27...@gmail.com on 31 Jul 2013 at 2:05

GoogleCodeExporter commented 9 years ago
Nokia x6 hangs on that code

Original comment by MaximDu...@gmail.com on 31 Jul 2013 at 2:33