[android-developers] Re: App breaks for some users after they update from the Market

2010-09-03 Thread mot12
Thanks for posting your findings and glad you found your bug. Less
happy for myself as this clearly indicates a bug in my code, too. Oh
well...

-- 
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en



Re: [android-developers] Re: App breaks for some users after they update from the Market

2010-09-01 Thread Dianne Hackborn
Thank for the update.  I am just very glad to know that it isn't a nasty
platform bug. :)

On Mon, Aug 30, 2010 at 3:49 PM, TreKing treking...@gmail.com wrote:

 PROBLEM SOLVED!

 Conclusion: I'm an idiot (shocked!?)

 So, for those of you that care, here was the problem. I followed Zsolt's
 suggestion to go back to the previous version and then updated the app and
 sure enough it crashed.

 Quick background: The app gets data from the inter webs and then caches it
 in my own format with some extra data for quicker access and to support
 extra functionality. This cache is wiped on each update to refresh the
 data and avoid issues exactly like this.

 At least it's *supposed* to be wiped.

 Unfortunately, while developing the latest version, I
 apparently inadvertently removed the single line of code that clears the
 cache when the app is updated! Genius!

 So the new code was trying to load the old cache which was missing a new
 piece of data (which it otherwise would get from that static map discussed
 earlier).

 I had no idea I'd removed that line to clear the cache so I didn't even
 think it to be a possibility! I assumed all users were getting fresh data.

 Well, now that I've thoroughly embarrassed myself, thank you all for your
 time, sorry to have wasted it on such a stupid oversight, and Zsolt, you're
 my hero for the brain-dead simple idea to try to update the app for
 myself. I should really work that concept into my test plan ...

 Now, if you'll excuse me, I have a proper update to release ...

 Thanks everyone!


 -
 TreKing http://sites.google.com/site/rezmobileapps/treking - Chicago
 transit tracking app for Android-powered devices

  --
 You received this message because you are subscribed to the Google
 Groups Android Developers group.
 To post to this group, send email to android-developers@googlegroups.com
 To unsubscribe from this group, send email to
 android-developers+unsubscr...@googlegroups.comandroid-developers%2bunsubscr...@googlegroups.com
 For more options, visit this group at
 http://groups.google.com/group/android-developers?hl=en




-- 
Dianne Hackborn
Android framework engineer
hack...@android.com

Note: please don't send private questions to me, as I don't have time to
provide private support, and so won't reply to such e-mails.  All such
questions should be posted on public forums, where I and others can see and
answer them.

-- 
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

Re: [android-developers] Re: App breaks for some users after they update from the Market

2010-08-31 Thread TreKing
On Mon, Aug 30, 2010 at 7:03 PM, Zsolt Vasvari zvasv...@gmail.com wrote:

 I am glad you solved it.  How do you have your warning levels set?  I have
 mine set to the highest possible on everything and a removed line might have
 been caught via unused/unitiliazed varaibles.


Me too! Probably the defaults, but I have no warnings (except the required
minSDK warning) and it wouldn't have been caught anyway. The line that got
removed was a simple static helper function that used the current context to
delete all files in the cache directory. Removing it had no effect on the
surrounding code.

On Mon, Aug 30, 2010 at 7:03 PM, William Ferguson william.ferguson.au@
gmail.com wrote:

 He he, glad you got some closure.


Me too! Thanks!

-
TreKing http://sites.google.com/site/rezmobileapps/treking - Chicago
transit tracking app for Android-powered devices

-- 
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

[android-developers] Re: App breaks for some users after they update from the Market

2010-08-31 Thread Zsolt Vasvari
 Me too! Probably the defaults, but I have no warnings (except the required
 minSDK warning) and it wouldn't have been caught anyway. The line that got
 removed was a simple static helper function that used the current context to
 delete all files in the cache directory. Removing it had no effect on the
 surrounding code.

Yes, but if you declared the helper function private, you may have
gotten an unused warning.  If it was in a different class, of course,
that's no help as the compiler doesn't check for unused package
private functions, even though it could.

-- 
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en


Re: [android-developers] Re: App breaks for some users after they update from the Market

2010-08-31 Thread TreKing
On Tue, Aug 31, 2010 at 4:30 PM, Zsolt Vasvari zvasv...@gmail.com wrote:

 Yes, but if you declared the helper function private, you may have gotten
 an unused warning.  If it was in a different class, of course, that's no
 help as the compiler doesn't check for unused package private functions,
 even though it could.


Yeah, no, it was a separate class with a static clearCache method that's
used elsewhere as well. I normally do get the unused warning and really
appreciate it for trimming down unnecessary code.

Funny story, BTW, turns out I WAS calling the cache clearing function (I
looked at the diff wrong, I'm way off my game), but it had a bug where it
wasn't clearing the correct cache files. Not as stupid as removing a line of
code, but still pretty stupid.

Released my fix and anxiously await to see what kind of comments I wake up
to!

-
TreKing http://sites.google.com/site/rezmobileapps/treking - Chicago
transit tracking app for Android-powered devices

-- 
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

[android-developers] Re: App breaks for some users after they update from the Market

2010-08-30 Thread Zsolt Vasvari
 I don't know. Every email I've gotten and all comments in the crash reports
 indicate it's a consistent crash occurring 100% of the time (and in the
 exact same location based on the ever-growing report count for the same
 stack trace).

 Clearing the data (or uninstalling / re-installing which clears the data as
 well) makes the problem go away each and every time.

I think what's happening then is that some kind of race condition
corrupts your app data, after which the crash will occur every time.
Of course, clearing the app data will ellivate the problem.  But I
still think that it's red herring:

- It started to happen after you introduced static maps.
- You admit using such maps in multiple threads
- java.util.TreeMap is not thread safe.

What I would do is wrap TreeMap around a
java.util.Collections.syncronizedMap (not 100% about the name) and
then release an updated app and see if the crashes go away.  I know it
makes your users the testers, but if you cannot duplicate it, there is
not much to lose.

-- 
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en


Re: [android-developers] Re: App breaks for some users after they update from the Market

2010-08-30 Thread TreKing
On Sun, Aug 29, 2010 at 8:24 PM, William Ferguson william.ferguson.au@
gmail.com wrote:

 What's the taskAffinity?


Whatever the default is - I've never touched this.

I suspect that clearing the data is changing the behaviour because this
 speed up / slows down one of the threads, thereby (generally) avoiding the
 race condition.


I have a feature that auto-backs up all user data to the SD and restores it
if the local data file is gone. So even if they clear the local data, it's
restored on the next app start up. So regardless, all user saved data is
there before and after they clear the app's local data storage to alleviate
the problem.

And the crash does not occur in the first activity, where data is usually
loaded. I say usually because it's lazy-loaded (so if the user navigates
away from the second activity and comes back much later, it's possible the
memory got wiped). But this occurs in onCreate in the main thread of the
second activity, and this activity does not try to do anything with the user
data until after the point at which the crash occurs.


 I'd be tempted to
 1) synchronize the method


Probably a good idea, I'll be doing that =)


  2) make the static instance an instance of your Application class.


I started using a custom Application class a while ago and quickly got tired
of having to cast up each time I needed to do something with it. I'll try a
better implementation of a Singleton first.

On Mon, Aug 30, 2010 at 6:16 AM, Zsolt Vasvari zvasv...@gmail.com wrote:

 I think what's happening then is that some kind of race condition corrupts
 your app data, after which the crash will occur every time.


But the main activity that starts up and loads the user data each and every
time does not crash, and the point at which the crash happens is NOT using
user data - it's using a hard-coded reference which is explicitly set in
code. That reference, somehow, ends up being null, even though previously it
was (probably) used in the user-data loading process. WTF!?


 - It started to happen after you introduced static maps.


Weird stuff after updating like this has happened before, though this time
it's much more widespread and consistent.
Also, note that the map itself is not static: there is a static instance of
the class that contains a map. Don't know if that makes a huge difference,
but it's worth pointing out.


 - You admit using such maps in multiple threads
 - java.util.TreeMap is not thread safe.


Yes, but the map is initialized ONCE in the main thread and never altered
again. I'm not adding or removing anything from it at any other point. It's
there strictly to get access to the pre-defined derived-type instances I
need to use depending on the user's selection. Also, no thread is started
until after this map is initialized.


 What I would do is wrap TreeMap around
 a java.util.Collections.syncronizedMap (not 100% about the name) and then
 release an updated app and see if the crashes go away.  I know it makes your
 users the testers, but if you cannot duplicate it, there is not much to
 lose.


 Indeed, anything is worth a shot at this point! I'll try that when I get a
chance and post back what I see.


IF YOU'RE REALLY BORED and want more context to the problem, you can check
out the free version of my app. From the main screen use the menu and select
Trek Tracker to open the second activity where the crash occurs. This
screen is series of drop downs for the user to drill down to the stop they
want bus predictions for.

