OpenSatNav crashes on startup

Bug #579464 reported by Paspartout
10
This bug affects 1 person
Affects Status Importance Assigned to Milestone
OpenSatNav
Fix Committed
Medium
Kieran Fleming

Bug Description

OpenSatNav (rev. 133) crashes on startup on my HTC Tattoo running android 1.6 (Donut).

But how to debug this?

Laias

Revision history for this message
chris_debian (cjhandrew) wrote :

Hi, Laias!

Can you tell us what OSN was doing when it crashed? Are you able to replicate the error? Were you prompted to submit any bug information?

Thanks,

Chris.

Revision history for this message
Paspartout (pv-ndsmail) wrote :

chris_debian wrote:
> Hi, Laias!
>
> Can you tell us what OSN was doing when it crashed? Are you able to replicate the error? Were you prompted to submit any bug information?
>
> Thanks,
>
> Chris.

Yes, it just says:
Sorry!
The application OpenSatNav (process org.opensatnav) has stopped unexpectedly. Please try again.

Tried restarting the phone, removing some apps and delete the OSN-Folder in the root-dir.

PS: I will add this to the Description

Laias

Revision history for this message
Paspartout (pv-ndsmail) wrote :

Only this Message is showing on startup:
Sorry!
The application OpenSatNav (process org.opensatnav) has stopped unexpectedly. Please try again.

I tried restarting the phone, removing some apps and delete the OSN-Folder in the root-dir.

Revision history for this message
Paspartout (pv-ndsmail) wrote :

Hey!

I reinstalled rev. 128 which works fine!
And on firts starup i got some ErrorMessages to report!

I posted it as txt file!

Hope this can help

Laias

Revision history for this message
chris_debian (cjhandrew) wrote :

Thanks, Laias; hopefully the Devs will be able to interpret this.

Going by what you say, the problem may be in the code added since Rev. 128.

Not sure why the error was not automatically turned into a bug report.

Thanks, again.

Chris.

Revision history for this message
chris_debian (cjhandrew) wrote :

Looks like it mentions Tripstats.

Revision history for this message
droidguy (stan-berka) wrote :

I have looked at it. And, yes, it definitely has a problem starting the tripstats service. I'm not sure what the stack trace really means. It just says the argument can't be null when trying to start LocationHandler. I'm not getting this error on my G1, although, in the emulator there is an error:
01-29 06:00:47.359: DEBUG/OpenSatNav(3968): Ignoring: java.lang.IllegalArgumentException: listener==null
No more info. The TraceRecorderService had a setForeground(true); before starting the LocationHandler, so I added this to tripstats service and the listener==null error seems to be gone in my emulator. Do you know what is the meaning of setForeground(true); in service onStart()?

Simple patch attached. Laias, could you test the development build tonight?

Has anyone more insight into the LocationHandler stuff?

droidguy

Revision history for this message
Paspartout (pv-ndsmail) wrote :

Yes i will test it.

But i also have the Android SDK here... I will try to apply the patch and rebuild from svn.

Laias

Revision history for this message
Paspartout (pv-ndsmail) wrote :

