Re: [android-developers] debugging crashes on some systems ( not all )

2012-11-21 Thread Francisco Marzoa

On 11/21/2012 03:20 PM, Piren wrote:
Indeed, one of android's strong advantages (to the consumer) is also a 
big disadvantage (to the developer).
That's exactly what I write down in my Google+ profile this weekend, so 
I fuuullyy gre with that. ;-)
I was faced with similar heap issues, did the same thing as you did, 
mostly came to the conclusion that the best thing is just to drop the 
bitmaps altogether or reduce their resolutions as much as possible.
You should watch out with Recycling manually as this might cause 
issues in some instances (like when the bitmap is used in a listview), 
i found that just nulling the drawable Callback and making the bitmap 
Purgable was sufficient for GC to work correctly and avoid OutOfMemory 
exceptions.
I did it manually to reduce heap consumption peaks. You know: sometimes 
I need to load different bitmaps for a given screen, but even when the 
object of the previous screen has been already dereferenced, the bitmaps 
it uses has not yet been collected, so by a second I will have bitmaps 
for both screens on the memory. I have noticed that if I recycle the 
bitmaps of the first screen before switching, when I load those needed 
for the second screen the old ones have yet been recycled, thus my heap 
use peak is a lot of lower.


Of course you should be careful on not using recycled bitmaps and things 
like that, but my code is pretty clear and I am not experiencing this 
kind of crashes at all, so there is no point worrying about... we have 
enough to be concerned with actual bugs to think about potential ones... ;-)
When it comes to testing, you can always just use your more 
knowledgeable customers as QA.
I have no doubt that if you develop apps like developers tools or so 
this could be very useful, but I do casual games and most of my users 
does not even fill crash reports, and the few ones whose do put things 
so descriptive as "it is not working", and others simply comply on 
comments rating the game with one star and swearing about my mum or so...
Start a beta program with a bunch of users (or friends :) ) that will 
test your app in advance.
That's a great idea that I have had in mind before, but discarded due as 
typical nerd I have not many friends... X-D


But perhaps I could think about any incentive. I will have it in account...
You'll be able to reach a wider variety of devices and catch those big 
issues early on before releasing the app to the public.


Emulators by the way, wont do the job as they dont emulate the 
different hardware specifications of each device.
Well, it is true that they have great limitations, not only for not 
having the hardware, also because some manufactures make their own 
customized Android versions. But they are still useful for testing and 
detecting obvious bugs.


Hope there were a "renting mobile" service on my town or something 
similar...


Best regards,

--
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] debugging crashes on some systems ( not all )

2012-11-21 Thread Piren
Indeed, one of android's strong advantages (to the consumer) is also a big 
disadvantage (to the developer).
I was faced with similar heap issues, did the same thing as you did, mostly 
came to the conclusion that the best thing is just to drop the bitmaps 
altogether or reduce their resolutions as much as possible. 
You should watch out with Recycling manually as this might cause issues in 
some instances (like when the bitmap is used in a listview), i found that 
just nulling the drawable Callback and making the bitmap Purgable was 
sufficient for GC to work correctly and avoid OutOfMemory exceptions.

When it comes to testing, you can always just use your more knowledgeable 
customers as QA. Start a beta program with a bunch of users (or friends :) 
) that will test your app in advance.  You'll be able to reach a wider 
variety of devices and catch those big issues early on before releasing the 
app to the public.

Emulators by the way, wont do the job as they dont emulate the different 
hardware specifications of each device. 