The first option is the transit system - these are the hard-coded values in
the map: the strings the user sees are the keys, pulled directly from the
map, and they point to the derived type which handles the logic for getting
data for that system. All of these options are loaded in onCreate and pulled
directly from the map - if this part is working, that map should be
completely valid at this point.

Next the user selects a route, direction, and stop, each populated
dynamically based on the previous selection. Once the stop is selected,
that's all the data I need to get bus arrival predictions, so at this point
a thread is spawned with the users's selected data to load the predictions
every minute or so.

This is where the crash occurs. The background thread tries to use the
reference to the transit system it got from the very first selection, which
I swear should be valid at this point, and throws a NullPointerException. So
somehow, that reference which is EXPLICITLY set with map.put(Key, new
Derived()), ends up being null and then only in this activity.

Thanks for the continued help folks. This is a head-scratcher.

-
TreKing http://sites.google.com/site/rezmobileapps/treking - Chicago
transit tracking app for Android-powered devices

-- 
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, 

[android-developers] Re: App breaks for some users after they update from the Market

2010-08-30 Thread Zsolt Vasvari
I downloaded the app, but I couldn't get it to crash, sorry.  But I
did a clean install.

What a did notice, though, was how it only loaded the bus routes (from
the web?) the first time around.  Even after I killed the app and
relaunched it, the bus route list was populated without loading.  So
you must be storing them locally, is that right?

Not too sure what I am asking here, if you have the previous version
of the app, I'd try to duplicate the problem by pushing the old
version followed by the new one using adb, simulating an upgrade
process.

On Aug 30, 12:07 pm, TreKing treking...@gmail.com wrote:
 On Sun, Aug 29, 2010 at 8:24 PM, William Ferguson william.ferguson.au@

 gmail.com wrote:
  What's the taskAffinity?

 Whatever the default is - I've never touched this.

 I suspect that clearing the data is changing the behaviour because this

  speed up / slows down one of the threads, thereby (generally) avoiding the
  race condition.

 I have a feature that auto-backs up all user data to the SD and restores it
 if the local data file is gone. So even if they clear the local data, it's
 restored on the next app start up. So regardless, all user saved data is
 there before and after they clear the app's local data storage to alleviate
 the problem.

 And the crash does not occur in the first activity, where data is usually
 loaded. I say usually because it's lazy-loaded (so if the user navigates
 away from the second activity and comes back much later, it's possible the
 memory got wiped). But this occurs in onCreate in the main thread of the
 second activity, and this activity does not try to do anything with the user
 data until after the point at which the crash occurs.

  I'd be tempted to
  1) synchronize the method

 Probably a good idea, I'll be doing that =)

   2) make the static instance an instance of your Application class.

 I started using a custom Application class a while ago and quickly got tired
 of having to cast up each time I needed to do something with it. I'll try a
 better implementation of a Singleton first.

 On Mon, Aug 30, 2010 at 6:16 AM, Zsolt Vasvari zvasv...@gmail.com wrote:
  I think what's happening then is that some kind of race condition corrupts
  your app data, after which the crash will occur every time.

 But the main activity that starts up and loads the user data each and every
 time does not crash, and the point at which the crash happens is NOT using
 user data - it's using a hard-coded reference which is explicitly set in
 code. That reference, somehow, ends up being null, even though previously it
 was (probably) used in the user-data loading process. WTF!?

  - It started to happen after you introduced static maps.

 Weird stuff after updating like this has happened before, though this time
 it's much more widespread and consistent.
 Also, note that the map itself is not static: there is a static instance of
 the class that contains a map. Don't know if that makes a huge difference,
 but it's worth pointing out.

  - You admit using such maps in multiple threads
  - java.util.TreeMap is not thread safe.

 Yes, but the map is initialized ONCE in the main thread and never altered
 again. I'm not adding or removing anything from it at any other point. It's
 there strictly to get access to the pre-defined derived-type instances I
 need to use depending on the user's selection. Also, no thread is started
 until after this map is initialized.

  What I would do is wrap TreeMap around
  a java.util.Collections.syncronizedMap (not 100% about the name) and then
  release an updated app and see if the crashes go away.  I know it makes your
  users the testers, but if you cannot duplicate it, there is not much to
  lose.

  Indeed, anything is worth a shot at this point! I'll try that when I get a
 chance and post back what I see.

 IF YOU'RE REALLY BORED and want more context to the problem, you can check
 out the free version of my app. From the main screen use the menu and select
 Trek Tracker to open the second activity where the crash occurs. This
 screen is series of drop downs for the user to drill down to the stop they
 want bus predictions for.

 The first option is the transit system - these are the hard-coded values in
 the map: the strings the user sees are the keys, pulled directly from the
 map, and they point to the derived type which handles the logic for getting
 data for that system. All of these options are loaded in onCreate and pulled
 directly from the map - if this part is working, that map should be
 completely valid at this point.

 Next the user selects a route, direction, and stop, each populated
 dynamically based on the previous selection. Once the stop is selected,
 that's all the data I need to get bus arrival predictions, so at this point
 a thread is spawned with the users's selected data to load the predictions
 every minute or so.

 This is where the crash occurs. The background thread tries to use the
 reference to the transit 

Re: [android-developers] Re: App breaks for some users after they update from the Market

2010-08-30 Thread TreKing
On Mon, Aug 30, 2010 at 4:35 PM, Zsolt Vasvari zvasv...@gmail.com wrote:

 I downloaded the app, but I couldn't get it to crash, sorry.  But I did a
 clean install.


Thanks for trying! I can't believe I'm disappointed it didn't crash =P


 What a did notice, though, was how it only loaded the bus routes (from the
 web?) the first time around.  Even after I killed the app and relaunched it,
 the bus route list was populated without loading.  So you must be storing
 them locally, is that right?