I applied the patch but nothing changes. I got the same error report :-(.

Revision history for this message
droidguy (stan-berka) wrote :

Laias,
Do you see this error in the emulator or only on your HTC Tatoo?
droidguy

Revision history for this message
Paspartout (pv-ndsmail) wrote :

Its not working on my htc tattoo... Tested in the emulator(andorid 1.6) and it works...

Revision history for this message
Paspartout (pv-ndsmail) wrote :

Heey!
I tested it again in emulator with QVGA (240*320) Resolutin and got the same error!
So the problem have to be the resolution...

Laias

Revision history for this message
droidguy (stan-berka) wrote :

Laias,
Great job diagnosing. How do you switch emulator to QVGA?

Revision history for this message
Paspartout (pv-ndsmail) wrote :

I just created a new AVD with Android 1.6 and QVGA.
Do you use the original sdk?

Revision history for this message
droidguy (stan-berka) wrote :

Laias,
An older development build works fine on your Tatoo, rifgt? I believe you mentioned #128. Can you try, what happens when you start the version that works and do Collaborate - Start Recording Trace?
droidguy

Revision history for this message
Paspartout (pv-ndsmail) wrote :

Yeah,
i think i found the problem... You're right OSN crashes too, when i try to start recording...(Error Message attached)
But the problem is, that everything works (rev. 133) when my gps is enabled and only crashes if its disabled.
But what is when i just wanna browse the map without gps enabled?
Hope that could fixed later.

Revision history for this message
droidguy (stan-berka) wrote :

Thanks, Laias. I hope we may be able to fix it now. Let's see what other devs think.

Guys, to summarize what we know about this problem so far:
* Applies to HTC Tatoo, or just any android device using QVGA screen size.
* Occurs only if GPS is off while starting OSN.
* Problem applies to revisions 128 or earlier ones.
* What happens is: calling mLocationHandler.start() causes OSN to crash.
* Two similar error messages attached.

Revision history for this message
Christian-uni-paderborn (christian-uni-paderborn) wrote :

I have the same problem on my Milestone (now on Android 2.0.1), with the latest version r136.

I also tried to debug the app, but the Android launcher crashes with a NPE (which it does not for my own "play around with Android" application)...

Revision history for this message
droidguy (stan-berka) wrote :

Workaround: turn GPS on before startin OSN.

Revision history for this message
droidguy (stan-berka) wrote :

After working with Laias on his problem, I thought this issue is related to the QVGA format of the display (Laias, you have reproduced this problem in emulator with Android 1.6 with QVGA, right?).
Now, that csoltenborn has reported the same problem, I'm not sure, since the Milestone definitely doesn't use the QVGA display format. Is this related to the version of Android OS. csoltenborn, does the above workaround work? Any ideas?

Revision history for this message
Paspartout (pv-ndsmail) wrote :

Hi!
No i think its not the resolutin. Its working again in the emulator... I think it was my fault... I tried compiling OSN for Android 2.0 and 2.1 myself and got this error. So its not the reolutin. Sorry.
Laias

Revision history for this message
Kieran Fleming (kieran-fleming) wrote :

Can you paste in here the error that occurs? If you can get it to happen in the emulator the error will be in the 'LogCat' dialog.

Revision history for this message
Kieran Fleming (kieran-fleming) wrote :

Sorry, didn't see you already had one :)

Revision history for this message
droidguy (stan-berka) wrote :

So, Laias, what version of Android OS do you have on your Tatoo device where you originally observed the crash?
droidguy

Revision history for this message
chris_debian (cjhandrew) wrote :

With regard to the last question 'What version of Android OS do you have on your Tatoo device where you originally observed the crash?', does this get submitted as part of the automated bug reporting? If not, is it something we can implement?

Chris.

Revision history for this message
Guillaume Rosaire (zerog) wrote :

chris_debian wrote:
> With regard to the last question 'What version of Android OS do you have on your Tatoo device where you originally observed the crash?', does this get submitted as part of the automated bug reporting? If not, is it something we can implement?
>
> Chris.

It is, see below for an example of bug report subject :
> OpenSatNav 0.9 [SVN Rev 137] Error Report (*Android: 1.6* - model: T-Mobile G1)

Revision history for this message
chris_debian (cjhandrew) wrote :

Guys,

Anybody know whether this bug is going anywhere? Do we need to update it? Do we have enough information to do any work on it?

Thanks,

Chris.

Revision history for this message
droidguy (stan-berka) wrote :

The first thing with this issue, is to reproduce it, hopefully in the emulator. I'm not sure anymore whether it's related to the resolution (QVGA) or the version of the OS, or possibly smth else.
droidguy

Revision history for this message
Kieran Fleming (kieran-fleming) wrote :

I've tried the latest code from this branch:
https://code.launchpad.net/~kieran-fleming/opensatnav/osn-small-tweaks
in the emulator running a QVGA android 1.6 image and there's no crash. Turning location services off doesn't change anything for me. I'm marking this as Incomplete, meaning that unless we get a way to reproduce this issue reliably it will have to be closed.

Changed in opensatnav:
status: New → Incomplete
Revision history for this message
droidguy (stan-berka) wrote :

Chris has got this error today. Chris, what is your Android version and phones screen resolution. Anyone has an idea how to pin this one down?

Revision history for this message
Guillaume Rosaire (zerog) wrote :

Kieran doesn't reproduce the issue, but Chris with the automatic build does. Couldn't it be possible that it comes from my android build ?
Kieran, could you download and test with the uploaded apk for rev 150 ?

Revision history for this message
Kieran Fleming (kieran-fleming) wrote : Re: [Bug 579464] Re: OpenSatNav crashes on startup

OK, rev 150 does FC if I turn off both location providers. This is on my G1 running android 2.1.

"Guillaume Rosaire" <email address hidden> wrote:

>
>Kieran doesn't reproduce the issue, but Chris with the automatic build does. Couldn't it be possible that it comes from my android build ?
>Kieran, could you download and test with the uploaded apk for rev 150 ?
>
>--
>OpenSatNav crashes on startup
>https://bugs.launchpad.net/bugs/579464
>You received this bug notification because you are a member of
>OpenSatNav Admins, which is the registrant for OpenSatNav.
>
>Status in OpenSatNav: Incomplete
>
>Bug description:
>OpenSatNav (rev. 133) crashes on startup on my HTC Tattoo running android 1.6 (Donut).
>
>But how to debug this?
>
>Laias
>
>

Revision history for this message
chris_debian (cjhandrew) wrote :

I had both location providers turned off, too. I'm using Cyanogenmod (Stable) and don't know what the default resolution is on my G1, but that is what I am using. The Cyanogenmod build is listed in my APK150-chris_debian attachment in the bug I filed, but as I'm sending this from my G1, it's difficult to copy the information. I think Kieran may be on the same build, though.

Cheers,

Chris.

Changed in opensatnav:
assignee: nobody → Kieran Fleming (kieran-fleming)
Revision history for this message
Kieran Fleming (kieran-fleming) wrote :

Fix committed:
http://bazaar.launchpad.net/~opensatnav-admins/opensatnav/release-1.0/revision/147
Please test this when a new APK comes up but it fixes the problem for me.

Changed in opensatnav:
status: Incomplete → Fix Committed
Revision history for this message
Paspartout (pv-ndsmail) wrote :

Hi!
Build OSN from Source and now its just working fine!
Can Confirm... Fix works! Thanks!

Paspartout (pv-ndsmail)
Changed in opensatnav:
status: Fix Committed → Fix Released
Revision history for this message
Alastor (alastor-ru) wrote :

Crashes on Android 2.2 (Nexus One phone)

Revision history for this message
Murphy (murphy2712+launchpad) wrote :
Download full text (3.6 KiB)

Here's the error (Nexus One - Froyo):

E/AndroidRuntime( 960): FATAL EXCEPTION: main
E/AndroidRuntime( 960): java.lang.RuntimeException: Unable to start service org.opensatnav.TripStatisticsService@449cf3d0 with Intent { cmp=org.opensatnav/.TripStatisticsService }: java.lang.IllegalArgumentException: syntax error: U_UNQUOTED_SPECIAL: ###.##
E/AndroidRuntime( 960): at android.app.ActivityThread.handleServiceArgs(ActivityThread.java:3063)
E/AndroidRuntime( 960): at android.app.ActivityThread.access$3600(ActivityThread.java:125)
E/AndroidRuntime( 960): at android.app.ActivityThread$H.handleMessage(ActivityThread.java:2096)
E/AndroidRuntime( 960): at android.os.Handler.dispatchMessage(Handler.java:99)
E/AndroidRuntime( 960): at android.os.Looper.loop(Looper.java:123)
E/AndroidRuntime( 960): at android.app.ActivityThread.main(ActivityThread.java:4627)
E/AndroidRuntime( 960): at java.lang.reflect.Method.invokeNative(Native Method)
E/AndroidRuntime( 960): at java.lang.reflect.Method.invoke(Method.java:521)
E/AndroidRuntime( 960): at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:868)
E/AndroidRuntime( 960): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:626)
E/AndroidRuntime( 960): at dalvik.system.NativeStart.main(Native Method)
E/AndroidRuntime( 960): Caused by: java.lang.IllegalArgumentException: syntax error: U_UNQUOTED_SPECIAL: ###.##
E/AndroidRuntime( 960): at com.ibm.icu4jni.text.NativeDecimalFormat.applyPattern(NativeDecimalFormat.java:569)
E/AndroidRuntime( 960): at com.ibm.icu4jni.text.NativeDecimalFormat.applyLocalizedPattern(NativeDecimalFormat.java:261)
E/AndroidRuntime( 960): at java.text.DecimalFormat.applyLocalizedPattern(DecimalFormat.java:633)
E/AndroidRuntime( 960): at org.opensatnav.services.TripStatistics.getSpeedString(TripStatistics.java:146)
E/AndroidRuntime( 960): at org.opensatnav.services.TripStatistics.getAverageTripSpeedString(TripStatistics.java:137)
E/AndroidRuntime( 960): at org.opensatnav.TripStatisticsController.tripStatisticsChanged(TripStatisticsController.java:69)
E/AndroidRuntime( 960): at org.opensatnav.services.TripStatistics.addTripStatsListener(TripStatistics.java:56)
E/AndroidRuntime( 960): at org.opensatnav.TripStatisticsService.onStart(TripStatisticsService.java:81)
E/AndroidRuntime( 960): at android.app.Service.onStartCommand(Service.java:420)
E/AndroidRuntime( 960): at android.app.ActivityThread.handleServiceArgs(ActivityThread.java:3053)
E/AndroidRuntime( 960): ... 10 more

