Titanium JIRA Archive
Titanium SDK/CLI (TIMOB)

[TIMOB-11392] Android: TableViewRow - App crashes on launch

GitHub Issuen/a
TypeBug
PriorityHigh
StatusClosed
ResolutionDuplicate
Resolution Date2012-10-11T23:26:14.000+0000
Affected Version/sRelease 3.0.0
Fix Version/sRelease 3.1.0, 2012 Sprint 21 API, 2012 Sprint 21
ComponentsAndroid
Labelsmodule_tableviewrow, qe-and100112, qe-testadded, regression
ReporterTamila Smolich
AssigneeKarl Rowley
Created2012-10-11T18:53:16.000+0000
Updated2012-11-06T17:40:17.000+0000

Description

Description: The app crashes on launch. This is a regression, does not occur on 2.1.3. Log output:
10-11 11:50:24.786: E/TiApplication(4067): (main) [15081,15081] Sending event: exception on thread: main msg:java.lang.NullPointerException; Titanium 3.0.0,2012/10/10 18:46,8a4b013
10-11 11:50:24.786: E/TiApplication(4067): java.lang.NullPointerException
10-11 11:50:24.786: E/TiApplication(4067): 	at ti.modules.titanium.ui.widget.TiUITableView.registerForTouch(TiUITableView.java:214)
10-11 11:50:24.786: E/TiApplication(4067): 	at org.appcelerator.titanium.proxy.TiViewProxy.handleGetView(TiViewProxy.java:446)
10-11 11:50:24.786: E/TiApplication(4067): 	at org.appcelerator.titanium.proxy.TiViewProxy.getOrCreateView(TiViewProxy.java:415)
10-11 11:50:24.786: E/TiApplication(4067): 	at org.appcelerator.titanium.proxy.TiViewProxy.forceCreateView(TiViewProxy.java:400)
10-11 11:50:24.786: E/TiApplication(4067): 	at ti.modules.titanium.ui.widget.tableview.TiTableViewRowProxyItem.createControls(TiTableViewRowProxyItem.java:139)
10-11 11:50:24.786: E/TiApplication(4067): 	at ti.modules.titanium.ui.widget.tableview.TiTableViewRowProxyItem.setRowData(TiTableViewRowProxyItem.java:286)
10-11 11:50:24.786: E/TiApplication(4067): 	at ti.modules.titanium.ui.widget.tableview.TiTableViewRowProxyItem.setRowData(TiTableViewRowProxyItem.java:81)
10-11 11:50:24.786: E/TiApplication(4067): 	at ti.modules.titanium.ui.widget.tableview.TiTableView$TTVListAdapter.getView(TiTableView.java:226)
10-11 11:50:24.786: E/TiApplication(4067): 	at android.widget.AbsListView.obtainView(AbsListView.java:2267)
10-11 11:50:24.786: E/TiApplication(4067): 	at android.widget.ListView.makeAndAddView(ListView.java:1769)
10-11 11:50:24.786: E/TiApplication(4067): 	at android.widget.ListView.fillDown(ListView.java:672)
10-11 11:50:24.786: E/TiApplication(4067): 	at android.widget.ListView.fillFromTop(ListView.java:733)
10-11 11:50:24.786: E/TiApplication(4067): 	at android.widget.ListView.layoutChildren(ListView.java:1622)
10-11 11:50:24.786: E/TiApplication(4067): 	at android.widget.AbsListView.onLayout(AbsListView.java:2102)
10-11 11:50:24.786: E/TiApplication(4067): 	at android.view.View.layout(View.java:13754)
10-11 11:50:24.786: E/TiApplication(4067): 	at android.view.ViewGroup.layout(ViewGroup.java:4362)
10-11 11:50:24.786: E/TiApplication(4067): 	at android.widget.FrameLayout.onLayout(FrameLayout.java:448)
10-11 11:50:24.786: E/TiApplication(4067): 	at ti.modules.titanium.ui.widget.tableview.TiTableView.onLayout(TiTableView.java:555)
10-11 11:50:24.786: E/TiApplication(4067): 	at android.view.View.layout(View.java:13754)
10-11 11:50:24.786: E/TiApplication(4067): 	at android.view.ViewGroup.layout(ViewGroup.java:4362)
10-11 11:50:24.786: E/TiApplication(4067): 	at org.appcelerator.titanium.view.TiCompositeLayout.onLayout(TiCompositeLayout.java:583)
10-11 11:50:24.786: E/TiApplication(4067): 	at android.view.View.layout(View.java:13754)
10-11 11:50:24.786: E/TiApplication(4067): 	at android.view.ViewGroup.layout(ViewGroup.java:4362)
10-11 11:50:24.786: E/TiApplication(4067): 	at org.appcelerator.titanium.view.TiCompositeLayout.onLayout(TiCompositeLayout.java:583)
10-11 11:50:24.786: E/TiApplication(4067): 	at android.view.View.layout(View.java:13754)
10-11 11:50:24.786: E/TiApplication(4067): 	at android.view.ViewGroup.layout(ViewGroup.java:4362)
10-11 11:50:24.786: E/TiApplication(4067): 	at android.widget.FrameLayout.onLayout(FrameLayout.java:448)
10-11 11:50:24.786: E/TiApplication(4067): 	at android.view.View.layout(View.java:13754)
10-11 11:50:24.786: E/TiApplication(4067): 	at android.view.ViewGroup.layout(ViewGroup.java:4362)
10-11 11:50:24.786: E/TiApplication(4067): 	at android.widget.LinearLayout.setChildFrame(LinearLayout.java:1649)
10-11 11:50:24.786: E/TiApplication(4067): 	at android.widget.LinearLayout.layoutVertical(LinearLayout.java:1507)
10-11 11:50:24.786: E/TiApplication(4067): 	at android.widget.LinearLayout.onLayout(LinearLayout.java:1420)
10-11 11:50:24.786: E/TiApplication(4067): 	at android.view.View.layout(View.java:13754)
10-11 11:50:24.786: E/TiApplication(4067): 	at android.view.ViewGroup.layout(ViewGroup.java:4362)
10-11 11:50:24.786: E/TiApplication(4067): 	at android.widget.FrameLayout.onLayout(FrameLayout.java:448)
10-11 11:50:24.786: E/TiApplication(4067): 	at android.view.View.layout(View.java:13754)
10-11 11:50:24.786: E/TiApplication(4067): 	at android.view.ViewGroup.layout(ViewGroup.java:4362)
10-11 11:50:24.786: E/TiApplication(4067): 	at android.view.ViewRootImpl.performLayout(ViewRootImpl.java:1866)
10-11 11:50:24.786: E/TiApplication(4067): 	at android.view.ViewRootImpl.performTraversals(ViewRootImpl.java:1687)
10-11 11:50:24.786: E/TiApplication(4067): 	at android.view.ViewRootImpl.doTraversal(ViewRootImpl.java:998)
10-11 11:50:24.786: E/TiApplication(4067): 	at android.view.ViewRootImpl$TraversalRunnable.run(ViewRootImpl.java:4212)
10-11 11:50:24.786: E/TiApplication(4067): 	at android.view.Choreographer$CallbackRecord.run(Choreographer.java:725)
10-11 11:50:24.786: E/TiApplication(4067): 	at android.view.Choreographer.doCallbacks(Choreographer.java:555)
10-11 11:50:24.786: E/TiApplication(4067): 	at android.view.Choreographer.doFrame(Choreographer.java:525)
10-11 11:50:24.786: E/TiApplication(4067): 	at android.view.Choreographer$FrameDisplayEventReceiver.run(Choreographer.java:711)
10-11 11:50:24.786: E/TiApplication(4067): 	at android.os.Handler.handleCallback(Handler.java:615)
10-11 11:50:24.786: E/TiApplication(4067): 	at android.os.Handler.dispatchMessage(Handler.java:92)
10-11 11:50:24.786: E/TiApplication(4067): 	at android.os.Looper.loop(Looper.java:137)
10-11 11:50:24.786: E/TiApplication(4067): 	at android.app.ActivityThread.main(ActivityThread.java:4745)
10-11 11:50:24.786: E/TiApplication(4067): 	at java.lang.reflect.Method.invokeNative(Native Method)
10-11 11:50:24.786: E/TiApplication(4067): 	at java.lang.reflect.Method.invoke(Method.java:511)
10-11 11:50:24.786: E/TiApplication(4067): 	at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:786)
10-11 11:50:24.786: E/TiApplication(4067): 	at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:553)
10-11 11:50:24.786: E/TiApplication(4067): 	at dalvik.system.NativeStart.main(Native Method)
10-11 11:50:24.872: E/AndroidRuntime(4067): FATAL EXCEPTION: main
10-11 11:50:24.872: E/AndroidRuntime(4067): java.lang.NullPointerException
10-11 11:50:24.872: E/AndroidRuntime(4067): 	at ti.modules.titanium.ui.widget.TiUITableView.registerForTouch(TiUITableView.java:214)
10-11 11:50:24.872: E/AndroidRuntime(4067): 	at org.appcelerator.titanium.proxy.TiViewProxy.handleGetView(TiViewProxy.java:446)
10-11 11:50:24.872: E/AndroidRuntime(4067): 	at org.appcelerator.titanium.proxy.TiViewProxy.getOrCreateView(TiViewProxy.java:415)
10-11 11:50:24.872: E/AndroidRuntime(4067): 	at org.appcelerator.titanium.proxy.TiViewProxy.forceCreateView(TiViewProxy.java:400)
10-11 11:50:24.872: E/AndroidRuntime(4067): 	at ti.modules.titanium.ui.widget.tableview.TiTableViewRowProxyItem.createControls(TiTableViewRowProxyItem.java:139)
10-11 11:50:24.872: E/AndroidRuntime(4067): 	at ti.modules.titanium.ui.widget.tableview.TiTableViewRowProxyItem.setRowData(TiTableViewRowProxyItem.java:286)
10-11 11:50:24.872: E/AndroidRuntime(4067): 	at ti.modules.titanium.ui.widget.tableview.TiTableViewRowProxyItem.setRowData(TiTableViewRowProxyItem.java:81)
10-11 11:50:24.872: E/AndroidRuntime(4067): 	at ti.modules.titanium.ui.widget.tableview.TiTableView$TTVListAdapter.getView(TiTableView.java:226)
10-11 11:50:24.872: E/AndroidRuntime(4067): 	at android.widget.AbsListView.obtainView(AbsListView.java:2267)
10-11 11:50:24.872: E/AndroidRuntime(4067): 	at android.widget.ListView.makeAndAddView(ListView.java:1769)
10-11 11:50:24.872: E/AndroidRuntime(4067): 	at android.widget.ListView.fillDown(ListView.java:672)
10-11 11:50:24.872: E/AndroidRuntime(4067): 	at android.widget.ListView.fillFromTop(ListView.java:733)
10-11 11:50:24.872: E/AndroidRuntime(4067): 	at android.widget.ListView.layoutChildren(ListView.java:1622)
10-11 11:50:24.872: E/AndroidRuntime(4067): 	at android.widget.AbsListView.onLayout(AbsListView.java:2102)
10-11 11:50:24.872: E/AndroidRuntime(4067): 	at android.view.View.layout(View.java:13754)
10-11 11:50:24.872: E/AndroidRuntime(4067): 	at android.view.ViewGroup.layout(ViewGroup.java:4362)
10-11 11:50:24.872: E/AndroidRuntime(4067): 	at android.widget.FrameLayout.onLayout(FrameLayout.java:448)
10-11 11:50:24.872: E/AndroidRuntime(4067): 	at ti.modules.titanium.ui.widget.tableview.TiTableView.onLayout(TiTableView.java:555)
10-11 11:50:24.872: E/AndroidRuntime(4067): 	at android.view.View.layout(View.java:13754)
10-11 11:50:24.872: E/AndroidRuntime(4067): 	at android.view.ViewGroup.layout(ViewGroup.java:4362)
10-11 11:50:24.872: E/AndroidRuntime(4067): 	at org.appcelerator.titanium.view.TiCompositeLayout.onLayout(TiCompositeLayout.java:583)
10-11 11:50:24.872: E/AndroidRuntime(4067): 	at android.view.View.layout(View.java:13754)
10-11 11:50:24.872: E/AndroidRuntime(4067): 	at android.view.ViewGroup.layout(ViewGroup.java:4362)
10-11 11:50:24.872: E/AndroidRuntime(4067): 	at org.appcelerator.titanium.view.TiCompositeLayout.onLayout(TiCompositeLayout.java:583)
10-11 11:50:24.872: E/AndroidRuntime(4067): 	at android.view.View.layout(View.java:13754)
10-11 11:50:24.872: E/AndroidRuntime(4067): 	at android.view.ViewGroup.layout(ViewGroup.java:4362)
10-11 11:50:24.872: E/AndroidRuntime(4067): 	at android.widget.FrameLayout.onLayout(FrameLayout.java:448)
10-11 11:50:24.872: E/AndroidRuntime(4067): 	at android.view.View.layout(View.java:13754)
10-11 11:50:24.872: E/AndroidRuntime(4067): 	at android.view.ViewGroup.layout(ViewGroup.java:4362)
10-11 11:50:24.872: E/AndroidRuntime(4067): 	at android.widget.LinearLayout.setChildFrame(LinearLayout.java:1649)
10-11 11:50:24.872: E/AndroidRuntime(4067): 	at android.widget.LinearLayout.layoutVertical(LinearLayout.java:1507)
10-11 11:50:24.872: E/AndroidRuntime(4067): 	at android.widget.LinearLayout.onLayout(LinearLayout.java:1420)
10-11 11:50:24.872: E/AndroidRuntime(4067): 	at android.view.View.layout(View.java:13754)
10-11 11:50:24.872: E/AndroidRuntime(4067): 	at android.view.ViewGroup.layout(ViewGroup.java:4362)
10-11 11:50:24.872: E/AndroidRuntime(4067): 	at android.widget.FrameLayout.onLayout(FrameLayout.java:448)
10-11 11:50:24.872: E/AndroidRuntime(4067): 	at android.view.View.layout(View.java:13754)
10-11 11:50:24.872: E/AndroidRuntime(4067): 	at android.view.ViewGroup.layout(ViewGroup.java:4362)
10-11 11:50:24.872: E/AndroidRuntime(4067): 	at android.view.ViewRootImpl.performLayout(ViewRootImpl.java:1866)
10-11 11:50:24.872: E/AndroidRuntime(4067): 	at android.view.ViewRootImpl.performTraversals(ViewRootImpl.java:1687)
10-11 11:50:24.872: E/AndroidRuntime(4067): 	at android.view.ViewRootImpl.doTraversal(ViewRootImpl.java:998)
10-11 11:50:24.872: E/AndroidRuntime(4067): 	at android.view.ViewRootImpl$TraversalRunnable.run(ViewRootImpl.java:4212)
10-11 11:50:24.872: E/AndroidRuntime(4067): 	at android.view.Choreographer$CallbackRecord.run(Choreographer.java:725)
10-11 11:50:24.872: E/AndroidRuntime(4067): 	at android.view.Choreographer.doCallbacks(Choreographer.java:555)
10-11 11:50:24.872: E/AndroidRuntime(4067): 	at android.view.Choreographer.doFrame(Choreographer.java:525)
10-11 11:50:24.872: E/AndroidRuntime(4067): 	at android.view.Choreographer$FrameDisplayEventReceiver.run(Choreographer.java:711)
10-11 11:50:24.872: E/AndroidRuntime(4067): 	at android.os.Handler.handleCallback(Handler.java:615)
10-11 11:50:24.872: E/AndroidRuntime(4067): 	at android.os.Handler.dispatchMessage(Handler.java:92)
10-11 11:50:24.872: E/AndroidRuntime(4067): 	at android.os.Looper.loop(Looper.java:137)
10-11 11:50:24.872: E/AndroidRuntime(4067): 	at android.app.ActivityThread.main(ActivityThread.java:4745)
10-11 11:50:24.872: E/AndroidRuntime(4067): 	at java.lang.reflect.Method.invokeNative(Native Method)
10-11 11:50:24.872: E/AndroidRuntime(4067): 	at java.lang.reflect.Method.invoke(Method.java:511)
10-11 11:50:24.872: E/AndroidRuntime(4067): 	at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:786)
10-11 11:50:24.872: E/AndroidRuntime(4067): 	at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:553)
10-11 11:50:24.872: E/AndroidRuntime(4067): 	at dalvik.system.NativeStart.main(Native Method)
Steps: 1. Run the following code:
Titanium.UI.setBackgroundColor('#000');
  
var win2 = Titanium.UI.createWindow({
    backgroundColor : '#fff'
});
  
var ds=[];
var ds1=[];
var row1 = Ti.UI.createTableViewRow();
row1.backgroundColor = 'yellow';
 
var label2 = Titanium.UI.createLabel({
    text : 'I am Row2',
    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);
label2.addEventListener('click', function(e) {
  
    var win = Ti.UI.createWindow({backgroundColor: 'black'});
    win.open({
        fullscreen:false
    });
})
win2.open();
Expected: Should see a tableView with 2 rows Actual: The app crashes

Comments

  1. Karl Rowley 2012-10-11

    This works with the fix for [TIMOB-11320]. I"m going to close as a duplicate.
  2. Karl Rowley 2012-10-11

    Duplicate of [TIMOB-11320]
  3. Tamila Smolich 2012-10-17

    Closing as fixed. Verified and tested on: Titanium Studio, build: 3.0.0.201210151149 Titanium SDK, build: 3.1.0.v20121017102121 Device: Nexus 7 (4.1.1)

JSON Source