Yes, all the data used on that screen is cached after the first access (in
the cached directory, 'natch) for faster retrieval later. It all comes from
the transit system in question, is out of my control, and has not changed.


 Not too sure what I am asking here, if you have the previous version of the
 app, I'd try to duplicate the problem by pushing the old version followed by
 the new one using adb, simulating an upgrade process.


I do have it (revision control FTW), good idea. I'll give that a go when I
get a chance. Thanks!

-
TreKing http://sites.google.com/site/rezmobileapps/treking - Chicago
transit tracking app for Android-powered devices

-- 
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

Re: [android-developers] Re: App breaks for some users after they update from the Market

2010-08-30 Thread Kostya Vasilyev
Since clearing application data in Android's application management screen
resolves the issue (as far as I understand from a previous message), perhaps
it would be worthwhile to try and understand what this data is, exactly, and
then follow the yellow brick road (so to speak) back to the code that
creates this data and uses it.

--
Kostya Vasilyev -- http://kmansoft.wordpress.com

31.08.2010 1:44 пользователь TreKing treking...@gmail.com написал:

On Mon, Aug 30, 2010 at 4:35 PM, Zsolt Vasvari zvasv...@gmail.com wrote:

 I downloaded the app,...
Thanks for trying! I can't believe I'm disappointed it didn't crash =P




 What a did notice, though, was how it only loaded the bus routes (from the
web?) the first ti...
Yes, all the data used on that screen is cached after the first access (in
the cached directory, 'natch) for faster retrieval later. It all comes from
the transit system in question, is out of my control, and has not changed.




 Not too sure what I am asking here, if you have the previous version of
the app, I'd try to d...
I do have it (revision control FTW), good idea. I'll give that a go when I
get a chance. Thanks!

-
TreKing http://sites.google.com/site/rezmobileapps/treking - Chicago
transit tracking app for Android-powered devices



-- 
You received this message because you are subscribed to the Google
Groups Android Developers...

-- 
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

Re: [android-developers] Re: App breaks for some users after they update from the Market

2010-08-30 Thread TreKing
PROBLEM SOLVED!

Conclusion: I'm an idiot (shocked!?)

So, for those of you that care, here was the problem. I followed Zsolt's
suggestion to go back to the previous version and then updated the app and
sure enough it crashed.

Quick background: The app gets data from the inter webs and then caches it
in my own format with some extra data for quicker access and to support
extra functionality. This cache is wiped on each update to refresh the
data and avoid issues exactly like this.

At least it's *supposed* to be wiped.

Unfortunately, while developing the latest version, I
apparently inadvertently removed the single line of code that clears the
cache when the app is updated! Genius!

So the new code was trying to load the old cache which was missing a new
piece of data (which it otherwise would get from that static map discussed
earlier).

I had no idea I'd removed that line to clear the cache so I didn't even
think it to be a possibility! I assumed all users were getting fresh data.

Well, now that I've thoroughly embarrassed myself, thank you all for your
time, sorry to have wasted it on such a stupid oversight, and Zsolt, you're
my hero for the brain-dead simple idea to try to update the app for
myself. I should really work that concept into my test plan ...

Now, if you'll excuse me, I have a proper update to release ...

Thanks everyone!

-
TreKing http://sites.google.com/site/rezmobileapps/treking - Chicago
transit tracking app for Android-powered devices

-- 
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

[android-developers] Re: App breaks for some users after they update from the Market

2010-08-30 Thread Zsolt Vasvari
I am glad you solved it.  How do you have your warning levels set?  I
have mine set to the highest possible on everything and a removed line
might have been caught via unused/unitiliazed varaibles.

On Aug 30, 6:49 pm, TreKing treking...@gmail.com wrote:
 PROBLEM SOLVED!

 Conclusion: I'm an idiot (shocked!?)

 So, for those of you that care, here was the problem. I followed Zsolt's
 suggestion to go back to the previous version and then updated the app and
 sure enough it crashed.

 Quick background: The app gets data from the inter webs and then caches it
 in my own format with some extra data for quicker access and to support
 extra functionality. This cache is wiped on each update to refresh the
 data and avoid issues exactly like this.

 At least it's *supposed* to be wiped.

 Unfortunately, while developing the latest version, I
 apparently inadvertently removed the single line of code that clears the
 cache when the app is updated! Genius!

 So the new code was trying to load the old cache which was missing a new
 piece of data (which it otherwise would get from that static map discussed
 earlier).

 I had no idea I'd removed that line to clear the cache so I didn't even
 think it to be a possibility! I assumed all users were getting fresh data.

 Well, now that I've thoroughly embarrassed myself, thank you all for your
 time, sorry to have wasted it on such a stupid oversight, and Zsolt, you're
 my hero for the brain-dead simple idea to try to update the app for
 myself. I should really work that concept into my test plan ...

 Now, if you'll excuse me, I have a proper update to release ...

 Thanks everyone!

 ---­--
 TreKing http://sites.google.com/site/rezmobileapps/treking - Chicago
 transit tracking app for Android-powered devices

-- 
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en


[android-developers] Re: App breaks for some users after they update from the Market

2010-08-30 Thread William Ferguson
He he, glad you got some closure.

On Aug 31, 8:49 am, TreKing treking...@gmail.com wrote:
 PROBLEM SOLVED!

 Conclusion: I'm an idiot (shocked!?)

 So, for those of you that care, here was the problem. I followed Zsolt's
 suggestion to go back to the previous version and then updated the app and
 sure enough it crashed.

 Quick background: The app gets data from the inter webs and then caches it
 in my own format with some extra data for quicker access and to support
 extra functionality. This cache is wiped on each update to refresh the
 data and avoid issues exactly like this.

 At least it's *supposed* to be wiped.

 Unfortunately, while developing the latest version, I
 apparently inadvertently removed the single line of code that clears the
 cache when the app is updated! Genius!

 So the new code was trying to load the old cache which was missing a new
 piece of data (which it otherwise would get from that static map discussed
 earlier).

 I had no idea I'd removed that line to clear the cache so I didn't even
 think it to be a possibility! I assumed all users were getting fresh data.

 Well, now that I've thoroughly embarrassed myself, thank you all for your
 time, sorry to have wasted it on such a stupid oversight, and Zsolt, you're
 my hero for the brain-dead simple idea to try to update the app for
 myself. I should really work that concept into my test plan ...

 Now, if you'll excuse me, I have a proper update to release ...

 Thanks everyone!

 -
 TreKing http://sites.google.com/site/rezmobileapps/treking - Chicago
 transit tracking app for Android-powered devices

-- 
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en


Re: [android-developers] Re: App breaks for some users after they update from the Market

2010-08-29 Thread TreKing
On Sat, Aug 28, 2010 at 3:22 AM, William Ferguson william.ferguson.au@
gmail.com wrote:

 From the symptoms, the code you posted and the assumption that this section
 of code is multi-threaded, it looks like a race condition.


That's for the suggestion, but where the static instance is used is indeed
in the main thread. The crash does occur in a separate thread, where the
variable that's supposed to be valid from that static data is used later,
but that thread is started long after the static instance is accessed (the
thread is dependent on the user's selections).

Though making it synchronized is probably a good idea regardless.

Something interesting I just realized - this same static class is used in
the main activity as part of loading the user's saved data and none of that
has any issues, which you think would given the clearing the data fixes the
problem.

So: Activity1 - Load user data using static data - No problems (at least
none reported)
Activity2, launched from Activity1, try to use any instance stored in the
static - crashy crashy.

On Sat, Aug 28, 2010 at 9:43 AM, Zsolt Vasvari zvasv...@gmail.com wrote:

 I think the install/reinstall and clearing the user data are red herrings.
  The app might work again for the user if they just ran it again.


I don't know. Every email I've gotten and all comments in the crash reports
indicate it's a consistent crash occurring 100% of the time (and in the
exact same location based on the ever-growing report count for the same
stack trace).

Clearing the data (or uninstalling / re-installing which clears the data as
well) makes the problem go away each and every time.

Thanks for the suggestions. I'm beyond baffled. I'm wishing it would start
crashing on me so I can start debugging the stupid thing!

-
TreKing http://sites.google.com/site/rezmobileapps/treking - Chicago
transit tracking app for Android-powered devices

-- 
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

[android-developers] Re: App breaks for some users after they update from the Market

2010-08-29 Thread William Ferguson
Not real sure about this, just putting it out there ..
But is is possible that Activity2 is started in a separate Task to
Activity1?
I can find any doco confirming or denying, but perhaps separate Tasks
run in separate JVMs, hence the potential for non-initialization.
What's the taskAffinity?

I suspect that clearing the data is changing the behaviour because
this speed up / slows down one of the threads, thereby (generally)
avoiding the race condition.

I'd be tempted to
1) synchronize the method
2) make the static instance an instance of your Application class.


On Aug 30, 10:57 am, TreKing treking...@gmail.com wrote:
 On Sat, Aug 28, 2010 at 3:22 AM, William Ferguson william.ferguson.au@

 gmail.com wrote:
  From the symptoms, the code you posted and the assumption that this section
  of code is multi-threaded, it looks like a race condition.

 That's for the suggestion, but where the static instance is used is indeed
 in the main thread. The crash does occur in a separate thread, where the
 variable that's supposed to be valid from that static data is used later,
 but that thread is started long after the static instance is accessed (the
 thread is dependent on the user's selections).

 Though making it synchronized is probably a good idea regardless.

 Something interesting I just realized - this same static class is used in
 the main activity as part of loading the user's saved data and none of that
 has any issues, which you think would given the clearing the data fixes the
 problem.

 So: Activity1 - Load user data using static data - No problems (at least
 none reported)
 Activity2, launched from Activity1, try to use any instance stored in the
 static - crashy crashy.

 On Sat, Aug 28, 2010 at 9:43 AM, Zsolt Vasvari zvasv...@gmail.com wrote:
  I think the install/reinstall and clearing the user data are red herrings.
   The app might work again for the user if they just ran it again.

 I don't know. Every email I've gotten and all comments in the crash reports
 indicate it's a consistent crash occurring 100% of the time (and in the
 exact same location based on the ever-growing report count for the same
 stack trace).

 Clearing the data (or uninstalling / re-installing which clears the data as
 well) makes the problem go away each and every time.

 Thanks for the suggestions. I'm beyond baffled. I'm wishing it would start
 crashing on me so I can start debugging the stupid thing!

 -
 TreKing http://sites.google.com/site/rezmobileapps/treking - Chicago
 transit tracking app for Android-powered devices

-- 
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en


[android-developers] Re: App breaks for some users after they update from the Market

2010-08-29 Thread William Ferguson
Actually I should have asked whether Activity2 is being created in a
different Process as that will definitely be in a separate JVM.

On Aug 30, 11:24 am, William Ferguson william.ferguson...@gmail.com
wrote:
 Not real sure about this, just putting it out there ..
 But is is possible that Activity2 is started in a separate Task to
 Activity1?
 I can find any doco confirming or denying, but perhaps separate Tasks
 run in separate JVMs, hence the potential for non-initialization.
 What's the taskAffinity?

 I suspect that clearing the data is changing the behaviour because
 this speed up / slows down one of the threads, thereby (generally)
 avoiding the race condition.

 I'd be tempted to
 1) synchronize the method
 2) make the static instance an instance of your Application class.

 On Aug 30, 10:57 am, TreKing treking...@gmail.com wrote:

  On Sat, Aug 28, 2010 at 3:22 AM, William Ferguson william.ferguson.au@

  gmail.com wrote:
   From the symptoms, the code you posted and the assumption that this 
   section
   of code is multi-threaded, it looks like a race condition.

  That's for the suggestion, but where the static instance is used is indeed
  in the main thread. The crash does occur in a separate thread, where the
  variable that's supposed to be valid from that static data is used later,
  but that thread is started long after the static instance is accessed (the
  thread is dependent on the user's selections).

  Though making it synchronized is probably a good idea regardless.

  Something interesting I just realized - this same static class is used in
  the main activity as part of loading the user's saved data and none of that
  has any issues, which you think would given the clearing the data fixes the
  problem.

  So: Activity1 - Load user data using static data - No problems (at least
  none reported)
  Activity2, launched from Activity1, try to use any instance stored in the
  static - crashy crashy.

  On Sat, Aug 28, 2010 at 9:43 AM, Zsolt Vasvari zvasv...@gmail.com wrote:
   I think the install/reinstall and clearing the user data are red herrings.
    The app might work again for the user if they just ran it again.

  I don't know. Every email I've gotten and all comments in the crash reports
  indicate it's a consistent crash occurring 100% of the time (and in the
  exact same location based on the ever-growing report count for the same
  stack trace).

  Clearing the data (or uninstalling / re-installing which clears the data as
  well) makes the problem go away each and every time.

  Thanks for the suggestions. I'm beyond baffled. I'm wishing it would start
  crashing on me so I can start debugging the stupid thing!

  -
  TreKing http://sites.google.com/site/rezmobileapps/treking - Chicago
  transit tracking app for Android-powered devices

