Android :: How To Debug An Application That Hangs After Awhile
Oct 22, 2010
I've built my first Android application and it works pretty well, except that it hangs/freezes up when it's left running for several hours.
It doesn't always do this - it's inconsistent.
This is an awful question to ask, it's so broad, but how should I go about troubleshooting this problem?
My guess is that I'm not managing my exceptions well and something's happening that I'm not dealing with effectively.
Is there a good resource of information on testing and debugging Android/Java applications like a Web site or a book?
I'm just looking for someone to shove me in the right direction.
View 4 Replies
Sep 24, 2010
I have an Android project that I have been working on and debugging just fine for several months, but for some reason it is now consistently hanging at the "Runnning tests..." step. I have experienced intermittent hangs from the beginning, but a simple retry and/or restart of Eclipse or the emulator usually resolves it. But now I am just dead in the water.I can run my tests fine, and I can debug my actual program, but I can't debug my tests.I have tried creating a new emulator and that doesn't fix it. I also cleared all my breakpoints and that had no effect.As far as what has changed lately, the primary thing is that I upgraded to rev 7 of the SDK tools. Also, I recently did some debugging (of the program not the tests) on an actual device (not the emulator). Can't see how that would impact it but I thought I would mention it.Actually I had to set Debuggable to "true" in the app manifest to get device debugging to work. Although I have never had that set in my test project, I set it, and that also had no effect on the issue.I'm running out of ideas, and I would greatly appreciate some pointers.
View 1 Replies
View Related
Jun 10, 2010
below is the code of a sign up form, when we CLICK second time to submit the entered details, the application collapses and hags just displaying the dialog_thread....On executing very first time it rum perfectly. The code of dialog_thread is given after onClick(). how to get rid of this problem and let the application run smoothly.
public void onClick(View arg0)
{// TODO Auto-generated method stub
alert_dialog ad=new alert_dialog();
try
{
if(arg0==signup)..................
View 1 Replies
View Related
Apr 1, 2012
I was able to instantiate ObjectInputStream but now my program hangs at .readObject() I am making an android app in which I want to transfer file from my server pc to my android phone. The server reads the file , encapsulates it into a bytearray and then writes it as an object of a class to the ObjectOutputStream. Below are the code snippets from the andriod appication client side.This is the class whose object is to be send
Code:
import java.io.Serializable;
public class FileClass implements Serializable{
public byte file[];
public FileClass(byte file[])[code].....
View 2 Replies
View Related
May 11, 2009
How to debug application using gdb .
View 2 Replies
View Related
Aug 11, 2010
Every once in awhile I'll pull my phone out of sleep and the 3G icon won't be there. I know that the 3G isn't active because I won't receive any emails during that time. It does this seemingly randomly and I can't find a pattern.
View 16 Replies
View Related
Nov 9, 2009
I have a user that says my application gives him an error on the Samsung Galaxy (it works fine one the G1). How can I debug this issue? Is there an accurate emulator/simulator? Can someone try it (Bendometer is the app)?
View 2 Replies
View Related
Oct 28, 2010
The desktop application emulator works fine. Settings > Applications > Development > USB debugging is checked. The "USB debugging connected" alert is displayed on the Nexus One when the USB cable is attached but I can't seem to get the debugger to run the code on it. Is there something else I need to do to get the debugger to work on the device?
View 2 Replies
View Related
Apr 10, 2009
I made a mistake and I still had the debug version of my app (from Eclipse) on my phone when I tried to install a signed version. The install failed, but I could no longer access the debug version in Manage Applications to un install it. I was at work and couldn't reinstall the debug version in order to uni nstall, so I did a complete factory reset of my phone (using My Backup Pro to backup stuff). Now I can install my app. However, now I notice upon reboot that my app loses all of its data from shared preferences. I'm not entirely sure that it's not a problem of mine somehow, but does anyone know why it is doing that and how I can fix it? I may have left the debug gable. true on in the version I'm trying to test. Would that cause this problem?
View 3 Replies
View Related
Sep 3, 2009
I'm trying to figure out a way to programmatically determine if my build was built in debug mode vs. release mode. I'd like to hide some items in my settings screen if it's release. When I build my app in Eclipse I'm building by default in Debug mode. However, when I build the app using the command line, I build it in release mode and sign the app using the jarsigner tool.
I've tried using:
PackageInfo appInfo = manager.getPackageInfo("com.adobe.psmobile", PackageManager.GET_SIGNATURES);
to test if
appInfo.signatures[0].toCharsString()
matches my debug signature and that didn't seem to work.
I'm now trying to see if I can introspect the app's KeyStore, to match the default debug alias described here:
http://developer.android.com/guide/publishing/app-signing.html of "androiddebugkey"
but I haven't figured out how to retrieve the app's KeyStore yet.
View 4 Replies
View Related
Nov 15, 2010
my android application runs in debug mode only even if i click the run button of the eclipse or run it by touching on its icon on the device. what will be reason for this?? anybody has any idea about it?
View 1 Replies
View Related
Jul 4, 2009
I can no longer run/debug my application in eclipse, when I attempt to I get the following error in the console:Installation error: INSTALL_PARSE_FAILED_NO_CERTIFICATES.E/PackageParser( 65): Package com.example.foo no certificates at entry assets/community_error.html; ignoring.I have not touched my android config or project configuration, and it was working fine yesterday, i'm running ubuntu/jaunty, i did a kind of security update this morning and i think it might have broken zlib or something.
View 2 Replies
View Related
Nov 15, 2010
I am trying to debug the Home Sample application(To change the theme of home) provided in android sdk. but I am not able to do so. No error is shown but no breakpoints are encountered either.
View 1 Replies
View Related
Jun 19, 2010
Is there any way to log within the application without being in debug mode. When i am in debug mode the application runs too slow.
View 1 Replies
View Related
Mar 9, 2010
What kind of permission/Flag do I have to add to the manifest to debug my application on an actual Android device?
View 1 Replies
View Related
Aug 22, 2010
I am developing an Android application where I get the exception while writing to the database: An exception occurred: android.database.sqlite.SQLiteException
But it doest say anything else. In general I find it very difficult to debug the exceptions.
I am using Eclipse to develop the application. Please help me in solving this issue..
View 2 Replies
View Related
Nov 16, 2010
I have to draw list of 30 articles. I tired using list view but there was some problem as I wanted to user alternate colors like first is white and 2nd is blue where as again 3rd is white and 4th is blue and it goes on..
So I decided to have scrollview and table into it. I set the view using setcontentview which shows loading dialog. then in aysnc task's "doInBackground" method i fetch all articles into the object and then in "onPostExecute" I run a for loop on the object and in each loop i make table row insert article and then insert row into table. and then dismiss loading dialog box.
As i have tabular view in my app and If i remove loading dialog box. While the UI is rendered if someone clicks on other tab. UI is hanged up, After loading all table rows It goes to other tab.
Even after using asynctask why this happens ?
View 10 Replies
View Related
Aug 16, 2010
I try to build an https client for android and i need do get some request of an Servlet but when i use the getInputStream method the applicaion hangs.
There is no error only hanging when i call the method.
CODE:..................
This is only to check the call, but it didtn work.
the subscribe method works, when i comment out the line with the inputstream, the server show me all is correct. I can try the same with the Firefox and it works and i can see the request. i also put the keystore into the TrustManager.
View 2 Replies
View Related
Jun 3, 2010
I'm using a Drioid Eris version 2.1. When I turn on my phone it stays on the starting screen (the androids on skateboards) and won't go to the next one. I think it may have happened after I updated my SD Card Reader app because that's the only thing I can think of that caused this problem, thought it might be something else. How do I fix this?
View 5 Replies
View Related
Oct 3, 2009
I got a problem launching unit tests. I did: * new android project in eclipse, new android test project in eclipse * added one test case, added one test suite * run as-> android junit test hangs on "Launching instrumentation android.test.InstrumentationTestRunner on device emulator-5556".I got eclipse galileo, newest ADT and android 1.6 sdk
View 5 Replies
View Related
Sep 8, 2010
I've been trying to upload an APK file to the Android Market for a few days, and the upload process hangs with the spinning icon just rotating. I've let the upload run overnight and it still hangs.
1) The APK file is 28 MB
2) I've uploaded an APK file to the Android market before and it is now for sale.
Is there a way to find out what the error is?
View 2 Replies
View Related
May 26, 2010
Anyone having problems. I tried in the browser and it hangs as well, so not convinced it is my use of the MediaPlayer, which hangs passing it a 320 kpbs mp3.
http://hellovegetables.com/music/HV692%20Krazy%20Baldhead%20-%20The%2...
Happens in Android 2.1
View 3 Replies
View Related
Feb 10, 2010
I am giving product build in Android 1.6 in Ubuntu using make. First time it is fine. But next time onwards if I try to build it again without cleaning it, the system hangs after some time. Even if I try remove the out folder to clean, the system hangs. So every time a fresh build takes too much time. Did anyone face this issue? I am using 1 GB RAM, 1 GB swap space and 40 GB linux space(65% space is free).
View 5 Replies
View Related
Mar 12, 2009
I am developing a game based on the SurfaceView/LunarLander example in the sample code. I have one activity, with one menu option that is "new game". My activity listens for the menu selection, and once new game is selected, doStart of the Game thread is called. The game starts up after 3-4 seconds, but the menu option sticks around on the screen until the game has started. I think the main thread is waiting on the doStart to do its thing, but since it's creating a new thread, how do I get it to just start the thread and continue its business of hiding the menu option right away, instead of after 3 seconds?
View 6 Replies
View Related
Jan 28, 2010
I run Android SDK and AVD Manager in Vista and have problems installing components. The installer downloads components successfully, but at the end of the installation it hangs for about minute and then asks to disable AV software. If I choose 'No', the installer stops with error message like: "Filed to rename directory '...' to '...' ". Thus, I have to unpack downloaded components and place them to proper folders manually. I have no AV software.
View 1 Replies
View Related
Sep 15, 2010
I try to execute shell commands, this does work as it should. Even the result comes back (as is see on LogCat). The problem ist the last line of the result. Every time a readLine() on the last line occurs (which shouldn't occur, temp should be null), the app hangs forever and doesn't come back from the readLine call. Maybe you find the error. I tried readUTF and standart read(), all the same problem. And yes, the app got su-rights.
try {
Process process = Runtime.getRuntime().exec("su");
DataOutputStream os = new DataOutputStream(process.getOutputStream());
DataInputStream osRes = new DataInputStream(process.getInputStream());
for (String single : commands) { os.writeBytes(single + " ");
os.flush(); String temp = new String();
while( (temp = osRes.readLine()) != null) { Log.v("NITRO", temp);
result2 += temp + " ";
} } os.writeBytes("exit");
os.flush(); process.waitFor();
} catch (IOException e) { Toast.makeText(Main.this, "Error", Toast.LENGTH_LONG);
} catch (InterruptedException e){ Toast.makeText(Main.this, "Error", Toast.LENGTH_LONG);
}
That is the StackTrace where it hangs when I stop debugger when hanging:
OSFileSystem.readImpl(int, byte[], int, int) line: not available [native method]
OSFileSystem.read(int, byte[], int, int) line: 118
ProcessManager$ProcessInputStream(FileInputStream).read(byte[], int, int) line: 312
ProcessManager$ProcessInputStream(FileInputStream).read() line: 250
DataInputStream.readLine() line: 309
Main$2$1.run() line: 84
ViewRoot(Handler).handleCallback(Message) line: 587
ViewRoot(Handler).dispatchMessage(Message) line: 92
Looper.loop() line: 123
ActivityThread.main(String[]) line: 4627
Method.invokeNative(Object, Object[], Class, Class[], Class, int, boolean) line: not available [native method]
Method.invoke(Object, Object...) line: 521
ZygoteInit$MethodAndArgsCaller.run() line: 868
ZygoteInit.main(String[]) line: 626
NativeStart.main(String[]) line: not available [native method]
View 1 Replies
View Related
Jan 7, 2010
All, I've googled over and over again to find a solution and while I found a bug regarding camera release, etc I can not for the life of me seem to get the cam code to work. Every time I executed takePicture the system simply hangs, sometimes it calls the PictureCallback, but most of the time it simply hangs.Weird issues about not being able to read /data/ap_gain.bin files, etc
View 1 Replies
View Related
May 1, 2009
I found that the old bug reported in http://code.google.com/p/android/issues/detail?id=1578 where only a power cycle brings back the camera still persists with the official Cupcake firmware on my ADP. When it happens - and I've encountered it several times in a few days now - no camera application can access the camera. A power cycle is needed to recover from this locked camera state.
View 8 Replies
View Related
Jul 13, 2010
At my desk, my 5th gen Ipod Nano's scan function finds 24 perfectly clear stations. The Evo's scan finds NO stations. If I manually tune the stations found by the ipod on the Evo, I can find 9 out of the 24 with acceptable reception. And, the radio app occasionally hangs up while tuning, and must be restarted before it works again. Do I have a defective unit with respect to FM radio, or are they all like this? (not a big deal, since I didn't even know it had FM when I bought it, and I still have the ipod for this purpose.
View 35 Replies
View Related
Jul 5, 2010
Hello, I recently got a HTC Desire and I've experienced that it often hangs up on the person I'm talking to because my ear touches some button on the display. I've tried turning on the screen lock, and that works sometimes but not always, so I would like to find a permanent solution.
View 1 Replies
View Related