It looks like the error is in org.opensatnav.services.TripStatistics.getSpeedString(TripStatistics.java:146):
formatter.applyLocalizedPattern("###.##");

I just looked at it in a test project using a try/catch around the applyLocalizedPattern:
DecimalFormat formatter = new DecimalFormat();
try {
    formatter.applyLocalizedPattern("###.##");
} catch (Exception e) {
    Log.e(TAG, e.getMessage());
}
It's quite strange since it does not bug in the 2.2 emulator but not in our "preview" of Froyo.
For a test value of 10, and with the "###.##" pattern,
Log.i(TAG, formatter.format(10 * 3600f / 1000f) + " km/h");
Emulator 2.2 prints: "36 km/h"
Nexus 2.2 p...

Read more...

Revision history for this message
Murphy (murphy2712+launchpad) wrote :

This kind of error appears again for me when I switch language to french.
I added some try/catch in TripStatistics to avoid the force closes:
...
try {
 distanceFormat.applyLocalizedPattern("###,###.#");
} catch (Exception e) {
 e.printStackTrace();
 // TODO: handle exception
}
...
try {
 speedFormat.applyLocalizedPattern("###.##");
} catch (Exception e) {
 e.printStackTrace();
 // TODO: handle exception
}

But it still don't start: black screen... then force close. Not a clue in the logs.
Using Cyanogen 6.0 with Nexus One.