-- 
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en


Re: [android-developers] Re: App breaks for some users after they update from the Market

2010-08-29 Thread Dianne Hackborn
On Sun, Aug 29, 2010 at 6:24 PM, William Ferguson william.ferguson.au@
gmail.com wrote:

 Not real sure about this, just putting it out there ..
 But is is possible that Activity2 is started in a separate Task to
 Activity1?
 I can find any doco confirming or denying, but perhaps separate Tasks
 run in separate JVMs, hence the potential for non-initialization.
 What's the taskAffinity?


All activities in the same process have their callbacks called on the same
(main) thread of the process.  All activities in a .apk will run in the same
process, by default, unless you explicitly override their behavior with
android:process.  If you do that, those activities will run in the process
indicated, which has its own VM, statics, etc., completely isolated from
other processes.

-- 
Dianne Hackborn
Android framework engineer
hack...@android.com

Note: please don't send private questions to me, as I don't have time to
provide private support, and so won't reply to such e-mails.  All such
questions should be posted on public forums, where I and others can see and
answer them.

-- 
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

[android-developers] Re: App breaks for some users after they update from the Market

2010-08-28 Thread William Ferguson
Thanks for posting the psuedo code.
From the symptoms, the code you posted and the assumption that this
section of code is multi-threaded, it looks like a race condition.

public StaticClass {
 private static Manager manager = new Manager();
 public static Manager getManager() { return manager; }
}

If 2 Threads simultaneously access the above its possible that the 2nd
will receive a partially configured instance of Manager.
It's one of the reasons I avoid statics like the plague.

Try changing it to:

public StaticClass {
 private static Manager manager = new Manager();
 public static synchronized Manager getManager() { return manager; }
}


On Aug 28, 7:34 am, TreKing treking...@gmail.com wrote:
 On Fri, Aug 27, 2010 at 3:53 PM, Tom Gibara tomgib...@gmail.com wrote:
  Have the keys changed between releases of the application? Is the selected
  key persisted in any way?

 Nope, they're hard-coded and were introduced in the last update.
 So where I have Key is a string literal I use to ID the derived instance.

 So it's like:

 refs.add(Option1, new Derived1());
 refs.add(Option1, new Derived2());

 and so on.

 Then in a drop down, the user can select Option1 or Option2, each option
 being obtained from the hard-coded list.
 So yeah, no saving or restoring of the keys. All in the code.

 -
 TreKing http://sites.google.com/site/rezmobileapps/treking - Chicago
 transit tracking app for Android-powered devices

-- 
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en


[android-developers] Re: App breaks for some users after they update from the Market

2010-08-28 Thread Zsolt Vasvari
I would bet any money that this is very clearly going to be a race
condition somewhere.  Your code using a static Map and the user
symptoms are a dead giveaway.

I think the install/reinstall and clearing the user data are red
herrings.  The app might work again for the user if they just ran it
again.


On Aug 27, 4:40 pm, TreKing treking...@gmail.com wrote:
 Thanks for the continued help.

 On Fri, Aug 27, 2010 at 2:22 PM, Dianne Hackborn hack...@android.comwrote:

   The first thing I would look for is any code writing data that could cause
  problems if it was killed in the middle of executing.

 That makes sense, but that's also why I'm confused. The main issue I've had,
 for which I have nearly 30 reports now in each version of my app in the dev
 console, has nothing to do with data access. Unless I'm really missing
 something.

 I have a base class reference that should be set to the appropriate instance
 of a derived class type based on user selection.
 These derived type instances come from a manager class, of sorts, that holds
 the instances. There is one static instance of this manager class in the app
 since it's global, constant data. So it should be initialized, along with
 it's internal data it manages, at all times. None of this involves any data
 access.

 Some pseudocode if it helps:

 // In Manager class
 public Manager
 {
  private MapString, BaseRef refs = null;

  public Manager()
  {
   refs = new TreeMapString, BaseRef();

   // Explicitly add derived instances of BaseRef
   refs.put(Key, new DerivedInstance());

   // add more ...
  }

  public BaseRef get(String key)
  {
   return refs.get(key);
  }

 }

 //In Static access class
 public StaticClass
 {
  private static Manager manager = new Manager();

  public static Manager getManager() { return manager; }

 }

 // Then, finally, in the class where the crash occurs
 BaseRef baseRef = StaticClass.getManager().get(userSelection);

 Userselection is the value chosen by the user from a list pre-populated by
 the Keys in the Manager class to begin with.
 So if the user was able to make the selection, the key was there at the
 start of the Activity, and in the manager where it originated from.

 baseRef, which is obtained from that single manager's list (which is
 essentially hard-coded), is later used elsewhere and ends up being null.

 There is no file data access involved anywhere in this Activity besides
 using SharedPreferences for exactly one option.

 Also, now that I've typed this out, this goes against the idea that statics
 are the problem since I would have had the null pointer at the point where I
 try to access the Manager class. Instead, it appears to be valid but for
 some reason its internal data, which is set on construction, is not.

 It's worth noting that I've seen this problem to a lesser extent before I
 added this manager class stuff, but since adding it last week, the problem
 seems to have exploded with a fury. But again, not sure if that's a result
 of a larger user-base over two months since last major update.

 I think at some point I'll start polling my users to see how many of them
 continue to see the issue after updating. Since I've instructed them, in
 nice big letters, to try uninstalling first, I expect not to hear any more
 complaints for now, but I'd rather fix the problem than band-aid it like
 this.

 ---­--
 TreKing http://sites.google.com/site/rezmobileapps/treking - Chicago
 transit tracking app for Android-powered devices

-- 
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en


Re: [android-developers] Re: App breaks for some users after they update from the Market

2010-08-27 Thread TreKing
On Thu, Aug 26, 2010 at 1:18 PM, TreKing treking...@gmail.com wrote:

 On Thu, Aug 26, 2010 at 12:42 PM, Dianne Hackborn hack...@android.comwrote:

 - See if having them clear data first before trying to uninstall solves
 the problem.


 I'll have someone try this next time I get an email and report back.


OK, so had two more emails yesterday and told them to clear their data by
going through the manage applications screen. I made no mention of
uninstalling and re-installing. One got back to me last night and confirmed
that this worked for her. I did not hear back from the other, which I assume
means she's happy and it worked for her as well.

So, apparently a complete uninstall is not necessary - there's something
wrong in the data. So now the question is what's going wrong in the app data
that would cause the app code to return null pointers on stuff that's not
relying on app data?

Side-note, after several more reports in the dev console and comments about
force close issues, I decided to put out another update instructing people
to uninstall - reinstall. This was, of course, just 10 minutes before the
nice lady got back to me and let me know clearing data worked.

-
TreKing http://sites.google.com/site/rezmobileapps/treking - Chicago
transit tracking app for Android-powered devices

-- 
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

[android-developers] Re: App breaks for some users after they update from the Market

2010-08-27 Thread Carl Whalley
Might be throwing in a food-for-thought curveball here but I wonder if
there's a difference between updating an app that's running and one
which isn't?

On Aug 26, 8:23 pm, TreKing treking...@gmail.com wrote:
 On Thu, Aug 26, 2010 at 1:56 PM, Doug beafd...@gmail.com wrote:
  I don't have anything helpful to add, TreKing, but I did want you to know
  that a small minority of my users see random breakage on update and a
  reinstall fixes them right up.

 Just knowing others are having the same issue is helpful. With
 enough anecdotes we can begin to pinpoint commonalities and
 hopefully unearth the root cause of the problem. If anyone else has had this
 issue, please share any details you may have.
 Thanks.

 --- 
 --
 TreKing http://sites.google.com/site/rezmobileapps/treking - Chicago
 transit tracking app for Android-powered devices

-- 
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en


Re: [android-developers] Re: App breaks for some users after they update from the Market

