Android Activity Silently Exiting
Solution 1:
Without source code, it is hard to tell what is really going on. Try debugging on emulators with different API levels and see if you can reproduce it.
If you can't get it reproduced, I suggest you take a look at ACRA and BugSense. Using those 3rd party crash reporting plugins is super easy and you can even report silent exceptions manually, too.
Solution 2:
Are you using some native code? Because if there is a segment fault, it will print the stacktrace to logcat, but it won't create an Uncought Exception (so in this case plugins like ACRA are useless, even though I can recomment ACRA a lot)
Solution 3:
It does happen to my applications as well, quite often during development-debug and it is usually due to the following problem.
- The GPU goes in an out of memory status since there is too much memory allocated using VBOs. This usually depends on the fact not always the VBOs are deallocated correctly. When it does happen, in my humble experience, is like if the virtual machine hosting your application dies. Ufortunately it is evident that you cannot check the logcat of your users.
The problem is very variable since it depends on the GPU type and on the memory available to the GPU. For instance on my galaxy tab, it happens after (in terms of loaded levels and therefore VBOs) my basic Motorola Defy.
This creates a lot of troubles in the troubleshooting.
:)
Solution 4:
There is only way to rewrite default exception behavior - UncaughtExceptionHandler
. You can create your own class ExceptionHandler implements UncaughtExceptionHandler
and do with exceptions whatever you want - send it to you remote server or smth else. To register it you should create Application
class:
publicclassYourApplicationextendsApplication {
@OverridepublicvoidonCreate() {
super.onCreate();
Thread.setDefaultUncaughtExceptionHandler(newExceptionHandler(this.getApplicationContext()));
}
}
and register this class in your manifest file
<applicationandroid:name="your.package.name.YourApplication"... >
...
</application>
Post a Comment for "Android Activity Silently Exiting"