Titanium JIRA Archive
Titanium SDK/CLI (TIMOB)

[TIMOB-3910] Android: App with Tabs that is pushed to Android 2.1 Emulator "first launch" will crash

GitHub Issuen/a
TypeBug
PriorityCritical
StatusClosed
ResolutionFixed
Resolution Date2011-05-14T12:30:39.000+0000
Affected Version/sRelease 1.7.0
Fix Version/sRelease 1.7.0, Sprint 2011-18
ComponentsAndroid
Labelsn/a
ReporterBill Dawson
AssigneeBill Dawson
Created2011-05-05T15:58:53.000+0000
Updated2011-05-14T12:30:39.000+0000

Description

Reproduce:

Make sure all emulators are closed.

Open Ti Studio or Ti Developer. If Ti Studio, set your default Android emulator to a 2.1 emulator.

Create a new project.

Launch the project to a 2.1 emulator.

Result:

The emulator is launched (of course), but when the app is installed and then starts, it crashes:

E/TiUncaughtHandler(  240): java.lang.NullPointerException
E/TiUncaughtHandler(  240): 	at android.widget.TabWidget.onFocusChange(TabWidget.java:351)
E/TiUncaughtHandler(  240): 	at android.view.View.onFocusChanged(View.java:2622)
E/TiUncaughtHandler(  240): 	at android.view.View.handleFocusGainInternal(View.java:2445)
E/TiUncaughtHandler(  240): 	at android.view.ViewGroup.handleFocusGainInternal(ViewGroup.java:404)
E/TiUncaughtHandler(  240): 	at android.view.View.requestFocus(View.java:3562)
E/TiUncaughtHandler(  240): 	at android.view.ViewGroup.requestFocus(ViewGroup.java:976)
E/TiUncaughtHandler(  240): 	at android.view.ViewGroup.onRequestFocusInDescendants(ViewGroup.java:1021)
E/TiUncaughtHandler(  240): 	at android.view.ViewGroup.requestFocus(ViewGroup.java:977)
E/TiUncaughtHandler(  240): 	at android.view.ViewGroup.onRequestFocusInDescendants(ViewGroup.java:1021)
E/TiUncaughtHandler(  240): 	at android.view.ViewGroup.requestFocus(ViewGroup.java:980)
E/TiUncaughtHandler(  240): 	at android.view.ViewGroup.onRequestFocusInDescendants(ViewGroup.java:1021)
E/TiUncaughtHandler(  240): 	at android.view.ViewGroup.requestFocus(ViewGroup.java:977)
E/TiUncaughtHandler(  240): 	at android.view.ViewGroup.onRequestFocusInDescendants(ViewGroup.java:1021)
E/TiUncaughtHandler(  240): 	at android.view.ViewGroup.requestFocus(ViewGroup.java:977)
E/TiUncaughtHandler(  240): 	at android.view.View.requestFocus(View.java:3513)
E/TiUncaughtHandler(  240): 	at android.view.ViewRoot.clearChildFocus(ViewRoot.java:1526)
E/TiUncaughtHandler(  240): 	at android.view.ViewGroup.clearChildFocus(ViewGroup.java:507)
E/TiUncaughtHandler(  240): 	at android.view.ViewGroup.clearChildFocus(ViewGroup.java:507)
E/TiUncaughtHandler(  240): 	at android.view.ViewGroup.clearChildFocus(ViewGroup.java:507)
E/TiUncaughtHandler(  240): 	at android.view.ViewGroup.clearChildFocus(ViewGroup.java:507)
E/TiUncaughtHandler(  240): 	at android.view.ViewGroup.clearChildFocus(ViewGroup.java:507)
E/TiUncaughtHandler(  240): 	at android.view.ViewGroup.removeAllViewsInLayout(ViewGroup.java:2199)
E/TiUncaughtHandler(  240): 	at android.view.ViewGroup.removeAllViews(ViewGroup.java:2145)
E/TiUncaughtHandler(  240): 	at android.widget.TabHost.clearAllTabs(TabHost.java:222)
E/TiUncaughtHandler(  240): 	at ti.modules.titanium.ui.widget.TiUITabGroup.<init>(TiUITabGroup.java:43)
E/TiUncaughtHandler(  240): 	at ti.modules.titanium.ui.TabGroupProxy.handleMessage(TabGroupProxy.java:81)
After choosing to force close the app, it works fine on relaunch.

Expected Result

Emulator launches, and app launches into it without crashing.

Comments

  1. Bill Dawson 2011-05-05

    cf http://code.google.com/p/android/issues/detail?id=2772
  2. Don Thorp 2011-05-14

    No crash.

JSON Source