[TIMOB-13314] Android: ListView IllegalStateException: Ambiguous Z-Order
GitHub Issue | n/a |
---|---|
Type | Bug |
Priority | Medium |
Status | Closed |
Resolution | Fixed |
Resolution Date | 2013-04-02T23:22:03.000+0000 |
Affected Version/s | Release 3.1.0 |
Fix Version/s | Release 3.1.0, 2013 Sprint 07 API, 2013 Sprint 07 |
Components | Android |
Labels | ListViews, qe-testadded, supportTeam, triage |
Reporter | Itay Avtalyon |
Assignee | Hieu Pham |
Created | 2013-04-02T12:38:21.000+0000 |
Updated | 2013-10-01T06:18:04.000+0000 |
Description
Steps to Reproduce
Install the attached sample on an Android device and run.Actual Result
App crash. (Tested on Android 2.3.3 [Samsung Galaxy I]Expected Result
Show a list of three items with a custom templateAttachments
File | Date | Size |
---|---|---|
.log | 2013-04-02T12:38:42.000+0000 | 4047938 |
app.js | 2013-04-02T12:38:53.000+0000 | 8036 |
diagnostic5075961508409598148.log | 2013-04-02T12:38:51.000+0000 | 12112 |
The error description from the Android Monitor: 04-02 15:29:10.425: E/TiApplication(18485): (main) [443,443] Sending event: exception on thread: main msg:java.lang.IllegalStateException: Ambiguous Z-Order; Titanium 3.1.0,2013/03/28 21:09,1748774 04-02 15:29:10.425: E/TiApplication(18485): java.lang.IllegalStateException: Ambiguous Z-Order 04-02 15:29:10.425: E/TiApplication(18485): at org.appcelerator.titanium.view.TiCompositeLayout$1.compare(TiCompositeLayout.java:164) 04-02 15:29:10.425: E/TiApplication(18485): at org.appcelerator.titanium.view.TiCompositeLayout$1.compare(TiCompositeLayout.java:127) 04-02 15:29:10.425: E/TiApplication(18485): at java.util.TreeMap.find(TreeMap.java:277) 04-02 15:29:10.425: E/TiApplication(18485): at java.util.TreeMap.putInternal(TreeMap.java:240) 04-02 15:29:10.425: E/TiApplication(18485): at java.util.TreeMap.put(TreeMap.java:186) 04-02 15:29:10.425: E/TiApplication(18485): at java.util.TreeSet.add(TreeSet.java:113) 04-02 15:29:10.425: E/TiApplication(18485): at org.appcelerator.titanium.view.TiCompositeLayout.onLayout(TiCompositeLayout.java:491) 04-02 15:29:10.425: E/TiApplication(18485): at android.view.View.layout(View.java:7228) 04-02 15:29:10.425: E/TiApplication(18485): at org.appcelerator.titanium.view.TiCompositeLayout.onLayout(TiCompositeLayout.java:578) 04-02 15:29:10.425: E/TiApplication(18485): at android.view.View.layout(View.java:7228) 04-02 15:29:10.425: E/TiApplication(18485): at org.appcelerator.titanium.view.TiCompositeLayout.onLayout(TiCompositeLayout.java:578) 04-02 15:29:10.425: E/TiApplication(18485): at android.view.View.layout(View.java:7228) 04-02 15:29:10.425: E/TiApplication(18485): at org.appcelerator.titanium.view.TiCompositeLayout.onLayout(TiCompositeLayout.java:578) 04-02 15:29:10.425: E/TiApplication(18485): at android.view.View.layout(View.java:7228) 04-02 15:29:10.425: E/TiApplication(18485): at android.widget.FrameLayout.onLayout(FrameLayout.java:338) 04-02 15:29:10.425: E/TiApplication(18485): at android.view.View.layout(View.java:7228) 04-02 15:29:10.425: E/TiApplication(18485): at android.widget.ListView.setupChild(ListView.java:1881) 04-02 15:29:10.425: E/TiApplication(18485): at android.widget.ListView.makeAndAddView(ListView.java:1796) 04-02 15:29:10.425: E/TiApplication(18485): at android.widget.ListView.fillDown(ListView.java:718) 04-02 15:29:10.425: E/TiApplication(18485): at android.widget.ListView.fillFromTop(ListView.java:775) 04-02 15:29:10.425: E/TiApplication(18485): at android.widget.ListView.layoutChildren(ListView.java:1646) 04-02 15:29:10.425: E/TiApplication(18485): at android.widget.AbsListView.onLayout(AbsListView.java:1384) 04-02 15:29:10.425: E/TiApplication(18485): at android.view.View.layout(View.java:7228) 04-02 15:29:10.425: E/TiApplication(18485): at org.appcelerator.titanium.view.TiCompositeLayout.onLayout(TiCompositeLayout.java:578) 04-02 15:29:10.425: E/TiApplication(18485): at android.view.View.layout(View.java:7228) 04-02 15:29:10.425: E/TiApplication(18485): at org.appcelerator.titanium.view.TiCompositeLayout.onLayout(TiCompositeLayout.java:578) 04-02 15:29:10.425: E/TiApplication(18485): at android.view.View.layout(View.java:7228) 04-02 15:29:10.425: E/TiApplication(18485): at android.widget.FrameLayout.onLayout(FrameLayout.java:338) 04-02 15:29:10.425: E/TiApplication(18485): at android.view.View.layout(View.java:7228) 04-02 15:29:10.425: E/TiApplication(18485): at android.widget.LinearLayout.setChildFrame(LinearLayout.java:1254) 04-02 15:29:10.425: E/TiApplication(18485): at android.widget.LinearLayout.layoutVertical(LinearLayout.java:1130) 04-02 15:29:10.425: E/TiApplication(18485): at android.widget.LinearLayout.onLayout(LinearLayout.java:1047) 04-02 15:29:10.425: E/TiApplication(18485): at android.view.View.layout(View.java:7228) 04-02 15:29:10.425: E/TiApplication(18485): at android.widget.FrameLayout.onLayout(FrameLayout.java:338) 04-02 15:29:10.425: E/TiApplication(18485): at android.view.View.layout(View.java:7228) 04-02 15:29:10.425: E/TiApplication(18485): at android.view.ViewRoot.performTraversals(ViewRoot.java:1145) 04-02 15:29:10.425: E/TiApplication(18485): at android.view.ViewRoot.handleMessage(ViewRoot.java:1865) 04-02 15:29:10.425: E/TiApplication(18485): at android.os.Handler.dispatchMessage(Handler.java:99) 04-02 15:29:10.425: E/TiApplication(18485): at android.os.Looper.loop(Looper.java:123) 04-02 15:29:10.425: E/TiApplication(18485): at android.app.ActivityThread.main(ActivityThread.java:3687) 04-02 15:29:10.425: E/TiApplication(18485): at java.lang.reflect.Method.invokeNative(Native Method) 04-02 15:29:10.425: E/TiApplication(18485): at java.lang.reflect.Method.invoke(Method.java:507) 04-02 15:29:10.425: E/TiApplication(18485): at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:842) 04-02 15:29:10.425: E/TiApplication(18485): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:600) 04-02 15:29:10.425: E/TiApplication(18485): at dalvik.system.NativeStart.main(Native Method)
UPDATE: Tested with a very basic example (no template) and the app works fine.
Update: Tried to simplify the template, and it seems that if there are only two level of children it is working fine.
This is an issue with borders. Master PR: https://github.com/appcelerator/titanium_mobile/pull/4067
Tested with: SDK: 3.1.0.v20130405170202 Studio:3.1.0.201304011603 Device: Samsung Galaxy Note(2.3.6) OS: OSX 10.7.5 No more Ambiguous Z-Order and Illegal stateException