2010-08-27 Thread TreKing
On Fri, Aug 27, 2010 at 10:01 AM, Carl Whalley
carl.whal...@googlemail.comwrote:

 Might be throwing in a food-for-thought curveball here but I wonder
 if there's a difference between updating an app that's running and one which
 isn't?


Might be. It's only a handful of people (well, more than a handful for me)
but still few in comparison to the total install base, so there's definitely
something they're doing that's triggering the problem.

I would think the update process would kill the app if it's running, but
maybe not.

Also, got confirmation from the second person that clearing the data solved
the problem.

-
TreKing http://sites.google.com/site/rezmobileapps/treking - Chicago
transit tracking app for Android-powered devices

-- 
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

Re: [android-developers] Re: App breaks for some users after they update from the Market

2010-08-27 Thread Dianne Hackborn
Yes what happens during an update is the app is first force stopped (all
processes killed, alarms unregistered, etc), then then the new version is
installed.

It seems promising that clear data would fix the problem; this is most
likely then an issue you can deal with in your app rather than something
systemic.  The first thing I would look for is any code writing data that
could cause problems if it was killed in the middle of executing.  Databases
should handle this, but you need to deal with it yourself for raw files...
 for example SharedPreferences does this in its commit by writing the
contents into a new file, and then switching from the old file to the new
file once the new one is complete.

On Fri, Aug 27, 2010 at 10:53 AM, TreKing treking...@gmail.com wrote:

 On Fri, Aug 27, 2010 at 10:01 AM, Carl Whalley 
 carl.whal...@googlemail.com wrote:

 Might be throwing in a food-for-thought curveball here but I wonder
 if there's a difference between updating an app that's running and one which
 isn't?


 Might be. It's only a handful of people (well, more than a handful for me)
 but still few in comparison to the total install base, so there's definitely
 something they're doing that's triggering the problem.

 I would think the update process would kill the app if it's running, but
 maybe not.

 Also, got confirmation from the second person that clearing the data solved
 the problem.


 -
 TreKing http://sites.google.com/site/rezmobileapps/treking - Chicago
 transit tracking app for Android-powered devices


  --
 You received this message because you are subscribed to the Google
 Groups Android Developers group.
 To post to this group, send email to android-developers@googlegroups.com
 To unsubscribe from this group, send email to
 android-developers+unsubscr...@googlegroups.comandroid-developers%2bunsubscr...@googlegroups.com
 For more options, visit this group at
 http://groups.google.com/group/android-developers?hl=en




-- 
Dianne Hackborn
Android framework engineer
hack...@android.com

Note: please don't send private questions to me, as I don't have time to
provide private support, and so won't reply to such e-mails.  All such
questions should be posted on public forums, where I and others can see and
answer them.

-- 
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

Re: [android-developers] Re: App breaks for some users after they update from the Market

2010-08-27 Thread TreKing
Thanks for the continued help.

On Fri, Aug 27, 2010 at 2:22 PM, Dianne Hackborn hack...@android.comwrote:

  The first thing I would look for is any code writing data that could cause
 problems if it was killed in the middle of executing.


That makes sense, but that's also why I'm confused. The main issue I've had,
for which I have nearly 30 reports now in each version of my app in the dev
console, has nothing to do with data access. Unless I'm really missing
something.

I have a base class reference that should be set to the appropriate instance
of a derived class type based on user selection.
These derived type instances come from a manager class, of sorts, that holds
the instances. There is one static instance of this manager class in the app
since it's global, constant data. So it should be initialized, along with
it's internal data it manages, at all times. None of this involves any data
access.

Some pseudocode if it helps:

// In Manager class
public Manager
{
 private MapString, BaseRef refs = null;

 public Manager()
 {
  refs = new TreeMapString, BaseRef();

  // Explicitly add derived instances of BaseRef
  refs.put(Key, new DerivedInstance());

  // add more ...
 }

 public BaseRef get(String key)
 {
  return refs.get(key);
 }
}

//In Static access class
public StaticClass
{
 private static Manager manager = new Manager();

 public static Manager getManager() { return manager; }
}

// Then, finally, in the class where the crash occurs
BaseRef baseRef = StaticClass.getManager().get(userSelection);


Userselection is the value chosen by the user from a list pre-populated by
the Keys in the Manager class to begin with.
So if the user was able to make the selection, the key was there at the
start of the Activity, and in the manager where it originated from.

baseRef, which is obtained from that single manager's list (which is
essentially hard-coded), is later used elsewhere and ends up being null.

There is no file data access involved anywhere in this Activity besides
using SharedPreferences for exactly one option.

Also, now that I've typed this out, this goes against the idea that statics
are the problem since I would have had the null pointer at the point where I
try to access the Manager class. Instead, it appears to be valid but for
some reason its internal data, which is set on construction, is not.

It's worth noting that I've seen this problem to a lesser extent before I
added this manager class stuff, but since adding it last week, the problem
seems to have exploded with a fury. But again, not sure if that's a result
of a larger user-base over two months since last major update.

I think at some point I'll start polling my users to see how many of them
continue to see the issue after updating. Since I've instructed them, in
nice big letters, to try uninstalling first, I expect not to hear any more
complaints for now, but I'd rather fix the problem than band-aid it like
this.

-
TreKing http://sites.google.com/site/rezmobileapps/treking - Chicago
transit tracking app for Android-powered devices

-- 
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

Re: [android-developers] Re: App breaks for some users after they update from the Market

2010-08-27 Thread Tom Gibara
I wasn't able to fully follow your description, but this bit caught me eye:

Userselection is the value chosen by the user from a list pre-populated by
 the Keys in the Manager class to begin with. So if the user was able to make
 the selection, the key was there at the start of the Activity, and in the
 manager where it originated from.


Have the keys changed between releases of the application? Is the selected
key persisted in any way?

Tom.


On 27 August 2010 21:40, TreKing treking...@gmail.com wrote:

 Thanks for the continued help.

 On Fri, Aug 27, 2010 at 2:22 PM, Dianne Hackborn hack...@android.comwrote:

  The first thing I would look for is any code writing data that could
 cause problems if it was killed in the middle of executing.


 That makes sense, but that's also why I'm confused. The main issue I've
 had, for which I have nearly 30 reports now in each version of my app in the
 dev console, has nothing to do with data access. Unless I'm really missing
 something.

 I have a base class reference that should be set to the appropriate
 instance of a derived class type based on user selection.
 These derived type instances come from a manager class, of sorts, that
 holds the instances. There is one static instance of this manager class in
 the app since it's global, constant data. So it should be initialized, along
 with it's internal data it manages, at all times. None of this involves any
 data access.

 Some pseudocode if it helps:

 // In Manager class
 public Manager
 {
  private MapString, BaseRef refs = null;

  public Manager()
  {
   refs = new TreeMapString, BaseRef();

   // Explicitly add derived instances of BaseRef
   refs.put(Key, new DerivedInstance());

   // add more ...
  }

  public BaseRef get(String key)
  {
   return refs.get(key);
  }
 }

 //In Static access class
 public StaticClass
 {
  private static Manager manager = new Manager();

  public static Manager getManager() { return manager; }
 }

 // Then, finally, in the class where the crash occurs
 BaseRef baseRef = StaticClass.getManager().get(userSelection);


 Userselection is the value chosen by the user from a list pre-populated
 by the Keys in the Manager class to begin with.
 So if the user was able to make the selection, the key was there at the
 start of the Activity, and in the manager where it originated from.

 baseRef, which is obtained from that single manager's list (which is
 essentially hard-coded), is later used elsewhere and ends up being null.

 There is no file data access involved anywhere in this Activity besides
 using SharedPreferences for exactly one option.

 Also, now that I've typed this out, this goes against the idea that statics
 are the problem since I would have had the null pointer at the point where I
 try to access the Manager class. Instead, it appears to be valid but for
 some reason its internal data, which is set on construction, is not.

 It's worth noting that I've seen this problem to a lesser extent before I
 added this manager class stuff, but since adding it last week, the problem
 seems to have exploded with a fury. But again, not sure if that's a result
 of a larger user-base over two months since last major update.

 I think at some point I'll start polling my users to see how many of them
 continue to see the issue after updating. Since I've instructed them, in
 nice big letters, to try uninstalling first, I expect not to hear any more
 complaints for now, but I'd rather fix the problem than band-aid it like
 this.


 -
 TreKing http://sites.google.com/site/rezmobileapps/treking - Chicago
 transit tracking app for Android-powered devices

  --
 You received this message because you are subscribed to the Google
 Groups Android Developers group.
 To post to this group, send email to android-developers@googlegroups.com
 To unsubscribe from this group, send email to
 android-developers+unsubscr...@googlegroups.comandroid-developers%2bunsubscr...@googlegroups.com
 For more options, visit this group at
 http://groups.google.com/group/android-developers?hl=en


-- 
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