Changed in opensatnav:
status: Fix Released → In Progress
Revision history for this message
Murphy (murphy2712+launchpad) wrote :

Even in english it doesn't start.
When I compile it in debug mode it starts... strange!

Revision history for this message
Kieran Fleming (kieran-fleming) wrote :

I can't replicate this anymore in English or French, can you try again with the latest code?

Revision history for this message
Murphy (murphy2712+launchpad) wrote :

I found how to replicate it (no matter which language is selected):
1. record a trace (with points, not a empty one, so you must have a fix),
2. quit osn,
3. start osn => black screen.

Revision history for this message
Kieran Fleming (kieran-fleming) wrote :

Yep, I see that too. I managed to get it to work again by commenting out
some stuff in SatNavActivity but I haven't got a cause yet.

On Mon, 2010-10-18 at 01:15 +0000, Murphy wrote:
> I found how to replicate it (no matter which language is selected):
> 1. record a trace (with points, not a empty one, so you must have a fix),
> 2. quit osn,
> 3. start osn => black screen.
>

Revision history for this message
Kieran Fleming (kieran-fleming) wrote :

I've fixed this in rev 174. Turns out there was a division by 0 error that led to an infinite loop when trying to draw the track.

Changed in opensatnav:
status: In Progress → Fix Committed
Revision history for this message
droidguy (stan-berka) wrote :

Kieran,
Thanks. It first showed up after I added trip stats and I thought it was
somehow related to it. Now, the trip stats seems to be partly/completely
disabled, doesn't it?

droidguy

On Oct 26, 2010 5:06 AM, "Kieran Fleming" <email address hidden> wrote:

I've fixed this in rev 174. Turns out there was a division by 0 error
that led to an infinite loop when trying to draw the track.

** Changed in: opensatnav
      Status: In Progress => Fix Committed

--
OpenSatNav crashes on startup
https://bugs.launchpad.net/bugs/579464
You received this bug noti...
Status in OpenSatNav: Fix Committed

Bug description:
OpenSatNav (rev. 133) crashes on startup on my HTC Tattoo running android
1.6 (Don...

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Duplicates of this bug

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.