java.lang.IllegalStateException: Ambiguous Z-Order

Appcelerator JIRA | Mauro Parra-Miranda | 5 years ago
tip
Your exception is missing from the Samebug knowledge base.
Here are the best solutions we found on the Internet.
Click on the to mark the helpful solution and get rewards for you help.
  1. 0

    h4. Problem Description On clicking a label in tableview row on Window1 ,Window2 should open.Window2 has a table and on selecting a row of this table, a label in Window1 is updated by firing an event. I am getting a force close when clicking a row on Window2 or clicking Back button .Attaching the sample for reference. h4. Actual Results App Crashing with this log: {code} [ERROR][TiApplication( 321)] (main) [88,88] Sending event: exception on thread: main msg:java.lang.IllegalStateException: Ambiguous Z-Order; Titanium 2.1.0,2012/04/25 10:00,4257074 [ERROR][TiApplication( 321)] java.lang.IllegalStateException: Ambiguous Z-Order [ERROR][TiApplication( 321)] at org.appcelerator.titanium.view.TiCompositeLayout$1.compare(TiCompositeLayout.java:157) [ERROR][TiApplication( 321)] at org.appcelerator.titanium.view.TiCompositeLayout$1.compare(TiCompositeLayout.java:120) [ERROR][TiApplication( 321)] at java.util.TreeMap.cmp(TreeMap.java:1317) [ERROR][TiApplication( 321)] at java.util.TreeMap.put(TreeMap.java:1464) [ERROR][TiApplication( 321)] at java.util.TreeSet.add(TreeSet.java:111) [ERROR][TiApplication( 321)] at org.appcelerator.titanium.view.TiCompositeLayout.onLayout(TiCompositeLayout.java:465) [ERROR][TiApplication( 321)] at android.view.View.layout(View.java:7035) [ERROR][TiApplication( 321)] at ti.modules.titanium.ui.widget.tableview.TiTableViewRowProxyItem.onLayout(TiTableViewRowProxyItem.java:395) [ERROR][TiApplication( 321)] at android.view.View.layout(View.java:7035) [ERROR][TiApplication( 321)] at android.widget.ListView.setupChild(ListView.java:1815) [ERROR][TiApplication( 321)] at android.widget.ListView.makeAndAddView(ListView.java:1730) [ERROR][TiApplication( 321)] at android.widget.ListView.fillSpecific(ListView.java:1272) [ERROR][TiApplication( 321)] at android.widget.ListView.layoutChildren(ListView.java:1558) [ERROR][TiApplication( 321)] at android.widget.AbsListView.onLayout(AbsListView.java:1147) [ERROR][TiApplication( 321)] at android.view.View.layout(View.java:7035) [ERROR][TiApplication( 321)] at android.widget.FrameLayout.onLayout(FrameLayout.java:333) [ERROR][TiApplication( 321)] at ti.modules.titanium.ui.widget.tableview.TiTableView.onLayout(TiTableView.java:516) [ERROR][TiApplication( 321)] at android.view.View.layout(View.java:7035) [ERROR][TiApplication( 321)] at org.appcelerator.titanium.view.TiCompositeLayout.onLayout(TiCompositeLayout.java:527) [ERROR][TiApplication( 321)] at android.view.View.layout(View.java:7035) [ERROR][TiApplication( 321)] at org.appcelerator.titanium.view.TiCompositeLayout.onLayout(TiCompositeLayout.java:527) [ERROR][TiApplication( 321)] at android.view.View.layout(View.java:7035) [ERROR][TiApplication( 321)] at android.widget.FrameLayout.onLayout(FrameLayout.java:333) [ERROR][TiApplication( 321)] at android.view.View.layout(View.java:7035) [ERROR][TiApplication( 321)] at android.widget.LinearLayout.setChildFrame(LinearLayout.java:1249) [ERROR][TiApplication( 321)] at android.widget.LinearLayout.layoutVertical(LinearLayout.java:1125) [ERROR][TiApplication( 321)] at android.widget.LinearLayout.onLayout(LinearLayout.java:1042) [ERROR][TiApplication( 321)] at android.view.View.layout(View.java:7035) [ERROR][TiApplication( 321)] at android.widget.FrameLayout.onLayout(FrameLayout.java:333) [ERROR][TiApplication( 321)] at android.view.View.layout(View.java:7035) [ERROR][TiApplication( 321)] at android.view.ViewRoot.performTraversals(ViewRoot.java:1045) [ERROR][TiApplication( 321)] at android.view.ViewRoot.handleMessage(ViewRoot.java:1727) [ERROR][TiApplication( 321)] at android.os.Handler.dispatchMessage(Handler.java:99) [ERROR][TiApplication( 321)] at android.os.Looper.loop(Looper.java:123) [ERROR][TiApplication( 321)] at android.app.ActivityThread.main(ActivityThread.java:4627) [ERROR][TiApplication( 321)] at java.lang.reflect.Method.invokeNative(Native Method) [ERROR][TiApplication( 321)] at java.lang.reflect.Method.invoke(Method.java:521) [ERROR][TiApplication( 321)] at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:868) [ERROR][TiApplication( 321)] at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:626) [ERROR][TiApplication( 321)] at dalvik.system.NativeStart.main(Native Method) [ERROR][AndroidRuntime( 321)] FATAL EXCEPTION: main [ERROR][AndroidRuntime( 321)] java.lang.IllegalStateException: Ambiguous Z-Order [ERROR][AndroidRuntime( 321)] at org.appcelerator.titanium.view.TiCompositeLayout$1.compare(TiCompositeLayout.java:157) [ERROR][AndroidRuntime( 321)] at org.appcelerator.titanium.view.TiCompositeLayout$1.compare(TiCompositeLayout.java:120) [ERROR][AndroidRuntime( 321)] at java.util.TreeMap.cmp(TreeMap.java:1317) [ERROR][AndroidRuntime( 321)] at java.util.TreeMap.put(TreeMap.java:1464) [ERROR][AndroidRuntime( 321)] at java.util.TreeSet.add(TreeSet.java:111) [ERROR][AndroidRuntime( 321)] at org.appcelerator.titanium.view.TiCompositeLayout.onLayout(TiCompositeLayout.java:465) [ERROR][AndroidRuntime( 321)] at android.view.View.layout(View.java:7035) [ERROR][AndroidRuntime( 321)] at ti.modules.titanium.ui.widget.tableview.TiTableViewRowProxyItem.onLayout(TiTableViewRowProxyItem.java:395) [ERROR][AndroidRuntime( 321)] at android.view.View.layout(View.java:7035) [ERROR][AndroidRuntime( 321)] at android.widget.ListView.setupChild(ListView.java:1815) [ERROR][AndroidRuntime( 321)] at android.widget.ListView.makeAndAddView(ListView.java:1730) [ERROR][AndroidRuntime( 321)] at android.widget.ListView.fillSpecific(ListView.java:1272) [ERROR][AndroidRuntime( 321)] at android.widget.ListView.layoutChildren(ListView.java:1558) [ERROR][AndroidRuntime( 321)] at android.widget.AbsListView.onLayout(AbsListView.java:1147) [ERROR][AndroidRuntime( 321)] at android.view.View.layout(View.java:7035) [ERROR][AndroidRuntime( 321)] at android.widget.FrameLayout.onLayout(FrameLayout.java:333) [ERROR][AndroidRuntime( 321)] at ti.modules.titanium.ui.widget.tableview.TiTableView.onLayout(TiTableView.java:516) [ERROR][AndroidRuntime( 321)] at android.view.View.layout(View.java:7035) [ERROR][AndroidRuntime( 321)] at org.appcelerator.titanium.view.TiCompositeLayout.onLayout(TiCompositeLayout.java:527) [ERROR][AndroidRuntime( 321)] at android.view.View.layout(View.java:7035) [ERROR][AndroidRuntime( 321)] at org.appcelerator.titanium.view.TiCompositeLayout.onLayout(TiCompositeLayout.java:527) [ERROR][AndroidRuntime( 321)] at android.view.View.layout(View.java:7035) [ERROR][AndroidRuntime( 321)] at android.widget.FrameLayout.onLayout(FrameLayout.java:333) [ERROR][AndroidRuntime( 321)] at android.view.View.layout(View.java:7035) [ERROR][AndroidRuntime( 321)] at android.widget.LinearLayout.setChildFrame(LinearLayout.java:1249) [ERROR][AndroidRuntime( 321)] at android.widget.LinearLayout.layoutVertical(LinearLayout.java:1125) [ERROR][AndroidRuntime( 321)] at android.widget.LinearLayout.onLayout(LinearLayout.java:1042) [ERROR][AndroidRuntime( 321)] at android.view.View.layout(View.java:7035) [ERROR][AndroidRuntime( 321)] at android.widget.FrameLayout.onLayout(FrameLayout.java:333) [ERROR][AndroidRuntime( 321)] at android.view.View.layout(View.java:7035) [ERROR][AndroidRuntime( 321)] at android.view.ViewRoot.performTraversals(ViewRoot.java:1045) [ERROR][AndroidRuntime( 321)] at android.view.ViewRoot.handleMessage(ViewRoot.java:1727) [ERROR][AndroidRuntime( 321)] at android.os.Handler.dispatchMessage(Handler.java:99) [ERROR][AndroidRuntime( 321)] at android.os.Looper.loop(Looper.java:123) [ERROR][AndroidRuntime( 321)] at android.app.ActivityThread.main(ActivityThread.java:4627) [ERROR][AndroidRuntime( 321)] at java.lang.reflect.Method.invokeNative(Native Method) [ERROR][AndroidRuntime( 321)] at java.lang.reflect.Method.invoke(Method.java:521) [ERROR][AndroidRuntime( 321)] at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:868) [ERROR][AndroidRuntime( 321)] at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:626) [ERROR][AndroidRuntime( 321)] at dalvik.system.NativeStart.main(Native Method) [WARN][ActivityManager( 60)] Force finishing activity com.negoapps.zindexfailing/.ZindexfailingActivity [INFO][ARMAssembler( 60)] generated scanline__00000077:03515104_00000000_00000000 [ 33 ipp] (47 ins) at [0x36d630:0x36d6ec] in 5438000 ns [WARN][ActivityManager( 60)] Activity pause timeout for HistoryRecord{44ea2d00 com.negoapps.zindexfailing/.ZindexfailingActivity} [INFO][Process ( 321)] Sending signal. PID: 321 SIG: 9 [INFO][ActivityManager( 60)] Process com.negoapps.zindexfailing (pid 321) has died. [WARN][ActivityManager( 60)] Scheduling restart of crashed service com.negoapps.zindexfailing/org.appcelerator.titanium.analytics.TiAnalyticsService in 5000ms [INFO][WindowManager( 60)] WIN DEATH: Window{45141040 com.negoapps.zindexfailing/com.negoapps.zindexfailing.ZindexfailingActivity paused=false} [INFO][WindowManager( 60)] WIN DEATH: Window{450f34b0 com.negoapps.zindexfailing/org.appcelerator.titanium.TiModalActivity paused=false} [INFO][ActivityManager( 60)] Start proc com.negoapps.zindexfailing for service com.negoapps.zindexfailing/org.appcelerator.titanium.analytics.TiAnalyticsService: pid=335 uid=10044 gids={1015, 3003} [INFO][TiApplication( 335)] (main) [0,0] checkpoint, app created. {code} h4. Expected Results The app closing the window properly h4. Test Case 1. Create new mobile Project 2. Paste this code {code} // this sets the background color of the master UIView (when there are no windows/tab groups on it) Titanium.UI.setBackgroundColor('#000'); var win2 = Titanium.UI.createWindow({ title : 'Tab 2', backgroundColor : '#fff' }); var label4 = Titanium.UI.createLabel({ color : '#999', text : 'I am Date Picker in Win2', font : { fontSize : 20, fontFamily : 'Helvetica Neue' }, textAlign : 'center', width : 'auto' }); win2.add(label4); var ds=[]; var ds1=[]; var row1 = Ti.UI.createTableViewRow(); row1.backgroundColor = 'yellow'; var label2 = Titanium.UI.createLabel({ color : '#999', text : 'I am Row2', font : { fontSize : 20, fontFamily : 'Helvetica Neue' }, textAlign : 'center', width : 'auto' }); var row2 = Ti.UI.createTableViewRow(); row2.add(label2); ds1.push(row2); var table1 = Ti.UI.createTableView({data:ds1,height:100}); row1.add(table1); ds.push(row1) var table = Ti.UI.createTableView({data:ds,height:200,top:20}); win2.add(table); Ti.App.addEventListener('updatePeriod', function(param) { alert('fired') label4.text = param.value; }) label2.addEventListener('click', function(e) { var win = createWindow(); win.open({ modal : true }); }) win2.open(); function createWindow() { var win4 = Ti.UI.createWindow({ backgroundColor : 'black' }); var ds3 = []; var row1 = Ti.UI.createTableViewRow(); row1.selectedMenu='Annual' var row2 = Ti.UI.createTableViewRow(); row2.selectedMenu='Semi' var label1 = Titanium.UI.createLabel({ color : '#999', text : 'Annual', font : { fontSize : 20, fontFamily : 'Helvetica Neue' }, textAlign : 'center', width : 'auto' }); var label2 = Titanium.UI.createLabel({ color : '#999', text : 'Semi', font : { fontSize : 20, fontFamily : 'Helvetica Neue' }, textAlign : 'center', width : 'auto' }); row1.add(label1); row2.add(label2); ds3.push(row1); ds3.push(row2); var table2 = Ti.UI.createTableView({ top : 20, data : ds3, height : 150 }) table2.addEventListener('click', function(e) { var index = e.index, section = e.section, row = e.row, rowdata = e.rowData, colorOff = '#363636', colorOn = '#385487'; /* Open Menu Windows */ setTimeout(function() { for(var i = 0, len = section.rows.length; i < len; i++) { section.rows[i].hasCheck = false; section.rows[i].children[0].color = colorOff; } /* set current check */ section.rows[index].hasCheck = true; e.row.children[0].color = colorOn; if(e.rowData.selectedMenu === 'Annual') { Ti.App.fireEvent('updatePeriod', { value : 'Annual' }); } else if(e.rowData.selectedMenu === 'Semi') { Ti.App.fireEvent('updatePeriod', { value : 'Semi' }); } }, 20); win4.close(); }); win4.add(table2); return win4; } {code} 3. Click on the label saying row 2 4. Click again on the labels in the new window. h4. HD Discussion http://support-admin.appcelerator.com/display/APP-536197

    Appcelerator JIRA | 5 years ago | Mauro Parra-Miranda
    java.lang.IllegalStateException: Ambiguous Z-Order
  2. 0

    h4. Problem Description On clicking a label in tableview row on Window1 ,Window2 should open.Window2 has a table and on selecting a row of this table, a label in Window1 is updated by firing an event. I am getting a force close when clicking a row on Window2 or clicking Back button .Attaching the sample for reference. h4. Actual Results App Crashing with this log: {code} [ERROR][TiApplication( 321)] (main) [88,88] Sending event: exception on thread: main msg:java.lang.IllegalStateException: Ambiguous Z-Order; Titanium 2.1.0,2012/04/25 10:00,4257074 [ERROR][TiApplication( 321)] java.lang.IllegalStateException: Ambiguous Z-Order [ERROR][TiApplication( 321)] at org.appcelerator.titanium.view.TiCompositeLayout$1.compare(TiCompositeLayout.java:157) [ERROR][TiApplication( 321)] at org.appcelerator.titanium.view.TiCompositeLayout$1.compare(TiCompositeLayout.java:120) [ERROR][TiApplication( 321)] at java.util.TreeMap.cmp(TreeMap.java:1317) [ERROR][TiApplication( 321)] at java.util.TreeMap.put(TreeMap.java:1464) [ERROR][TiApplication( 321)] at java.util.TreeSet.add(TreeSet.java:111) [ERROR][TiApplication( 321)] at org.appcelerator.titanium.view.TiCompositeLayout.onLayout(TiCompositeLayout.java:465) [ERROR][TiApplication( 321)] at android.view.View.layout(View.java:7035) [ERROR][TiApplication( 321)] at ti.modules.titanium.ui.widget.tableview.TiTableViewRowProxyItem.onLayout(TiTableViewRowProxyItem.java:395) [ERROR][TiApplication( 321)] at android.view.View.layout(View.java:7035) [ERROR][TiApplication( 321)] at android.widget.ListView.setupChild(ListView.java:1815) [ERROR][TiApplication( 321)] at android.widget.ListView.makeAndAddView(ListView.java:1730) [ERROR][TiApplication( 321)] at android.widget.ListView.fillSpecific(ListView.java:1272) [ERROR][TiApplication( 321)] at android.widget.ListView.layoutChildren(ListView.java:1558) [ERROR][TiApplication( 321)] at android.widget.AbsListView.onLayout(AbsListView.java:1147) [ERROR][TiApplication( 321)] at android.view.View.layout(View.java:7035) [ERROR][TiApplication( 321)] at android.widget.FrameLayout.onLayout(FrameLayout.java:333) [ERROR][TiApplication( 321)] at ti.modules.titanium.ui.widget.tableview.TiTableView.onLayout(TiTableView.java:516) [ERROR][TiApplication( 321)] at android.view.View.layout(View.java:7035) [ERROR][TiApplication( 321)] at org.appcelerator.titanium.view.TiCompositeLayout.onLayout(TiCompositeLayout.java:527) [ERROR][TiApplication( 321)] at android.view.View.layout(View.java:7035) [ERROR][TiApplication( 321)] at org.appcelerator.titanium.view.TiCompositeLayout.onLayout(TiCompositeLayout.java:527) [ERROR][TiApplication( 321)] at android.view.View.layout(View.java:7035) [ERROR][TiApplication( 321)] at android.widget.FrameLayout.onLayout(FrameLayout.java:333) [ERROR][TiApplication( 321)] at android.view.View.layout(View.java:7035) [ERROR][TiApplication( 321)] at android.widget.LinearLayout.setChildFrame(LinearLayout.java:1249) [ERROR][TiApplication( 321)] at android.widget.LinearLayout.layoutVertical(LinearLayout.java:1125) [ERROR][TiApplication( 321)] at android.widget.LinearLayout.onLayout(LinearLayout.java:1042) [ERROR][TiApplication( 321)] at android.view.View.layout(View.java:7035) [ERROR][TiApplication( 321)] at android.widget.FrameLayout.onLayout(FrameLayout.java:333) [ERROR][TiApplication( 321)] at android.view.View.layout(View.java:7035) [ERROR][TiApplication( 321)] at android.view.ViewRoot.performTraversals(ViewRoot.java:1045) [ERROR][TiApplication( 321)] at android.view.ViewRoot.handleMessage(ViewRoot.java:1727) [ERROR][TiApplication( 321)] at android.os.Handler.dispatchMessage(Handler.java:99) [ERROR][TiApplication( 321)] at android.os.Looper.loop(Looper.java:123) [ERROR][TiApplication( 321)] at android.app.ActivityThread.main(ActivityThread.java:4627) [ERROR][TiApplication( 321)] at java.lang.reflect.Method.invokeNative(Native Method) [ERROR][TiApplication( 321)] at java.lang.reflect.Method.invoke(Method.java:521) [ERROR][TiApplication( 321)] at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:868) [ERROR][TiApplication( 321)] at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:626) [ERROR][TiApplication( 321)] at dalvik.system.NativeStart.main(Native Method) [ERROR][AndroidRuntime( 321)] FATAL EXCEPTION: main [ERROR][AndroidRuntime( 321)] java.lang.IllegalStateException: Ambiguous Z-Order [ERROR][AndroidRuntime( 321)] at org.appcelerator.titanium.view.TiCompositeLayout$1.compare(TiCompositeLayout.java:157) [ERROR][AndroidRuntime( 321)] at org.appcelerator.titanium.view.TiCompositeLayout$1.compare(TiCompositeLayout.java:120) [ERROR][AndroidRuntime( 321)] at java.util.TreeMap.cmp(TreeMap.java:1317) [ERROR][AndroidRuntime( 321)] at java.util.TreeMap.put(TreeMap.java:1464) [ERROR][AndroidRuntime( 321)] at java.util.TreeSet.add(TreeSet.java:111) [ERROR][AndroidRuntime( 321)] at org.appcelerator.titanium.view.TiCompositeLayout.onLayout(TiCompositeLayout.java:465) [ERROR][AndroidRuntime( 321)] at android.view.View.layout(View.java:7035) [ERROR][AndroidRuntime( 321)] at ti.modules.titanium.ui.widget.tableview.TiTableViewRowProxyItem.onLayout(TiTableViewRowProxyItem.java:395) [ERROR][AndroidRuntime( 321)] at android.view.View.layout(View.java:7035) [ERROR][AndroidRuntime( 321)] at android.widget.ListView.setupChild(ListView.java:1815) [ERROR][AndroidRuntime( 321)] at android.widget.ListView.makeAndAddView(ListView.java:1730) [ERROR][AndroidRuntime( 321)] at android.widget.ListView.fillSpecific(ListView.java:1272) [ERROR][AndroidRuntime( 321)] at android.widget.ListView.layoutChildren(ListView.java:1558) [ERROR][AndroidRuntime( 321)] at android.widget.AbsListView.onLayout(AbsListView.java:1147) [ERROR][AndroidRuntime( 321)] at android.view.View.layout(View.java:7035) [ERROR][AndroidRuntime( 321)] at android.widget.FrameLayout.onLayout(FrameLayout.java:333) [ERROR][AndroidRuntime( 321)] at ti.modules.titanium.ui.widget.tableview.TiTableView.onLayout(TiTableView.java:516) [ERROR][AndroidRuntime( 321)] at android.view.View.layout(View.java:7035) [ERROR][AndroidRuntime( 321)] at org.appcelerator.titanium.view.TiCompositeLayout.onLayout(TiCompositeLayout.java:527) [ERROR][AndroidRuntime( 321)] at android.view.View.layout(View.java:7035) [ERROR][AndroidRuntime( 321)] at org.appcelerator.titanium.view.TiCompositeLayout.onLayout(TiCompositeLayout.java:527) [ERROR][AndroidRuntime( 321)] at android.view.View.layout(View.java:7035) [ERROR][AndroidRuntime( 321)] at android.widget.FrameLayout.onLayout(FrameLayout.java:333) [ERROR][AndroidRuntime( 321)] at android.view.View.layout(View.java:7035) [ERROR][AndroidRuntime( 321)] at android.widget.LinearLayout.setChildFrame(LinearLayout.java:1249) [ERROR][AndroidRuntime( 321)] at android.widget.LinearLayout.layoutVertical(LinearLayout.java:1125) [ERROR][AndroidRuntime( 321)] at android.widget.LinearLayout.onLayout(LinearLayout.java:1042) [ERROR][AndroidRuntime( 321)] at android.view.View.layout(View.java:7035) [ERROR][AndroidRuntime( 321)] at android.widget.FrameLayout.onLayout(FrameLayout.java:333) [ERROR][AndroidRuntime( 321)] at android.view.View.layout(View.java:7035) [ERROR][AndroidRuntime( 321)] at android.view.ViewRoot.performTraversals(ViewRoot.java:1045) [ERROR][AndroidRuntime( 321)] at android.view.ViewRoot.handleMessage(ViewRoot.java:1727) [ERROR][AndroidRuntime( 321)] at android.os.Handler.dispatchMessage(Handler.java:99) [ERROR][AndroidRuntime( 321)] at android.os.Looper.loop(Looper.java:123) [ERROR][AndroidRuntime( 321)] at android.app.ActivityThread.main(ActivityThread.java:4627) [ERROR][AndroidRuntime( 321)] at java.lang.reflect.Method.invokeNative(Native Method) [ERROR][AndroidRuntime( 321)] at java.lang.reflect.Method.invoke(Method.java:521) [ERROR][AndroidRuntime( 321)] at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:868) [ERROR][AndroidRuntime( 321)] at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:626) [ERROR][AndroidRuntime( 321)] at dalvik.system.NativeStart.main(Native Method) [WARN][ActivityManager( 60)] Force finishing activity com.negoapps.zindexfailing/.ZindexfailingActivity [INFO][ARMAssembler( 60)] generated scanline__00000077:03515104_00000000_00000000 [ 33 ipp] (47 ins) at [0x36d630:0x36d6ec] in 5438000 ns [WARN][ActivityManager( 60)] Activity pause timeout for HistoryRecord{44ea2d00 com.negoapps.zindexfailing/.ZindexfailingActivity} [INFO][Process ( 321)] Sending signal. PID: 321 SIG: 9 [INFO][ActivityManager( 60)] Process com.negoapps.zindexfailing (pid 321) has died. [WARN][ActivityManager( 60)] Scheduling restart of crashed service com.negoapps.zindexfailing/org.appcelerator.titanium.analytics.TiAnalyticsService in 5000ms [INFO][WindowManager( 60)] WIN DEATH: Window{45141040 com.negoapps.zindexfailing/com.negoapps.zindexfailing.ZindexfailingActivity paused=false} [INFO][WindowManager( 60)] WIN DEATH: Window{450f34b0 com.negoapps.zindexfailing/org.appcelerator.titanium.TiModalActivity paused=false} [INFO][ActivityManager( 60)] Start proc com.negoapps.zindexfailing for service com.negoapps.zindexfailing/org.appcelerator.titanium.analytics.TiAnalyticsService: pid=335 uid=10044 gids={1015, 3003} [INFO][TiApplication( 335)] (main) [0,0] checkpoint, app created. {code} h4. Expected Results The app closing the window properly h4. Test Case 1. Create new mobile Project 2. Paste this code {code} // this sets the background color of the master UIView (when there are no windows/tab groups on it) Titanium.UI.setBackgroundColor('#000'); var win2 = Titanium.UI.createWindow({ title : 'Tab 2', backgroundColor : '#fff' }); var label4 = Titanium.UI.createLabel({ color : '#999', text : 'I am Date Picker in Win2', font : { fontSize : 20, fontFamily : 'Helvetica Neue' }, textAlign : 'center', width : 'auto' }); win2.add(label4); var ds=[]; var ds1=[]; var row1 = Ti.UI.createTableViewRow(); row1.backgroundColor = 'yellow'; var label2 = Titanium.UI.createLabel({ color : '#999', text : 'I am Row2', font : { fontSize : 20, fontFamily : 'Helvetica Neue' }, textAlign : 'center', width : 'auto' }); var row2 = Ti.UI.createTableViewRow(); row2.add(label2); ds1.push(row2); var table1 = Ti.UI.createTableView({data:ds1,height:100}); row1.add(table1); ds.push(row1) var table = Ti.UI.createTableView({data:ds,height:200,top:20}); win2.add(table); Ti.App.addEventListener('updatePeriod', function(param) { alert('fired') label4.text = param.value; }) label2.addEventListener('click', function(e) { var win = createWindow(); win.open({ modal : true }); }) win2.open(); function createWindow() { var win4 = Ti.UI.createWindow({ backgroundColor : 'black' }); var ds3 = []; var row1 = Ti.UI.createTableViewRow(); row1.selectedMenu='Annual' var row2 = Ti.UI.createTableViewRow(); row2.selectedMenu='Semi' var label1 = Titanium.UI.createLabel({ color : '#999', text : 'Annual', font : { fontSize : 20, fontFamily : 'Helvetica Neue' }, textAlign : 'center', width : 'auto' }); var label2 = Titanium.UI.createLabel({ color : '#999', text : 'Semi', font : { fontSize : 20, fontFamily : 'Helvetica Neue' }, textAlign : 'center', width : 'auto' }); row1.add(label1); row2.add(label2); ds3.push(row1); ds3.push(row2); var table2 = Ti.UI.createTableView({ top : 20, data : ds3, height : 150 }) table2.addEventListener('click', function(e) { var index = e.index, section = e.section, row = e.row, rowdata = e.rowData, colorOff = '#363636', colorOn = '#385487'; /* Open Menu Windows */ setTimeout(function() { for(var i = 0, len = section.rows.length; i < len; i++) { section.rows[i].hasCheck = false; section.rows[i].children[0].color = colorOff; } /* set current check */ section.rows[index].hasCheck = true; e.row.children[0].color = colorOn; if(e.rowData.selectedMenu === 'Annual') { Ti.App.fireEvent('updatePeriod', { value : 'Annual' }); } else if(e.rowData.selectedMenu === 'Semi') { Ti.App.fireEvent('updatePeriod', { value : 'Semi' }); } }, 20); win4.close(); }); win4.add(table2); return win4; } {code} 3. Click on the label saying row 2 4. Click again on the labels in the new window. h4. HD Discussion http://support-admin.appcelerator.com/display/APP-536197

    Appcelerator JIRA | 5 years ago | Mauro Parra-Miranda
    java.lang.IllegalStateException: Ambiguous Z-Order
  3. 0
  4. Speed up your debug routine!

    Automated exception search integrated into your IDE

  5. 0

    Root Cause Analysis

    1. java.lang.IllegalStateException

      Ambiguous Z-Order

      at org.appcelerator.titanium.view.TiCompositeLayout$1.compare()
    2. org.appcelerator.titanium
      TiCompositeLayout$1.compare
      1. org.appcelerator.titanium.view.TiCompositeLayout$1.compare(TiCompositeLayout.java:157)
      2. org.appcelerator.titanium.view.TiCompositeLayout$1.compare(TiCompositeLayout.java:120)
      2 frames
    3. Java RT
      TreeSet.add
      1. java.util.TreeMap.cmp(TreeMap.java:1317)
      2. java.util.TreeMap.put(TreeMap.java:1464)
      3. java.util.TreeSet.add(TreeSet.java:111)
      3 frames
    4. org.appcelerator.titanium
      TiCompositeLayout.onLayout
      1. org.appcelerator.titanium.view.TiCompositeLayout.onLayout(TiCompositeLayout.java:465)
      1 frame
    5. Android Platform
      View.layout
      1. android.view.View.layout(View.java:7035)
      1 frame
    6. ti.modules.titanium
      TiTableViewRowProxyItem.onLayout
      1. ti.modules.titanium.ui.widget.tableview.TiTableViewRowProxyItem.onLayout(TiTableViewRowProxyItem.java:395)
      1 frame
    7. Android Platform
      FrameLayout.onLayout
      1. android.view.View.layout(View.java:7035)
      2. android.widget.ListView.setupChild(ListView.java:1815)
      3. android.widget.ListView.makeAndAddView(ListView.java:1730)
      4. android.widget.ListView.fillSpecific(ListView.java:1272)
      5. android.widget.ListView.layoutChildren(ListView.java:1558)
      6. android.widget.AbsListView.onLayout(AbsListView.java:1147)
      7. android.view.View.layout(View.java:7035)
      8. android.widget.FrameLayout.onLayout(FrameLayout.java:333)
      8 frames
    8. ti.modules.titanium
      TiTableView.onLayout
      1. ti.modules.titanium.ui.widget.tableview.TiTableView.onLayout(TiTableView.java:516)
      1 frame
    9. Android Platform
      View.layout
      1. android.view.View.layout(View.java:7035)
      1 frame
    10. org.appcelerator.titanium
      TiCompositeLayout.onLayout
      1. org.appcelerator.titanium.view.TiCompositeLayout.onLayout(TiCompositeLayout.java:527)
      1 frame
    11. Android Platform
      View.layout
      1. android.view.View.layout(View.java:7035)
      1 frame
    12. org.appcelerator.titanium
      TiCompositeLayout.onLayout
      1. org.appcelerator.titanium.view.TiCompositeLayout.onLayout(TiCompositeLayout.java:527)
      1 frame
    13. Android Platform
      ActivityThread.main
      1. android.view.View.layout(View.java:7035)
      2. android.widget.FrameLayout.onLayout(FrameLayout.java:333)
      3. android.view.View.layout(View.java:7035)
      4. android.widget.LinearLayout.setChildFrame(LinearLayout.java:1249)
      5. android.widget.LinearLayout.layoutVertical(LinearLayout.java:1125)
      6. android.widget.LinearLayout.onLayout(LinearLayout.java:1042)
      7. android.view.View.layout(View.java:7035)
      8. android.widget.FrameLayout.onLayout(FrameLayout.java:333)
      9. android.view.View.layout(View.java:7035)
      10. android.view.ViewRoot.performTraversals(ViewRoot.java:1045)
      11. android.view.ViewRoot.handleMessage(ViewRoot.java:1727)
      12. android.os.Handler.dispatchMessage(Handler.java:99)
      13. android.os.Looper.loop(Looper.java:123)
      14. android.app.ActivityThread.main(ActivityThread.java:4627)
      14 frames
    14. Java RT
      Method.invoke
      1. java.lang.reflect.Method.invokeNative(Native Method)
      2. java.lang.reflect.Method.invoke(Method.java:521)
      2 frames
    15. Android
      ZygoteInit.main
      1. com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:868)
      2. com.android.internal.os.ZygoteInit.main(ZygoteInit.java:626)
      2 frames
    16. Android Platform
      NativeStart.main
      1. dalvik.system.NativeStart.main(Native Method)
      1 frame