My application is causing a force close somewhere but instead of getting a FATAL EXCEPTION with the usual (and very informative) stack trace in my LogCat, I only receive onl
this is going to be tedious, but i would single step through until it breaks with the debugger. then you can add a more general catch
catch(Exception e){ }
All exceptions extend from Exception so that may help you further diagnose you're problem.
One more idea, perhaps you're app is running up the device memory. The JVM could be killing you're app without telling you because of a JVM shutdown on memory error.
I know this is old but if anyone else wants to know about exiting as normal after dealing with the uncaught exception:
final Thread.UncaughtExceptionHandler androidDefaultUEH = Thread.getDefaultUncaughtExceptionHandler();
Thread.setDefaultUncaughtExceptionHandler(new Thread.UncaughtExceptionHandler() {
@Override
public void uncaughtException(final Thread thread, final Throwable ex) {
// Handle exception however you want, then:
androidDefaultUEH.uncaughtException(thread, ex);
}
});
You could set a default uncaught exception handler at the beginning of your app and log some data in there (example below is using a java logger but easy to transpose to Android):
private static void setDefaultUncaughtExceptionHandler() {
try {
Thread.setDefaultUncaughtExceptionHandler(new Thread.UncaughtExceptionHandler() {
@Override
public void uncaughtException(Thread t, Throwable e) {
logger.error("Uncaught Exception detected in thread {}", t, e);
}
});
} catch (SecurityException e) {
logger.error("Could not set the Default Uncaught Exception Handler", e);
}
}