First off all, let me introduce myself since this is my first post here.
Even if (as you would have noticed anyway) I am new to Android dev, I have quite a few years of coding behind me, using MS (C++, dotNet, WPF).
Today I've been through all steps of the hello world tutorial from the official site.
Everything worked as described, except that I've choosen a 2.3.3 target platform (the emulator seemed to me faster in that configuration).
My question is about the last part of this tutorial. They fire a NullPointerException to test debugging:
- Code: Select all
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
Object o = null;
o.toString();
setContentView(R.layout.main);
}
We are told to put a breakpoint before the exception is thrown, and eclipse breaks there... OK!
But I wanted to test a "normal life" scenario. In a normal life unhandled exception case, you have at the beginning no breakpoint. Your devenv breaks on unhandled exception, you get some info about that exception (call stack) that helps you putting some breakpoints and understand why the exception is being thrown...
In my case, without any breakpoint, Eclipse breaks (good!), but I have no clue at all about the exception.
First, it breaks in ActivityThread.performLaunchActivity(...) and not in my onCreate(...) code.
I have no source code for ActivityThread.performLaunchActivity(...) -see screenshot-, which seems normal to me.
On the top right of the debug screen, in Eclipse, I have a "Variables" tab. Into it, a "e" variable of type NullPointerException which may be my unhandled exception... But no clue in there: stack trace is null...
Member cause of the exception is also a NullPointerException, for which the cause is a NullPointerException, and so on, seamingly without end...
No info in log cat, no info in error log...
Screenshot:

Could someone tell me if that behaviour from Eclipse is correct or not, and how to get info about the exception?
Thanks in advance...