Titanium JIRA Archive
Titanium SDK/CLI (TIMOB)

[TIMOB-10444] Android: child TabGroup of Window crashes on open

GitHub Issuen/a
TypeBug
PriorityHigh
StatusClosed
ResolutionFixed
Resolution Date2013-08-07T20:48:43.000+0000
Affected Version/sRelease 2.0.2, Release 2.1.0, Release 2.1.2
Fix Version/sRelease 3.0.0, Sprint 2012-19 API, 2012 Sprint 19, Release 3.1.2
ComponentsAndroid
Labelsapi, module_tabgroup, qe-and082012, qe-testadded
ReporterDustin Hyde
AssigneePing Wang
Created2012-08-14T13:47:09.000+0000
Updated2013-08-08T10:59:44.000+0000

Description

Adding a child tabGroup to a window will crash app on window.open(). This is not a regression. This does not occur on iOS or MobileWeb. Steps to Reproduce: 1. Run code:
var win = Ti.UI.createWindow();
var tabGroup = Ti.UI.createTabGroup();
win.add(tabGroup);
win.open();
Actual Result: Crash. Expected Result: 1. tabGroup opens, OR 2. an android-specific runtime error is generated and the api documentation is updated, OR 3. a platform-independent runtime error is generated on all platforms, OR 4. the api documentation is updated to note crash 2.1 API Documentation:
Platform Implementation Notes
When using a tab group, note the following differences between platforms.

The tab group controls are positioned at the top of the display on Android and at the bottom on iOS.

On Android, only one tab group may exist at one time. A tab group may be closed to allow a new one to be opened later, but the root of the application must be a heavyweight window to prevent it exiting. Tabs cannot be removed from the tab group once added, and tabs cannot be reordered.

On iOS, more than one tab group may exist, and the may be opened and closed as required. Each tab can contain a stack of windows, and the user can switch between them by tapping the tab's associated control. Tabs can be removed, and the user may (optionally) be allowed to reorder tabs.

On iOS and Mobile Web, it is also possible to add tabs by updating the tabs property, and to switch active tabs by setting the active property on one of the tabs to true. Since these mechanisms are platform-specific, it is recommended that you use addTab and setActiveTab instead.

If you use the iOS/Mobile Web-specific mechanisms, it is possible to add multiple active tabs to a tab group. In this case, the result of which tab is initially selected is undefined.

Attachments

FileDateSize
console.txt2012-08-14T13:47:09.000+000047529

Comments

  1. Dustin Hyde 2012-09-13

    This also applies to child windows of windows on android.
  2. Anshu Mittal 2012-11-20

    Verified with: SDK: 3.0.0.v20121119164700 Studio: 3.0.0.201211131839 A runtime error is thrown instead of crash on app launch.
  3. Priya Agarwal 2013-08-07

    This is Regression. App crashes. No runtime error is thrown. Expected Result:Runtime error is thrown as: "E/TiExceptionHandler(1788): (main) [0,193] - Message: Uncaught Error: Cannot add window/tabGroup to another window/tabGroup." Verified with: Studio: 3.1.2.201308021524 SDK: 3.1.2.v20130806104555 acs:1.0.5 alloy:1.2.0-alpha6 titanium:3.1.2-alpha titanium-code-processor:1.0.2-alpha OS: OSX 10.8.4 Device: nexus 7(v4.3) Xcode:4.6.3
  4. Ping Wang 2013-08-07

    PR: https://github.com/appcelerator/titanium_mobile/pull/4551 3_1_X PR: https://github.com/appcelerator/titanium_mobile/pull/4552
  5. Priya Agarwal 2013-08-08

    Verified with: Studio: 3.1.2.201308071912 SDK: 3.1.2.v20130807171139 acs:1.0.5 alloy:1.2.0-alpha6 titanium:3.1.2-alpha titanium-code-processor:1.0.2-alpha OS: OSX 10.8.4 Device: nexus 7(v4.3) Xcode:4.6.3 Adding child TabGroup on Window now does not crashes app gives runtime error.

JSON Source