Strange 2 NullPointerException on onCreate of android activity
===

Please help, I have dig into the onSaveInstanceState things and onConfigChange things, but can't get the picture.

The exception was not happened in my published app via Google Play, but I can not reproduce it in my develop environment. After tracking, I found the code below have these 2 issues:

Issue 1:

(a). Code in PreviewActivity's onCreate method:

public void onCreate(Bundle savedInstanceState) {

...

mBtnCheckGuess = (Button)findViewById(R.id.btn_check_guess);  
mVgGuessPanel = (View)findViewById(R.id.layout_guess); // the exception line!

...

}

(b). Code in layout xml (only part of it)

    <ScrollView 
        android:gravity="center_horizontal" 
        android:orientation="vertical" 
        android:id="@+id/main_layout" 
        android:layout_width="fill_parent" android:layout_height="fill_parent" 
        android:layout_marginTop="25.0dip" android:layout_marginBottom="10.0dip">
        <LinearLayout 
            android:orientation="vertical" 
            android:layout_width="fill_parent" android:layout_height="wrap_content">		    
            <RelativeLayout
                android:id="@+id/layout_guess"
                android:layout_gravity="center_horizontal" 
                android:layout_width="fill_parent" android:layout_height="wrap_content" 
                android:layout_marginTop="0.0dip" android:layout_marginBottom="0.0dip" 
                android:visibility="visible">


I am totally sure that's no other @id/layout_guess in this layout xml file.

(c). Code in AndroidManifest.xml

    	<activity
            android:name=".PreviewActivity" 
            android:configChanges="keyboard|keyboardHidden|orientation|screenLayout|uiMode|screenSize|smallestScreenSize"
            android:screenOrientation="portrait">
        </activity>

I have got dozens NullPointerException for this issue, but after I removed this line in AndroidManifest:

    android:configChanges="keyboard|keyboardHidden|orientation|screenLayout|uiMode|screenSize|smallestScreenSize"

I have not got the same issue for the new release version app for these 2 days. I totally don't know why...

Issue 2:
Background, I want to pass a object from Activity A to Activity B when A starts B, I used Android's Application object to contain this object in its instance variable.
(a)Code for MyApplication:

    public class MyApplication extends Application{
	Logo mSelectedLogo;
	
	@Override
	public void onCreate(){
	}
		
	public void setSelectedLogo(Logo logo){
		mSelectedLogo = logo;
	}
	public Logo getSelectedLogo(){
		return this.mSelectedLogo;
	}
}

(b) part code of Activity A

    mApplication.setSelectedLogo(logo);
    			Intent intent = new Intent(this, ActivityB.class);
    			LogoListActivity.this.startActivityForResult(intent, REQUEST_GUESS);

(c) code of Activity B

    public void onCreate(Bundle savedInstanceState) {
	...
	mSelectedLogo = mApplication.getSelectedLogo();
	ALog.d(TAG, "correct logo name: " + mSelectedLogo.mName + ", id: " + mSelectedLogo.mId); // NullPointerException line, obviously mApplication.getSelectedLogo() returns NULL
	...
}

It's really strange why it will be NULL. Unless the MyApplication object has been destroyed.

Please help, thank you!