Re: [android-developers] Re: App breaks for some users after they update from the Market

2010-08-27 Thread TreKing
On Fri, Aug 27, 2010 at 3:53 PM, Tom Gibara tomgib...@gmail.com wrote:

 Have the keys changed between releases of the application? Is the selected
 key persisted in any way?


Nope, they're hard-coded and were introduced in the last update.
So where I have Key is a string literal I use to ID the derived instance.

So it's like:

refs.add(Option1, new Derived1());
refs.add(Option1, new Derived2());

and so on.

Then in a drop down, the user can select Option1 or Option2, each option
being obtained from the hard-coded list.
So yeah, no saving or restoring of the keys. All in the code.

-
TreKing http://sites.google.com/site/rezmobileapps/treking - Chicago
transit tracking app for Android-powered devices

-- 
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

[android-developers] Re: App breaks for some users after they update from the Market

2010-08-26 Thread mot12
 Wonder what I can do to make it up ...
Tell them there's cake.

I have had the same problem with every update myself. In average I get
one or two horrible ratings and about 10 emails with problems which
are always solved by reinstalling. I do not use copyprotection.

The problem with null pointers I can also see with my users.

I don't understand the above comment about statics either.
Uninstalling the app presumably means that app being closed first. The
updated version needs to be started by the user, it doesn't
automatically replace what was in memory before.

Very rarely, I get some interesting reports such as one person who
said that launcher icon was suddenly gone. Instead, he saw some text
there. Reinstalling fixed that.

Martin
mobitobi
Gentle Alarm, Sleep Now

-- 
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en


Re: [android-developers] Re: App breaks for some users after they update from the Market

2010-08-26 Thread TreKing
On Thu, Aug 26, 2010 at 3:31 AM, mot12 martin.hu...@gmail.com wrote:

 The problem with null pointers I can also see with my users.


I now have 19 more reports of the same problem in the Dev Console for the
free version and 16 for the paid version. Same stack trace, same
NullPointerException.


 I don't understand the above comment about statics either.
 Uninstalling the app presumably means that app being closed first. The
 updated version needs to be started by the user, it doesn't
 automatically replace what was in memory before.


Agreed, especially since users report the issue continues after a phone
reboot. Re-install is the only solution.

But it may be related to static data somehow. The null pointer people are
reporting is supposed to be set from a static list of predefined objects and
I just added this new static data in the last release, which probably
explains the surge in problems since last time. It's like the new static
data is being corrupted somehow.

-
TreKing http://sites.google.com/site/rezmobileapps/treking - Chicago
transit tracking app for Android-powered devices

-- 
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

[android-developers] Re: App breaks for some users after they update from the Market

2010-08-26 Thread mot12
If you think this is due to some specific code changes you just made,
you could of course have messed up. But I am sure you checked that.

I wonder what uninstalling does that a simple update doesn't
accomplish. Of course, there's the removal of the database,
preferences, and all that, but that alone doesn't explain the errors
you and I have seen. I will google this a bit and see if I can find
anything out.

-- 
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en


Re: [android-developers] Re: App breaks for some users after they update from the Market

2010-08-26 Thread TreKing
On Thu, Aug 26, 2010 at 8:17 AM, mot12 martin.hu...@gmail.com wrote:

 If you think this is due to some specific code changes you just made, you
 could of course have messed up. But I am sure you checked that.


Oh no, I don't think it's my code that's wrong, otherwise EVERYONE would be
complaining and reinstalling would not help. I just think the changes I made
have exacerbated the underlying problem in the update process.


 I wonder what uninstalling does that a simple update doesn't accomplish.


That's the key question. I wish I knew what the update process did in
detail. Any idea if it's in the Android source? I haven't looked, but I'll
check later when I get a chance (unless someone knows for sure either way
and can save me some time).


 I will google this a bit and see if I can find anything out.


Good luck. I've had no luck so far.

-
TreKing http://sites.google.com/site/rezmobileapps/treking - Chicago
transit tracking app for Android-powered devices

-- 
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

Re: [android-developers] Re: App breaks for some users after they update from the Market

2010-08-26 Thread Dianne Hackborn
Some things to try:

- See if having them clear data first before trying to uninstall solves the
problem.
- For users with apps on SD card support, they could try moving to the SD
card and back.
- Look in the logcat output to see if there are any suspicious messages from
installing (logcat output should be included in bug reports in the dev
console).
- Look for a user with the dev tools installed to get the output of adb
shell dumpsys package.  This will have some information about how your app
is currently installed.

On Thu, Aug 26, 2010 at 6:25 AM, TreKing treking...@gmail.com wrote:

 On Thu, Aug 26, 2010 at 8:17 AM, mot12 martin.hu...@gmail.com wrote:

 If you think this is due to some specific code changes you just made, you
 could of course have messed up. But I am sure you checked that.


 Oh no, I don't think it's my code that's wrong, otherwise EVERYONE would be
 complaining and reinstalling would not help. I just think the changes I made
 have exacerbated the underlying problem in the update process.


 I wonder what uninstalling does that a simple update doesn't accomplish.


 That's the key question. I wish I knew what the update process did in
 detail. Any idea if it's in the Android source? I haven't looked, but I'll
 check later when I get a chance (unless someone knows for sure either way
 and can save me some time).


 I will google this a bit and see if I can find anything out.


 Good luck. I've had no luck so far.


 -
 TreKing http://sites.google.com/site/rezmobileapps/treking - Chicago
 transit tracking app for Android-powered devices

  --
 You received this message because you are subscribed to the Google
 Groups Android Developers group.
 To post to this group, send email to android-developers@googlegroups.com
 To unsubscribe from this group, send email to
 android-developers+unsubscr...@googlegroups.comandroid-developers%2bunsubscr...@googlegroups.com
 For more options, visit this group at
 http://groups.google.com/group/android-developers?hl=en




-- 
Dianne Hackborn
Android framework engineer
hack...@android.com

Note: please don't send private questions to me, as I don't have time to
provide private support, and so won't reply to such e-mails.  All such
questions should be posted on public forums, where I and others can see and
answer them.

-- 
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

Re: [android-developers] Re: App breaks for some users after they update from the Market

2010-08-26 Thread TreKing
On Thu, Aug 26, 2010 at 12:42 PM, Dianne Hackborn hack...@android.comwrote:

 - See if having them clear data first before trying to uninstall solves the
 problem.


I'll have someone try this next time I get an email and report back.


 - For users with apps on SD card support, they could try moving to the SD
 card and back.


I haven't enabled this for my apps and really don't want to. Maybe someone
else can see if this helps?


 - Look in the logcat output to see if there are any suspicious messages
 from installing (logcat output should be included in bug reports in the dev
 console).


I've never gotten logcat output in the dev console. I don't know if the
users can opt not to send it, or if I'm just seeing it, or if it's just not
available.

Any idea if this is an option for users to send or where in the console it's
supposed to show up?


 - Look for a user with the dev tools installed to get the output of adb
 shell dumpsys package.  This will have some information about how your app
 is currently installed.


Now that will be tricky ...


Thanks for all suggestions!

-
TreKing http://sites.google.com/site/rezmobileapps/treking - Chicago
transit tracking app for Android-powered devices

-- 
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

[android-developers] Re: App breaks for some users after they update from the Market

2010-08-26 Thread Doug
I don't have anything helpful to add, TreKing, but I did want you to
know that a small minority of my users see random breakage on update
and a reinstall fixes them right up.

Needless to say, this is unnecessarily frustrating and time-consuming.

Perhaps unrelated, I've also seen quite a few complaints from people
who got OTA Android 2.2 updates.  In those cases, sometimes an
uninstall/reinstall works, but at least one person I corresponded with
had so many problems with their 2.2 update that she had to take her
phone back to Verizon and get a replacement.

It's really hard to have to repeatedly say to people I swear it's not
my app -- it's your phone.  Trust me.

Doug

-- 
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en


Re: [android-developers] Re: App breaks for some users after they update from the Market

2010-08-26 Thread TreKing
On Thu, Aug 26, 2010 at 1:56 PM, Doug beafd...@gmail.com wrote:

 I don't have anything helpful to add, TreKing, but I did want you to know
 that a small minority of my users see random breakage on update and a
 reinstall fixes them right up.


Just knowing others are having the same issue is helpful. With
enough anecdotes we can begin to pinpoint commonalities and
hopefully unearth the root cause of the problem. If anyone else has had this
issue, please share any details you may have.
Thanks.

-
TreKing http://sites.google.com/site/rezmobileapps/treking - Chicago
transit tracking app for Android-powered devices

-- 
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

Re: [android-developers] Re: App breaks for some users after they update from the Market

2010-08-26 Thread Dianne Hackborn
On Thu, Aug 26, 2010 at 11:18 AM, TreKing treking...@gmail.com wrote:

  - Look in the logcat output to see if there are any suspicious messages
 from installing (logcat output should be included in bug reports in the dev
 console).


 I've never gotten logcat output in the dev console. I don't know if the
 users can opt not to send it, or if I'm just seeing it, or if it's just not
 available.
 Any idea if this is an option for users to send or where in the console
 it's supposed to show up?


