Force close on different devices?

Put your problem here if it does not fit any of the other categories.

Force close on different devices?

Postby HarryH » Sat Aug 01, 2009 3:30 pm

Hello, I have released a free app on the Android Market but recently it has been getting bad reviews with complaints of the app force closing.

The problem does not occur on my G1 though, nor in the emulator. Also there have only been complaints in the last couple of days (I think since the time the HTC Hero was released her in the UK) which leads me to believe that my app behaves differently on different phones?

Is this true? And if so is there a way for me to test/debug my app without paying for a new android phone everytime one is released?

Any help would be great.

Thankyou,

Harry
HarryH
Junior Developer
Junior Developer
 
Posts: 22
Joined: Sun Mar 29, 2009 6:50 pm

Top

Postby sachendra » Mon Aug 10, 2009 10:16 am

Before reaching at this conclusion you should check your application. Force close of application can also happen bcoz of GC. So I would suggest you to check for exceptions and use of GCs.
sachendra
Junior Developer
Junior Developer
 
Posts: 18
Joined: Wed Mar 18, 2009 12:25 pm
Location: Mumbai

Postby zrgiu » Tue Sep 01, 2009 7:11 pm

same problem here . how can we check use of GC ... it's automatic ?!
zrgiu
Junior Developer
Junior Developer
 
Posts: 10
Joined: Sat Nov 01, 2008 5:54 pm

Postby Emmanuel7 » Wed Sep 02, 2009 1:02 am

I had the same problem with my game "WordProspector".

Lately three people reported the application was very laggy and unresponsive, though I didn't see any trouble neither on the emulator, on my G1 ( dream ) phone.

I asked on another (french) forum, and the game was reported as being fully responsive on every platforms ( Dream, Magic, Hero and Galaxy ).

So the problem is somewhere else.
I suspect some people have so many applications and services that the CPU and the memory are so low my game is suffering...

I don't really have a way to change that !
Emmanuel7
Senior Developer
Senior Developer
 
Posts: 164
Joined: Fri Dec 12, 2008 2:17 am
Location: Paris

Postby talklittle » Mon Sep 14, 2009 1:48 am

Yes, exactly, it seems like we app developers don't really have any control over this. The Dalvik VM is trying its best to accomodate all the apps running on a given device, but it's not perfect.

Lately I've been getting bug reports for my app that seem to be caused by mods like apps2sd and CyanogenMod. Don't get me wrong-- these are amazing pieces of software developed by amazing programmers. But it kinda sucks to have their side effects leak into our apps in the form of force closes, slowness, and lower Market ratings. :)

At least it's the minority of users that are reporting these problematic side effects.
talklittle
Freshman
Freshman
 
Posts: 2
Joined: Mon Sep 14, 2009 1:43 am

Postby sachendra » Tue Oct 06, 2009 2:20 pm

Look guys in Android if you are having very frequent object creation, it kills the application.

I hope you guys know about ANR(Application not responding) message. It comes when application gets hung for more than 5 secs.

You check your code for this thing. And for responsiveness android has given some guidelines in documentation follow them i am sure your problem will be solved.

Cheers
Sachendra Singh Rathore
s.sachendra@live.in
Android aplication developer
sachendra
Junior Developer
Junior Developer
 
Posts: 18
Joined: Wed Mar 18, 2009 12:25 pm
Location: Mumbai

Top

Postby talklittle » Tue Oct 06, 2009 5:30 pm

The main problem I had, that happened on cyanogen (based on Donut 1.6) but not stock Cupcake 1.5, was that every time an Activity was launched, it would call onPrepareDialog for every possible dialog for that Activity. Since my onPrepareDialog methods use some field variables that can be null, I was getting NullPointerExceptions.

To get around it, I had to add null checks "if (var != null)" in onPrepareDialog, and also a loop in onRestoreInstanceState that went through every possible dialog and tried to close it "for d in dialogs { try { dismissDialog(d); } catch (IllegalArgumentException e) {/*do nothing*/} }"
talklittle
Freshman
Freshman
 
Posts: 2
Joined: Mon Sep 14, 2009 1:43 am

Top

Return to Other Coding-Problems

Who is online

Users browsing this forum: Google [Bot] and 15 guests