joelmap / geohashdroid

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

Crash on Moto CLIQ #3

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. Pressing "Go!"

What is the expected output?  What happened instead?
Then the map begins to load, "Trying to determine your location..." is
usually displayed. Then the sorry app stopped unexpectedly dialog appears.

What version of Geohash Droid are you using?  On what phone?
I experienced the crash with 0.7.0, 0.7.1-pre1, and current svn.
Moto CLIQ, 1.5

Please provide any additional information below.
I don't get the error on the emulator, but on my CLIQ the debugger tells me:

Thread [<3> main] (Suspended (exception ClassCastException))    
    ViewRoot.draw(boolean) line: 1256   
    ViewRoot.performTraversals() line: 1049 
    ViewRoot.handleMessage(Message) line: 1518  
    ViewRoot(Handler).dispatchMessage(Message) line: 99 
    Looper.loop() line: 123 
    ActivityThread.main(String[]) line: 3977    
    Method.invokeNative(Object, Object[], Class, Class[], Class, int, boolean)
line: not available [native method] 
    Method.invoke(Object, Object...) line: 521  
    ZygoteInit$MethodAndArgsCaller.run() line: 782  
    ZygoteInit.main(String[]) line: 540 
    NativeStart.main(String[]) line: not available [native method]  

As far as I can tell this isn't very useful (I don't think geohashdroid
code is referenced here). What can I do to get better debugging information?

Original issue reported on code.google.com by jeb...@gmail.com on 2 Jan 2010 at 11:13

GoogleCodeExporter commented 9 years ago
I think I've heard of this happening with other phones, too, with most Market 
apps
that go to the map and use a MyLocationOverlay indicator like Geohash Droid 
does. 
I'll have to look it up again, but I think there's something related to the 
CLIQ not
having the location image that Android's looking for (that is, Motorola doesn't 
have
it in their custom build and skin of the OS), which causes it to crash 
internally.

But yeah, this isn't Geohash Droid code causing it.  However, when I can get to 
it, I
think there's a workaround I can use.

Original comment by captains...@gmail.com on 2 Jan 2010 at 6:08

GoogleCodeExporter commented 9 years ago
Thanks! I was able to find and use a workaround as described at
http://community.developer.motorola.com/t5/Android-App-Development-for/Google-Ma
ps/m-p/3421#M396

It extends MyLocationOverlay, try-catch the error, if there is an error the it 
uses a
overridden drawMyLocation(), if not it uses the default drawMyLocation().

Works for me (:

Original comment by jeb...@gmail.com on 3 Jan 2010 at 2:07

Attachments:

GoogleCodeExporter commented 9 years ago
Yep, that's roughly the same change I found somewhere on the Android discussion
groups. :-) I'll get that (or something similar) in as soon as I can!  Thanks!

Original comment by captains...@gmail.com on 4 Jan 2010 at 4:33

GoogleCodeExporter commented 9 years ago
All right, I've got the fix in SVN, r296.  As far as I know, it should work 
properly,
but I can't test it for sure, as I don't have a CLIQ.  If it works for you, I 
can go
ahead and mark this one fixed.

Enjoy!

Original comment by captains...@gmail.com on 4 Jan 2010 at 5:49

GoogleCodeExporter commented 9 years ago
Almost fixed, it doesn't crash anymore. However when I turned my gps on the my
location indicator shrank and (occasionally) vanished.

I found that at AutoZoomingLocationOverlay.java:245 the variable radius would
sometimes reach zero, no circle drawn.

If you bypass the checks and force mBugged = true you should be able to see 
this.

I added:
if(radius < 2)radius=2;

But that is still pretty small. 3 or 5 might be better minimum radius value.

Original comment by jeb...@gmail.com on 4 Jan 2010 at 10:03

GoogleCodeExporter commented 9 years ago
Oops.  My mistake, I wasn't defining a value right (or, well, at all), and it 
was
clipping out the indicator by accident.

But this oughta fix it.  Now in SVN r298.

Original comment by captains...@gmail.com on 4 Jan 2010 at 3:19

GoogleCodeExporter commented 9 years ago
Very nice. I see a blue dot, with an a circle around it to indicate accuracy.
I think we can call this fixed.

Original comment by jeb...@gmail.com on 5 Jan 2010 at 5:48

GoogleCodeExporter commented 9 years ago
Sweet.  That'll be in the next version, once we've got wiki features ironed 
out.  Thanks!

Original comment by captains...@gmail.com on 5 Jan 2010 at 6:20