Ah, you are right, I didn't realize it wasn't available in the console
though it is part of the data the user uploads.  I suspect this is for
privacy reasons (we have seen lots of apps printing stuff to the log that
they shouldn't), though don't know for sure.  If it isn't there in the
console, I don't think there is a way to get to it.


 - Look for a user with the dev tools installed to get the output of adb
 shell dumpsys package.  This will have some information about how your app
 is currently installed.

 Now that will be tricky ...


Yeah. :/

-- 
Dianne Hackborn
Android framework engineer
hack...@android.com

Note: please don't send private questions to me, as I don't have time to
provide private support, and so won't reply to such e-mails.  All such
questions should be posted on public forums, where I and others can see and
answer them.

-- 
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

[android-developers] Re: App breaks for some users after they update from the Market

2010-08-26 Thread William Ferguson
Since it continues to occur after reboot it means there is a problem
with the the way the class files have been unpacked to disk.

When an apk is installed and that app already exists, a temp folder
for the new instal is created, z and presumably the old instal is
removed later.

It sounds like in some cases the new instal is being overlaid on the
existing app. Perhaps davlik segments static initialzers into separate
files and that's why you're seeing these symptoms.

On Aug 26, 10:59 pm, TreKing treking...@gmail.com wrote:
 On Thu, Aug 26, 2010 at 3:31 AM, mot12 martin.hu...@gmail.com wrote:
  The problem with null pointers I can also see with my users.

 I now have 19 more reports of the same problem in the Dev Console for the
 free version and 16 for the paid version. Same stack trace, same
 NullPointerException.

  I don't understand the above comment about statics either.
  Uninstalling the app presumably means that app being closed first. The
  updated version needs to be started by the user, it doesn't
  automatically replace what was in memory before.

 Agreed, especially since users report the issue continues after a phone
 reboot. Re-install is the only solution.

 But it may be related to static data somehow. The null pointer people are
 reporting is supposed to be set from a static list of predefined objects and
 I just added this new static data in the last release, which probably
 explains the surge in problems since last time. It's like the new static
 data is being corrupted somehow.

 --- 
 --
 TreKing http://sites.google.com/site/rezmobileapps/treking - Chicago
 transit tracking app for Android-powered devices

-- 
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en


Re: [android-developers] Re: App breaks for some users after they update from the Market

2010-08-26 Thread Dianne Hackborn
Hm the class files aren't really unpacked on disk.  They exist as a single
.dex file in the .apk.  During install, a .odex file is created on disk --
this is the .dex file linked to the current platform code.  When the VM
loads your .apk, if the signature on the .dex inside doesn't match the .odex
on disk it will try to re-create the one on disk...  which will fail in a
very clear way since normal apps doesn't have permission to write to the
directory where they are stored.

On Thu, Aug 26, 2010 at 4:55 PM, William Ferguson william.ferguson.au@
gmail.com wrote:

 Since it continues to occur after reboot it means there is a problem
 with the the way the class files have been unpacked to disk.

 When an apk is installed and that app already exists, a temp folder
 for the new instal is created, z and presumably the old instal is
 removed later.

 It sounds like in some cases the new instal is being overlaid on the
 existing app. Perhaps davlik segments static initialzers into separate
 files and that's why you're seeing these symptoms.

 On Aug 26, 10:59 pm, TreKing treking...@gmail.com wrote:
  On Thu, Aug 26, 2010 at 3:31 AM, mot12 martin.hu...@gmail.com wrote:
   The problem with null pointers I can also see with my users.
 
  I now have 19 more reports of the same problem in the Dev Console for the
  free version and 16 for the paid version. Same stack trace, same
  NullPointerException.
 
   I don't understand the above comment about statics either.
   Uninstalling the app presumably means that app being closed first. The
   updated version needs to be started by the user, it doesn't
   automatically replace what was in memory before.
 
  Agreed, especially since users report the issue continues after a phone
  reboot. Re-install is the only solution.
 
  But it may be related to static data somehow. The null pointer people are
  reporting is supposed to be set from a static list of predefined objects
 and
  I just added this new static data in the last release, which probably
  explains the surge in problems since last time. It's like the new static
  data is being corrupted somehow.
 
 
 ---
 --
  TreKing http://sites.google.com/site/rezmobileapps/treking - Chicago
  transit tracking app for Android-powered devices

 --
 You received this message because you are subscribed to the Google
 Groups Android Developers group.
 To post to this group, send email to android-developers@googlegroups.com
 To unsubscribe from this group, send email to
 android-developers+unsubscr...@googlegroups.comandroid-developers%2bunsubscr...@googlegroups.com
 For more options, visit this group at
 http://groups.google.com/group/android-developers?hl=en




-- 
Dianne Hackborn
Android framework engineer
hack...@android.com

Note: please don't send private questions to me, as I don't have time to
provide private support, and so won't reply to such e-mails.  All such
questions should be posted on public forums, where I and others can see and
answer them.

-- 
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

[android-developers] Re: App breaks for some users after they update from the Market

2010-08-25 Thread Pent
Update clears your statics, so you might expect extra bugs to come
up around that time I guess e.g. if they're not reinitialized
properly.

The classdefnotfound one is obviously not from statics however. I've
had
that one as well, for one of my internal classes, but I can't pin it
to
and update because I'm updating so often at the moment.

Pent

-- 
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en


Re: [android-developers] Re: App breaks for some users after they update from the Market

2010-08-25 Thread TreKing
On Wed, Aug 25, 2010 at 1:48 AM, Pent tas...@dinglisch.net wrote:

 Update clears your statics, so you might expect extra bugs to come up
 around that time I guess e.g. if they're not reinitialized properly.


Could you elaborate on this? I do use statics for storing user data and
looking at some of the reported bugs, it's certainly possible the null
pointers could have been initialized from that static data at some point,
but I don't see how this static data would be uninitialized.

If you're updating, I'd expect the current version of the app to be closed /
shut down and your static data to be wiped, for sure, and re-initialized on
re-opening. Or am I missing something regarding Java statics or the Android
update process?

-
TreKing http://sites.google.com/site/rezmobileapps/treking - Chicago
transit tracking app for Android-powered devices

-- 
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

[android-developers] Re: App breaks for some users after they update from the Market

2010-08-25 Thread Yahel
 java.lang.NoClassDefFoundError: com.google.android.maps.GeoPoint

 That's right - my app, which requires the Google Maps addon and should not
 be allowed to install on devices without it, apparently crashed for someone
 because it could not find a maps library class. What the .. ?

I'm not sure but if you have really few of these, they might just come
from illegal/torrent-style installs ? Someone tried to install the app
on there non-gps device or something ?

Yahel

-- 
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en


[android-developers] Re: App breaks for some users after they update from the Market

2010-08-25 Thread Maps.Huge.Info (Maps API Guru)
I've seen random events like this too. The fix is always the same as
well, uninstall and reinstall. I suspect what's happening is the
download is getting corrupted in some fashion. It would be logical to
assume there is some sort of checking going on to make sure the app
was downloaded correctly which would rule that out. Is that the case?
The numbers are small for me though, perhaps one in 100,000 has this
problem.

-John Coryat

-- 
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en


Re: [android-developers] Re: App breaks for some users after they update from the Market

2010-08-25 Thread TreKing
On Wed, Aug 25, 2010 at 8:55 AM, Yahel kaye...@gmail.com wrote:

 I'm not sure but if you have really few of these, they might just come from
 illegal/torrent-style installs ? Someone tried to install the app on there
 non-gps device or something ?


I thought so, but isn't the installation of an apps supposed to fail if the
required library is not present?

-
TreKing http://sites.google.com/site/rezmobileapps/treking - Chicago
transit tracking app for Android-powered devices

-- 
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

Re: [android-developers] Re: App breaks for some users after they update from the Market

2010-08-25 Thread Justin Giles
I've experienced users having crashing problem after an update.  I'm not
sure if yours is device specific, but I would say almost 99% of the crash
reports after updating are from Motorola Droid users (via email and console
error reporting).  This could mean that a large majority of my user base is
using Droids, but I find it very strange that that seems to be the only
device I get complaints like this from.  Most of the crashing is due to
sqlite databases that get corrupted after an update.  I do have error
checking code to check for such things, but when I think I have it fixed, it
crops up again on the next updates.  Very frustrating.


On Wed, Aug 25, 2010 at 9:00 AM, TreKing treking...@gmail.com wrote:

 On Wed, Aug 25, 2010 at 8:55 AM, Yahel kaye...@gmail.com wrote:

 I'm not sure but if you have really few of these, they might just
 come from illegal/torrent-style installs ? Someone tried to install the
 app on there non-gps device or something ?


 I thought so, but isn't the installation of an apps supposed to fail if the
 required library is not present?


 -
 TreKing http://sites.google.com/site/rezmobileapps/treking - Chicago
 transit tracking app for Android-powered devices

  --
 You received this message because you are subscribed to the Google
 Groups Android Developers group.
 To post to this group, send email to android-developers@googlegroups.com
 To unsubscribe from this group, send email to
 android-developers+unsubscr...@googlegroups.comandroid-developers%2bunsubscr...@googlegroups.com
 For more options, visit this group at
 http://groups.google.com/group/android-developers?hl=en


-- 
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

Re: [android-developers] Re: App breaks for some users after they update from the Market

2010-08-25 Thread TreKing
On Wed, Aug 25, 2010 at 9:42 AM, Justin Giles jtgi...@gmail.com wrote:

 I'm not sure if yours is device specific, but I would say almost 99% of the
 crash reports after updating are from Motorola Droid users (via email and
 console error reporting).


Most of the console reports are indeed Droids, though that's probably due to
the popularity of that device and the fact that it's one of the few that has
the report issue capability (I think).


   Very frustrating.


Indeed.

-
TreKing http://sites.google.com/site/rezmobileapps/treking - Chicago
transit tracking app for Android-powered devices

-- 
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

[android-developers] Re: App breaks for some users after they update from the Market

2010-08-25 Thread Yahel
 I thought so, but isn't the installation of an apps supposed to fail if the
 required library is not present?

Maybe not if it is not install through the market but directly
launched using a file manager after the where-ever-it-came-from
download.

Yahel

-- 
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en


[android-developers] Re: App breaks for some users after they update from the Market

2010-08-25 Thread Yahel
I've just noticed after reading your post : Go check out the app
called guitar solo.

The developper clearly would have put his warning in bold/red/blinking
if he it was doable :)