On Wednesday, November 21, 2012 3:23:06 PM UTC+2, Fran wrote:
>
> Hi,
>
> This is one of the worst things of Android development ever. I am facing 
> similar problems, also most of them with SGSIII, getting OOM crashes with 
> no apparent reason. I have run the app in several different actual devices, 
> also different emulator instances, one of them trying to fit as closed as 
> possible the SGSIII settings. I have reduced heap consumption to the 
> minimal, but I am still getting these annoying errors.
>
> Now I am considering to buy an SGSIII actual device to test it, but this 
> is not an option in most of the cases, and it is not clear if this will 
> solve this problem -may be only some SGSIII are affected, and the one I 
> bought is not one of them-.
>
> I released a new version of my app last Friday with disastrous results due 
> to this problem -thousands of uninstalls-. I have did my best since them 
> improving a lot memory use, writting code for actively recycle bitmaps when 
> they are not needed and thinks like that, with excellent results (in an 
> emulator instance with same resolution, density and VM heap budget than 
> SGS3, I got now a 40% less of peak memory consumption than before). And it 
> is really frustrating to see that crashes continues after all that effort.
>
> We need "something" to fight these problems.
>
> Bests,
>
>
> 2012/11/21 Mike Adams >
>
>> Hi,
>>
>> I have a kind of chat and game client, it connects to a board game server 
>> and is a tabbed android app.  There is a telnet thread and it feeds 
>> through concurrently linked queues 3 worker threads that update a game 
>> board, a text console and i have a lists tab.
>>
>> The problem is i've had 2 users now complain that the program has crashed 
>> on them, one said it froze his phone. I can't be clear if the program 
>> crashed or if its something with their phones, one was a samsung s3 i think 
>> the other some kind of acer tablet if i recall.  But how would i evaluate 
>> this? It's never crashed for me on my tablet or phone.  What kind of things 
>> could cause a crash like this but only intermittent or on certain devices 
>> which could have to do with the resources available on the devices and mix 
>> of what is happening on that device. One user says he always hard stops it 
>> before running it but it still crashed on him which kind of dismisses its a 
>> state issue with it being up to long.
>>  
>> Mike
>>
>>  -- 
>> You received this message because you are subscribed to the Google
>> Groups "Android Developers" group.
>> To post to this group, send email to 
>> android-d...@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
>
>
>

-- 
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] debugging crashes on some systems ( not all )

2012-11-21 Thread Francisco Marzoa
Hi,

This is one of the worst things of Android development ever. I am facing
similar problems, also most of them with SGSIII, getting OOM crashes with
no apparent reason. I have run the app in several different actual devices,
also different emulator instances, one of them trying to fit as closed as
possible the SGSIII settings. I have reduced heap consumption to the
minimal, but I am still getting these annoying errors.

Now I am considering to buy an SGSIII actual device to test it, but this is
not an option in most of the cases, and it is not clear if this will solve
this problem -may be only some SGSIII are affected, and the one I bought is
not one of them-.

I released a new version of my app last Friday with disastrous results due
to this problem -thousands of uninstalls-. I have did my best since them
improving a lot memory use, writting code for actively recycle bitmaps when
they are not needed and thinks like that, with excellent results (in an
emulator instance with same resolution, density and VM heap budget than
SGS3, I got now a 40% less of peak memory consumption than before). And it
is really frustrating to see that crashes continues after all that effort.

We need "something" to fight these problems.

Bests,


2012/11/21 Mike Adams 

> Hi,
>
> I have a kind of chat and game client, it connects to a board game server
> and is a tabbed android app.  There is a telnet thread and it feeds
> through concurrently linked queues 3 worker threads that update a game
> board, a text console and i have a lists tab.
>
> The problem is i've had 2 users now complain that the program has crashed
> on them, one said it froze his phone. I can't be clear if the program
> crashed or if its something with their phones, one was a samsung s3 i think
> the other some kind of acer tablet if i recall.  But how would i evaluate
> this? It's never crashed for me on my tablet or phone.  What kind of things
> could cause a crash like this but only intermittent or on certain devices
> which could have to do with the resources available on the devices and mix
> of what is happening on that device. One user says he always hard stops it
> before running it but it still crashed on him which kind of dismisses its a
> state issue with it being up to long.
>
> Mike
>
>  --
> 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

-- 
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] debugging crashes on some systems ( not all )

2012-11-20 Thread Mike Adams
Hi,

I have a kind of chat and game client, it connects to a board game server
and is a tabbed android app.  There is a telnet thread and it feeds
through concurrently linked queues 3 worker threads that update a game
board, a text console and i have a lists tab.

The problem is i've had 2 users now complain that the program has crashed
on them, one said it froze his phone. I can't be clear if the program
crashed or if its something with their phones, one was a samsung s3 i think
the other some kind of acer tablet if i recall.  But how would i evaluate
this? It's never crashed for me on my tablet or phone.  What kind of things
could cause a crash like this but only intermittent or on certain devices
which could have to do with the resources available on the devices and mix
of what is happening on that device. One user says he always hard stops it
before running it but it still crashed on him which kind of dismisses its a
state issue with it being up to long.

Mike

-- 
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