Try to ask him what is experience is.

Good luck.

Yahel

-- 
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en


Re: [android-developers] Re: App breaks for some users after they update from the Market

2010-08-25 Thread TreKing
On Wed, Aug 25, 2010 at 10:06 AM, Yahel kaye...@gmail.com wrote:

 Maybe not if it is not install through the market but directly launched
 using a file manager after the where-ever-it-came-from download.


Could be wrong, but don't think the installer matters. For example, if you
make an AVD with no maps and try to install, you get the missing shared
library error.

On Wed, Aug 25, 2010 at 10:10 AM, Yahel kaye...@gmail.com wrote:

 I've just noticed after reading your post : Go check out the app
 called guitar solo.

 Try to ask him what is experience is.


Nice find. I'll email him / her / them and see if they want to chime in to
the discussion, thanks!

-
TreKing http://sites.google.com/site/rezmobileapps/treking - Chicago
transit tracking app for Android-powered devices

-- 
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

[android-developers] Re: App breaks for some users after they update from the Market

2010-08-25 Thread Pent
 If you're updating, I'd expect the current version of the app to be closed /
 shut down and your static data to be wiped, for sure, and re-initialized on
 re-opening.

Yes, e.g. if function (a) relies on statics (s), so you only
initialize (s) if (a)
is being used (set by prefs). Later you add function (b) which also
uses (s).
When the pref controlling (a) is disabled, everything works fine until
the next statics
reset when (b) starts crashing.

Pent

-- 
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en


Re: [android-developers] Re: App breaks for some users after they update from the Market

2010-08-25 Thread TreKing
On Wed, Aug 25, 2010 at 1:37 PM, Pent tas...@dinglisch.net wrote:

 Yes, e.g. if function (a) relies on statics (s), so you only
 initialize (s) if (a)
 is being used (set by prefs). Later you add function (b) which also
 uses (s).
 When the pref controlling (a) is disabled, everything works fine until
 the next statics
 reset when (b) starts crashing.


I'm sorry, but I didn't follow any of that ...

-
TreKing http://sites.google.com/site/rezmobileapps/treking - Chicago
transit tracking app for Android-powered devices

-- 
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

[android-developers] Re: App breaks for some users after they update from the Market

2010-08-25 Thread Nyll
As far as I know, this is related to copy protection and a bug in
devices running Android 1.5.

If you published your app with copy protection enabled, and
subsequently disable it in some future update, you will likely
experience this problem.  Users who have Android 1.5 devices and had
your app installed before the update where copy protection was removed
will likely have it crash after they update to the unprotected app.
Something in the update process breaks the app, I expect references,
or ID addresses or something along those lines.  This would result in
undefined behaviour in your app, most likely a crash on startup, but
if you get lucky and the app runs, it will almost certainly crash
somewhere else, seemingly at random.

However, if a 1.5 user uninstalls and reinstalls, the update process
is skipped and a fresh copy is installed, without broken references.
1.5 users who install your app for the first time would not have
problems either.  As far as I am aware, this bug has been fixed in
Android 1.6 and later, which explains why only a smaller subset of
your users experience the problem.

I expect this issue might crop up more now that Google released their
new licensing scheme, and devs start switching over to that and
disable copy protection.

(As an aside, it is probably not wise to cheese of the Google devs on
a forum where you are asking for their help :)

On Aug 25, 12:40 am, TreKing treking...@gmail.com wrote:
 I'm curious to see how many of you are seeing this issue. I've looked
 through the group, on b.andriod.com and the Market Help Forum and not
 found anything related.

 I released an update to my app over the weekend and have since fielded a ton
 of emails that ultimately result in the same conclusion - the update process
 breaks the app for a small set of users. When I instruct them to uninstall
 and reinstall the app, everything works perfectly as expected. This has been
 the case EVERY SINGLE TIME (just got two more confirmations that this fixed
 their problems as I was writing this).

 The symptoms are generally the same: random force closes either on start up
 or in other areas of the app after the user updates the app from the Market.
  One time the issue was that the app would apparently no longer connect to
 the internet, again fixed by uninstall-reinstall. This seems to
 predominantly effect the paid version of the app, though it happens to the
 free one as well.

 Some people have sent reports to the Dev Console but some don't make sense
 (like a NullPointer for something I'm fairly positive is always set) and
 this one that seems impossible:

 java.lang.NoClassDefFoundError: com.google.android.maps.GeoPoint

 That's right - my app, which requires the Google Maps addon and should not
 be allowed to install on devices without it, apparently crashed for someone
 because it could not find a maps library class. What the .. ?

 This is not the first time this has happened - it always occurs to a few
 people after each update. In fact I've been showing a dialog on update that
 specifically tells users to try to reinstall if they're having issues for
 this reason, so the problem is probably more widespread but I'm not hearing
 about it.  But this time it's gotten fairly ridiculous. This might be a
 symptom of a larger user base since the last update was over two months ago,
 or it's an indication the problem is getting worse, I'm not sure.

 The fact that an uninstall-reinstall always fixes the problem is a pretty
 clear indication that there's a problem with the update process. Something
 along the lines is apparently botching the APK somehow.

 So are other people experiencing the same problem? Given the number of new
 update force closes comments I see on other apps, I'm assuming I'm not
 alone here.

 Any one know if this is an issue with the Android system itself or the
 offense to software engineering known as the Android Market that's at fault?
 I wouldn't be surprised if it's the Market since I redeploy (update) the
 app constantly while developing and never run into this kind of issue - it's
 only users updating from the Market that have a problem.

 Any ideas on what is going wrong and / or what to do to fix or otherwise
 work around this issue?

 I've been fortunate so far that this has only resulted in one 1-Star New
 update sucks, force closes comment in each version (I've been training my
 users that's not a good way to get help) but am now cringing at the thought
 of having to deal with this at an increasing scale each and every time I
 update (which is about once a month, usually).

 There has to be something I can do about this. Thoughts?

 --- 
 --
 TreKing http://sites.google.com/site/rezmobileapps/treking - Chicago
 transit tracking app for Android-powered devices

-- 
You received this message because you are subscribed to the Google
Groups Android Developers group.
To 

Re: [android-developers] Re: App breaks for some users after they update from the Market

2010-08-25 Thread TreKing
On Wed, Aug 25, 2010 at 3:56 PM, Nyll codingcave...@gmail.com wrote:

 As far as I know, this is related to copy protection and a bug in devices
 running Android 1.5.


Hey, thanks for the info. Unfortunately, I don't think it's my problem.

I've never used copy protection and have gotten reports from multiple
devices, primarily Droids which are definitely not 1.5.

Meanwhile I've gotten three more bug reports through my site (Two
Incredibles and a MyTouch) and one comment on the Market from a Hero user.

This is going to be a long week ...


 (As an aside, it is probably not wise to cheese of the Google devs on a
 forum where you are asking for their help :)


Yeah, lesson learned =P Wonder what I can do to make it up ...

-
TreKing http://sites.google.com/site/rezmobileapps/treking - Chicago
transit tracking app for Android-powered devices

-- 
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en