java.lang.NullPointerException

Appcelerator JIRA | Tamila Smolich | 4 years ago
  1. 0

    Description: The app crashes on launch. This is a regression, does not occur on 2.1.3. Log output: {code} 10-09 11:51:52.531: E/TiApplication(6298): (main) [11210,11210] Sending event: exception on thread: main msg:java.lang.NullPointerException; Titanium 3.0.0,2012/10/09 03:42,33c586f 10-09 11:51:52.531: E/TiApplication(6298): java.lang.NullPointerException 10-09 11:51:52.531: E/TiApplication(6298): at ti.modules.titanium.ui.widget.tableview.TiTableViewRowProxyItem.createControls(TiTableViewRowProxyItem.java:151) 10-09 11:51:52.531: E/TiApplication(6298): at ti.modules.titanium.ui.widget.tableview.TiTableViewRowProxyItem.setRowData(TiTableViewRowProxyItem.java:286) 10-09 11:51:52.531: E/TiApplication(6298): at ti.modules.titanium.ui.widget.tableview.TiTableViewRowProxyItem.setRowData(TiTableViewRowProxyItem.java:81) 10-09 11:51:52.531: E/TiApplication(6298): at ti.modules.titanium.ui.widget.tableview.TiTableView$TTVListAdapter.getView(TiTableView.java:226) 10-09 11:51:52.531: E/TiApplication(6298): at android.widget.AbsListView.obtainView(AbsListView.java:2451) 10-09 11:51:52.531: E/TiApplication(6298): at android.widget.ListView.makeAndAddView(ListView.java:1780) 10-09 11:51:52.531: E/TiApplication(6298): at android.widget.ListView.fillDown(ListView.java:678) 10-09 11:51:52.531: E/TiApplication(6298): at android.widget.ListView.fillFromTop(ListView.java:738) 10-09 11:51:52.531: E/TiApplication(6298): at android.widget.ListView.layoutChildren(ListView.java:1631) 10-09 11:51:52.531: E/TiApplication(6298): at android.widget.AbsListView.onLayout(AbsListView.java:2281) 10-09 11:51:52.531: E/TiApplication(6298): at android.view.View.layout(View.java:11338) 10-09 11:51:52.531: E/TiApplication(6298): at android.view.ViewGroup.layout(ViewGroup.java:4238) 10-09 11:51:52.531: E/TiApplication(6298): at android.widget.FrameLayout.onLayout(FrameLayout.java:431) 10-09 11:51:52.531: E/TiApplication(6298): at ti.modules.titanium.ui.widget.tableview.TiTableView.onLayout(TiTableView.java:555) 10-09 11:51:52.531: E/TiApplication(6298): at android.view.View.layout(View.java:11338) 10-09 11:51:52.531: E/TiApplication(6298): at android.view.ViewGroup.layout(ViewGroup.java:4238) 10-09 11:51:52.531: E/TiApplication(6298): at org.appcelerator.titanium.view.TiCompositeLayout.onLayout(TiCompositeLayout.java:583) 10-09 11:51:52.531: E/TiApplication(6298): at android.view.View.layout(View.java:11338) 10-09 11:51:52.531: E/TiApplication(6298): at android.view.ViewGroup.layout(ViewGroup.java:4238) 10-09 11:51:52.531: E/TiApplication(6298): at org.appcelerator.titanium.view.TiCompositeLayout.onLayout(TiCompositeLayout.java:583) 10-09 11:51:52.531: E/TiApplication(6298): at android.view.View.layout(View.java:11338) 10-09 11:51:52.531: E/TiApplication(6298): at android.view.ViewGroup.layout(ViewGroup.java:4238) 10-09 11:51:52.531: E/TiApplication(6298): at android.widget.FrameLayout.onLayout(FrameLayout.java:431) 10-09 11:51:52.531: E/TiApplication(6298): at android.view.View.layout(View.java:11338) 10-09 11:51:52.531: E/TiApplication(6298): at android.view.ViewGroup.layout(ViewGroup.java:4238) 10-09 11:51:52.531: E/TiApplication(6298): at android.widget.LinearLayout.setChildFrame(LinearLayout.java:1644) 10-09 11:51:52.531: E/TiApplication(6298): at android.widget.LinearLayout.layoutVertical(LinearLayout.java:1502) 10-09 11:51:52.531: E/TiApplication(6298): at android.widget.LinearLayout.onLayout(LinearLayout.java:1415) 10-09 11:51:52.531: E/TiApplication(6298): at android.view.View.layout(View.java:11338) 10-09 11:51:52.531: E/TiApplication(6298): at android.view.ViewGroup.layout(ViewGroup.java:4238) 10-09 11:51:52.531: E/TiApplication(6298): at android.widget.FrameLayout.onLayout(FrameLayout.java:431) 10-09 11:51:52.531: E/TiApplication(6298): at android.view.View.layout(View.java:11338) 10-09 11:51:52.531: E/TiApplication(6298): at android.view.ViewGroup.layout(ViewGroup.java:4238) 10-09 11:51:52.531: E/TiApplication(6298): at android.view.ViewRootImpl.performTraversals(ViewRootImpl.java:1667) 10-09 11:51:52.531: E/TiApplication(6298): at android.view.ViewRootImpl.handleMessage(ViewRootImpl.java:2624) 10-09 11:51:52.531: E/TiApplication(6298): at android.os.Handler.dispatchMessage(Handler.java:99) 10-09 11:51:52.531: E/TiApplication(6298): at android.os.Looper.loop(Looper.java:137) 10-09 11:51:52.531: E/TiApplication(6298): at android.app.ActivityThread.main(ActivityThread.java:4517) 10-09 11:51:52.531: E/TiApplication(6298): at java.lang.reflect.Method.invokeNative(Native Method) 10-09 11:51:52.531: E/TiApplication(6298): at java.lang.reflect.Method.invoke(Method.java:511) 10-09 11:51:52.531: E/TiApplication(6298): at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:980) 10-09 11:51:52.531: E/TiApplication(6298): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:747) 10-09 11:51:52.531: E/TiApplication(6298): at dalvik.system.NativeStart.main(Native Method) 10-09 11:51:52.561: E/AndroidRuntime(6298): FATAL EXCEPTION: main 10-09 11:51:52.561: E/AndroidRuntime(6298): java.lang.NullPointerException 10-09 11:51:52.561: E/AndroidRuntime(6298): at ti.modules.titanium.ui.widget.tableview.TiTableViewRowProxyItem.createControls(TiTableViewRowProxyItem.java:151) 10-09 11:51:52.561: E/AndroidRuntime(6298): at ti.modules.titanium.ui.widget.tableview.TiTableViewRowProxyItem.setRowData(TiTableViewRowProxyItem.java:286) 10-09 11:51:52.561: E/AndroidRuntime(6298): at ti.modules.titanium.ui.widget.tableview.TiTableViewRowProxyItem.setRowData(TiTableViewRowProxyItem.java:81) 10-09 11:51:52.561: E/AndroidRuntime(6298): at ti.modules.titanium.ui.widget.tableview.TiTableView$TTVListAdapter.getView(TiTableView.java:226) 10-09 11:51:52.561: E/AndroidRuntime(6298): at android.widget.AbsListView.obtainView(AbsListView.java:2451) 10-09 11:51:52.561: E/AndroidRuntime(6298): at android.widget.ListView.makeAndAddView(ListView.java:1780) 10-09 11:51:52.561: E/AndroidRuntime(6298): at android.widget.ListView.fillDown(ListView.java:678) 10-09 11:51:52.561: E/AndroidRuntime(6298): at android.widget.ListView.fillFromTop(ListView.java:738) 10-09 11:51:52.561: E/AndroidRuntime(6298): at android.widget.ListView.layoutChildren(ListView.java:1631) 10-09 11:51:52.561: E/AndroidRuntime(6298): at android.widget.AbsListView.onLayout(AbsListView.java:2281) 10-09 11:51:52.561: E/AndroidRuntime(6298): at android.view.View.layout(View.java:11338) 10-09 11:51:52.561: E/AndroidRuntime(6298): at android.view.ViewGroup.layout(ViewGroup.java:4238) 10-09 11:51:52.561: E/AndroidRuntime(6298): at android.widget.FrameLayout.onLayout(FrameLayout.java:431) 10-09 11:51:52.561: E/AndroidRuntime(6298): at ti.modules.titanium.ui.widget.tableview.TiTableView.onLayout(TiTableView.java:555) 10-09 11:51:52.561: E/AndroidRuntime(6298): at android.view.View.layout(View.java:11338) 10-09 11:51:52.561: E/AndroidRuntime(6298): at android.view.ViewGroup.layout(ViewGroup.java:4238) 10-09 11:51:52.561: E/AndroidRuntime(6298): at org.appcelerator.titanium.view.TiCompositeLayout.onLayout(TiCompositeLayout.java:583) 10-09 11:51:52.561: E/AndroidRuntime(6298): at android.view.View.layout(View.java:11338) 10-09 11:51:52.561: E/AndroidRuntime(6298): at android.view.ViewGroup.layout(ViewGroup.java:4238) 10-09 11:51:52.561: E/AndroidRuntime(6298): at org.appcelerator.titanium.view.TiCompositeLayout.onLayout(TiCompositeLayout.java:583) 10-09 11:51:52.561: E/AndroidRuntime(6298): at android.view.View.layout(View.java:11338) 10-09 11:51:52.561: E/AndroidRuntime(6298): at android.view.ViewGroup.layout(ViewGroup.java:4238) 10-09 11:51:52.561: E/AndroidRuntime(6298): at android.widget.FrameLayout.onLayout(FrameLayout.java:431) 10-09 11:51:52.561: E/AndroidRuntime(6298): at android.view.View.layout(View.java:11338) 10-09 11:51:52.561: E/AndroidRuntime(6298): at android.view.ViewGroup.layout(ViewGroup.java:4238) 10-09 11:51:52.561: E/AndroidRuntime(6298): at android.widget.LinearLayout.setChildFrame(LinearLayout.java:1644) 10-09 11:51:52.561: E/AndroidRuntime(6298): at android.widget.LinearLayout.layoutVertical(LinearLayout.java:1502) 10-09 11:51:52.561: E/AndroidRuntime(6298): at android.widget.LinearLayout.onLayout(LinearLayout.java:1415) 10-09 11:51:52.561: E/AndroidRuntime(6298): at android.view.View.layout(View.java:11338) 10-09 11:51:52.561: E/AndroidRuntime(6298): at android.view.ViewGroup.layout(ViewGroup.java:4238) 10-09 11:51:52.561: E/AndroidRuntime(6298): at android.widget.FrameLayout.onLayout(FrameLayout.java:431) 10-09 11:51:52.561: E/AndroidRuntime(6298): at android.view.View.layout(View.java:11338) 10-09 11:51:52.561: E/AndroidRuntime(6298): at android.view.ViewGroup.layout(ViewGroup.java:4238) 10-09 11:51:52.561: E/AndroidRuntime(6298): at android.view.ViewRootImpl.performTraversals(ViewRootImpl.java:1667) 10-09 11:51:52.561: E/AndroidRuntime(6298): at android.view.ViewRootImpl.handleMessage(ViewRootImpl.java:2624) 10-09 11:51:52.561: E/AndroidRuntime(6298): at android.os.Handler.dispatchMessage(Handler.java:99) 10-09 11:51:52.561: E/AndroidRuntime(6298): at android.os.Looper.loop(Looper.java:137) 10-09 11:51:52.561: E/AndroidRuntime(6298): at android.app.ActivityThread.main(ActivityThread.java:4517) 10-09 11:51:52.561: E/AndroidRuntime(6298): at java.lang.reflect.Method.invokeNative(Native Method) 10-09 11:51:52.561: E/AndroidRuntime(6298): at java.lang.reflect.Method.invoke(Method.java:511) 10-09 11:51:52.561: E/AndroidRuntime(6298): at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:980) 10-09 11:51:52.561: E/AndroidRuntime(6298): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:747) 10-09 11:51:52.561: E/AndroidRuntime(6298): at dalvik.system.NativeStart.main(Native Method) {code} Steps: 1. Run the following code: {code} var data = []; var win = Ti.UI.createWindow(); var row = Ti.UI.createTableViewRow({className:'scrolltab',height:67,backgroundColor:'#fff',selectionStyle:Ti.UI.iPhone.TableViewCellSelectionStyle.NONE}); var scrollView = Titanium.UI.createScrollView({ contentWidth:500, contentHeight:50, top:10, height:50, width:230, borderRadius:10, backgroundColor:'#13386c' }); row.add(scrollView); var view1 = Ti.UI.createView({ backgroundColor:'#336699', width:440, height:40, left:10 }); scrollView.add(view1); // add a bunch more views to the scrollView data.push(row); feedTableView = Titanium.UI.createTableView({ data:data }); win.add(feedTableView); win.open(); {code} Expected result: The app shouldn't crash Actual result: The app crashes

    Appcelerator JIRA | 4 years ago | Tamila Smolich
    java.lang.NullPointerException
  2. 0

    Description: The app crashes on launch. This is a regression, does not occur on 2.1.3. Log output: {code} 10-09 11:51:52.531: E/TiApplication(6298): (main) [11210,11210] Sending event: exception on thread: main msg:java.lang.NullPointerException; Titanium 3.0.0,2012/10/09 03:42,33c586f 10-09 11:51:52.531: E/TiApplication(6298): java.lang.NullPointerException 10-09 11:51:52.531: E/TiApplication(6298): at ti.modules.titanium.ui.widget.tableview.TiTableViewRowProxyItem.createControls(TiTableViewRowProxyItem.java:151) 10-09 11:51:52.531: E/TiApplication(6298): at ti.modules.titanium.ui.widget.tableview.TiTableViewRowProxyItem.setRowData(TiTableViewRowProxyItem.java:286) 10-09 11:51:52.531: E/TiApplication(6298): at ti.modules.titanium.ui.widget.tableview.TiTableViewRowProxyItem.setRowData(TiTableViewRowProxyItem.java:81) 10-09 11:51:52.531: E/TiApplication(6298): at ti.modules.titanium.ui.widget.tableview.TiTableView$TTVListAdapter.getView(TiTableView.java:226) 10-09 11:51:52.531: E/TiApplication(6298): at android.widget.AbsListView.obtainView(AbsListView.java:2451) 10-09 11:51:52.531: E/TiApplication(6298): at android.widget.ListView.makeAndAddView(ListView.java:1780) 10-09 11:51:52.531: E/TiApplication(6298): at android.widget.ListView.fillDown(ListView.java:678) 10-09 11:51:52.531: E/TiApplication(6298): at android.widget.ListView.fillFromTop(ListView.java:738) 10-09 11:51:52.531: E/TiApplication(6298): at android.widget.ListView.layoutChildren(ListView.java:1631) 10-09 11:51:52.531: E/TiApplication(6298): at android.widget.AbsListView.onLayout(AbsListView.java:2281) 10-09 11:51:52.531: E/TiApplication(6298): at android.view.View.layout(View.java:11338) 10-09 11:51:52.531: E/TiApplication(6298): at android.view.ViewGroup.layout(ViewGroup.java:4238) 10-09 11:51:52.531: E/TiApplication(6298): at android.widget.FrameLayout.onLayout(FrameLayout.java:431) 10-09 11:51:52.531: E/TiApplication(6298): at ti.modules.titanium.ui.widget.tableview.TiTableView.onLayout(TiTableView.java:555) 10-09 11:51:52.531: E/TiApplication(6298): at android.view.View.layout(View.java:11338) 10-09 11:51:52.531: E/TiApplication(6298): at android.view.ViewGroup.layout(ViewGroup.java:4238) 10-09 11:51:52.531: E/TiApplication(6298): at org.appcelerator.titanium.view.TiCompositeLayout.onLayout(TiCompositeLayout.java:583) 10-09 11:51:52.531: E/TiApplication(6298): at android.view.View.layout(View.java:11338) 10-09 11:51:52.531: E/TiApplication(6298): at android.view.ViewGroup.layout(ViewGroup.java:4238) 10-09 11:51:52.531: E/TiApplication(6298): at org.appcelerator.titanium.view.TiCompositeLayout.onLayout(TiCompositeLayout.java:583) 10-09 11:51:52.531: E/TiApplication(6298): at android.view.View.layout(View.java:11338) 10-09 11:51:52.531: E/TiApplication(6298): at android.view.ViewGroup.layout(ViewGroup.java:4238) 10-09 11:51:52.531: E/TiApplication(6298): at android.widget.FrameLayout.onLayout(FrameLayout.java:431) 10-09 11:51:52.531: E/TiApplication(6298): at android.view.View.layout(View.java:11338) 10-09 11:51:52.531: E/TiApplication(6298): at android.view.ViewGroup.layout(ViewGroup.java:4238) 10-09 11:51:52.531: E/TiApplication(6298): at android.widget.LinearLayout.setChildFrame(LinearLayout.java:1644) 10-09 11:51:52.531: E/TiApplication(6298): at android.widget.LinearLayout.layoutVertical(LinearLayout.java:1502) 10-09 11:51:52.531: E/TiApplication(6298): at android.widget.LinearLayout.onLayout(LinearLayout.java:1415) 10-09 11:51:52.531: E/TiApplication(6298): at android.view.View.layout(View.java:11338) 10-09 11:51:52.531: E/TiApplication(6298): at android.view.ViewGroup.layout(ViewGroup.java:4238) 10-09 11:51:52.531: E/TiApplication(6298): at android.widget.FrameLayout.onLayout(FrameLayout.java:431) 10-09 11:51:52.531: E/TiApplication(6298): at android.view.View.layout(View.java:11338) 10-09 11:51:52.531: E/TiApplication(6298): at android.view.ViewGroup.layout(ViewGroup.java:4238) 10-09 11:51:52.531: E/TiApplication(6298): at android.view.ViewRootImpl.performTraversals(ViewRootImpl.java:1667) 10-09 11:51:52.531: E/TiApplication(6298): at android.view.ViewRootImpl.handleMessage(ViewRootImpl.java:2624) 10-09 11:51:52.531: E/TiApplication(6298): at android.os.Handler.dispatchMessage(Handler.java:99) 10-09 11:51:52.531: E/TiApplication(6298): at android.os.Looper.loop(Looper.java:137) 10-09 11:51:52.531: E/TiApplication(6298): at android.app.ActivityThread.main(ActivityThread.java:4517) 10-09 11:51:52.531: E/TiApplication(6298): at java.lang.reflect.Method.invokeNative(Native Method) 10-09 11:51:52.531: E/TiApplication(6298): at java.lang.reflect.Method.invoke(Method.java:511) 10-09 11:51:52.531: E/TiApplication(6298): at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:980) 10-09 11:51:52.531: E/TiApplication(6298): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:747) 10-09 11:51:52.531: E/TiApplication(6298): at dalvik.system.NativeStart.main(Native Method) 10-09 11:51:52.561: E/AndroidRuntime(6298): FATAL EXCEPTION: main 10-09 11:51:52.561: E/AndroidRuntime(6298): java.lang.NullPointerException 10-09 11:51:52.561: E/AndroidRuntime(6298): at ti.modules.titanium.ui.widget.tableview.TiTableViewRowProxyItem.createControls(TiTableViewRowProxyItem.java:151) 10-09 11:51:52.561: E/AndroidRuntime(6298): at ti.modules.titanium.ui.widget.tableview.TiTableViewRowProxyItem.setRowData(TiTableViewRowProxyItem.java:286) 10-09 11:51:52.561: E/AndroidRuntime(6298): at ti.modules.titanium.ui.widget.tableview.TiTableViewRowProxyItem.setRowData(TiTableViewRowProxyItem.java:81) 10-09 11:51:52.561: E/AndroidRuntime(6298): at ti.modules.titanium.ui.widget.tableview.TiTableView$TTVListAdapter.getView(TiTableView.java:226) 10-09 11:51:52.561: E/AndroidRuntime(6298): at android.widget.AbsListView.obtainView(AbsListView.java:2451) 10-09 11:51:52.561: E/AndroidRuntime(6298): at android.widget.ListView.makeAndAddView(ListView.java:1780) 10-09 11:51:52.561: E/AndroidRuntime(6298): at android.widget.ListView.fillDown(ListView.java:678) 10-09 11:51:52.561: E/AndroidRuntime(6298): at android.widget.ListView.fillFromTop(ListView.java:738) 10-09 11:51:52.561: E/AndroidRuntime(6298): at android.widget.ListView.layoutChildren(ListView.java:1631) 10-09 11:51:52.561: E/AndroidRuntime(6298): at android.widget.AbsListView.onLayout(AbsListView.java:2281) 10-09 11:51:52.561: E/AndroidRuntime(6298): at android.view.View.layout(View.java:11338) 10-09 11:51:52.561: E/AndroidRuntime(6298): at android.view.ViewGroup.layout(ViewGroup.java:4238) 10-09 11:51:52.561: E/AndroidRuntime(6298): at android.widget.FrameLayout.onLayout(FrameLayout.java:431) 10-09 11:51:52.561: E/AndroidRuntime(6298): at ti.modules.titanium.ui.widget.tableview.TiTableView.onLayout(TiTableView.java:555) 10-09 11:51:52.561: E/AndroidRuntime(6298): at android.view.View.layout(View.java:11338) 10-09 11:51:52.561: E/AndroidRuntime(6298): at android.view.ViewGroup.layout(ViewGroup.java:4238) 10-09 11:51:52.561: E/AndroidRuntime(6298): at org.appcelerator.titanium.view.TiCompositeLayout.onLayout(TiCompositeLayout.java:583) 10-09 11:51:52.561: E/AndroidRuntime(6298): at android.view.View.layout(View.java:11338) 10-09 11:51:52.561: E/AndroidRuntime(6298): at android.view.ViewGroup.layout(ViewGroup.java:4238) 10-09 11:51:52.561: E/AndroidRuntime(6298): at org.appcelerator.titanium.view.TiCompositeLayout.onLayout(TiCompositeLayout.java:583) 10-09 11:51:52.561: E/AndroidRuntime(6298): at android.view.View.layout(View.java:11338) 10-09 11:51:52.561: E/AndroidRuntime(6298): at android.view.ViewGroup.layout(ViewGroup.java:4238) 10-09 11:51:52.561: E/AndroidRuntime(6298): at android.widget.FrameLayout.onLayout(FrameLayout.java:431) 10-09 11:51:52.561: E/AndroidRuntime(6298): at android.view.View.layout(View.java:11338) 10-09 11:51:52.561: E/AndroidRuntime(6298): at android.view.ViewGroup.layout(ViewGroup.java:4238) 10-09 11:51:52.561: E/AndroidRuntime(6298): at android.widget.LinearLayout.setChildFrame(LinearLayout.java:1644) 10-09 11:51:52.561: E/AndroidRuntime(6298): at android.widget.LinearLayout.layoutVertical(LinearLayout.java:1502) 10-09 11:51:52.561: E/AndroidRuntime(6298): at android.widget.LinearLayout.onLayout(LinearLayout.java:1415) 10-09 11:51:52.561: E/AndroidRuntime(6298): at android.view.View.layout(View.java:11338) 10-09 11:51:52.561: E/AndroidRuntime(6298): at android.view.ViewGroup.layout(ViewGroup.java:4238) 10-09 11:51:52.561: E/AndroidRuntime(6298): at android.widget.FrameLayout.onLayout(FrameLayout.java:431) 10-09 11:51:52.561: E/AndroidRuntime(6298): at android.view.View.layout(View.java:11338) 10-09 11:51:52.561: E/AndroidRuntime(6298): at android.view.ViewGroup.layout(ViewGroup.java:4238) 10-09 11:51:52.561: E/AndroidRuntime(6298): at android.view.ViewRootImpl.performTraversals(ViewRootImpl.java:1667) 10-09 11:51:52.561: E/AndroidRuntime(6298): at android.view.ViewRootImpl.handleMessage(ViewRootImpl.java:2624) 10-09 11:51:52.561: E/AndroidRuntime(6298): at android.os.Handler.dispatchMessage(Handler.java:99) 10-09 11:51:52.561: E/AndroidRuntime(6298): at android.os.Looper.loop(Looper.java:137) 10-09 11:51:52.561: E/AndroidRuntime(6298): at android.app.ActivityThread.main(ActivityThread.java:4517) 10-09 11:51:52.561: E/AndroidRuntime(6298): at java.lang.reflect.Method.invokeNative(Native Method) 10-09 11:51:52.561: E/AndroidRuntime(6298): at java.lang.reflect.Method.invoke(Method.java:511) 10-09 11:51:52.561: E/AndroidRuntime(6298): at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:980) 10-09 11:51:52.561: E/AndroidRuntime(6298): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:747) 10-09 11:51:52.561: E/AndroidRuntime(6298): at dalvik.system.NativeStart.main(Native Method) {code} Steps: 1. Run the following code: {code} var data = []; var win = Ti.UI.createWindow(); var row = Ti.UI.createTableViewRow({className:'scrolltab',height:67,backgroundColor:'#fff',selectionStyle:Ti.UI.iPhone.TableViewCellSelectionStyle.NONE}); var scrollView = Titanium.UI.createScrollView({ contentWidth:500, contentHeight:50, top:10, height:50, width:230, borderRadius:10, backgroundColor:'#13386c' }); row.add(scrollView); var view1 = Ti.UI.createView({ backgroundColor:'#336699', width:440, height:40, left:10 }); scrollView.add(view1); // add a bunch more views to the scrollView data.push(row); feedTableView = Titanium.UI.createTableView({ data:data }); win.add(feedTableView); win.open(); {code} Expected result: The app shouldn't crash Actual result: The app crashes

    Appcelerator JIRA | 4 years ago | Tamila Smolich
    java.lang.NullPointerException
  3. 0

    h6.Problem Setting the backgroundImage property of a TableViewRow to null crashes the app with a NullPointerException/force close. Setting backgroundImage to an empty string locks up the app (which will eventually crash if you keep clicking or try to back out). h6.Rationale This is a problem because we have the need to apply a background image to a row, and then at some point later remove that background image completely. h6.Tested on Droid Razr 2.3.5 Android 2.2 emulator h6.Runtime engines V8/Rhino h6.Reproduction steps 1. Drop the following app.js code into a new project - initially, the row has no background image (property no specified) 2. click the row once...a background image appears (and the caption changes) 3. click the row again...a Force Close messaage appears on the screen, and a NullPointerException appears in the console if you repeat the test with the "1st test" line commented out and the "2nd test" line uncommented, the app will freeze (nothing new appears in the console window) and then crash if you click the row again or try to "back" out. h6.Repro sequence {code} var win1 = Ti.UI.createWindow({ backgroundColor:'black' }); var TheListBox=Ti.UI.createTableView({width:'auto'}); var BIRow=Ti.UI.createTableViewRow({color:'white', title:'No background image...click to toggle'}); TheListBox.appendRow(BIRow); win1.open(); win1.add(TheListBox); BIRow.addEventListener('click',ToggleBI); function ToggleBI() { if (!BIRow.backgroundImage) { BIRow.backgroundImage='appicon.png'; BIRow.title='Titanium background image...click to toggle'; } else { BIRow.backgroundImage=null; // 1st test...NullPointerException //BIRow.backgroundImage=''; // 2nd test...lockup/freeze...crash on next click BIRow.title='No background image...click to toggle'; } } {code} h6.Console output {noformat} cation: (main) [34,34] Titanium 1.8.1 (2012/01/27 17:31 a24502a) 03-31 22:59:19.411 5847 5847 I TiApplication: (main) [52,86] Titanium Javascript runtime: v8 03-31 22:59:19.411 5847 5855 D dalvikvm: Trying to load lib /data/data/com.appcelerator.test/lib/libstlport_shared.so 0x4051cf58 03-31 22:59:19.411 5847 5855 D dalvikvm: Added shared lib /data/data/com.appcelerator.test/lib/libstlport_shared.so 0x4051cf58 03-31 22:59:19.411 5847 5855 D dalvikvm: No JNI_OnLoad found in /data/data/com.appcelerator.test/lib/libstlport_shared.so 0x4051cf58, skipping init 03-31 22:59:19.411 5847 5855 D dalvikvm: Trying to load lib /data/data/com.appcelerator.test/lib/libkroll-v8.so 0x4051cf58 03-31 22:59:19.419 5847 5855 D dalvikvm: Added shared lib /data/data/com.appcelerator.test/lib/libkroll-v8.so 0x4051cf58 03-31 22:59:19.442 5847 5847 W TiApplication: (main) [38,124] activity stack is emtpy, unable to get current activity 03-31 22:59:19.442 5847 5847 I TiRootActivity: (main) [0,0] checkpoint, on root activity create, savedInstanceState: null 03-31 22:59:19.513 5847 5847 W TiApplication: (main) [70,70] activity stack is emtpy, unable to get current activity 03-31 22:59:19.513 5847 5847 W TiApplication: (main) [1,71] activity stack is emtpy, unable to get current activity 03-31 22:59:19.513 5847 5847 W TiApplication: (main) [0,71] activity stack is emtpy, unable to get current activity 03-31 22:59:19.716 5847 5855 E TiApplication: (KrollRuntimeThread) [201,272] APP PROXY: ti.modules.titanium.app.AppModule@405ac7e0 03-31 22:59:19.864 5847 5847 D dalvikvm: GC_EXTERNAL_ALLOC freed 490K, 45% free 3304K/5959K, external 2741K/2773K, paused 36ms 03-31 22:59:19.911 5847 5847 I TiRootActivity: (main) [0,0] checkpoint, on root activity resume. activity = com.appcelerator.test._1bestpracticesActivity@40594d48 03-31 22:59:19.942 509 722 W InputManagerService: Starting input on non-focused client com.android.internal.view.IInputMethodClient$Stub$Proxy@4092bfd8 (uid=10035 pid=890) 03-31 22:59:19.950 509 801 I gralloc : Allocated 0x660072 size 6488161 03-31 22:59:19.997 509 604 I ActivityManager: Displayed com.appcelerator.test/._1bestpracticesActivity: +743ms 03-31 22:59:21.122 509 509 I gralloc : Allocated 0x660072 size 6488161 03-31 22:59:23.349 509 603 I AlarmManager: sending alarm Alarm{4067a338 type 0 com.android.vending} 03-31 22:59:23.771 1836 1838 D dalvikvm: GC_CONCURRENT freed 149K, 45% free 4022K/7239K, external 2357K/2773K, paused 1ms+1ms 03-31 22:59:23.825 1836 1836 D Finsky : [1] 5.onFinished: Installation state replication succeeded. 03-31 22:59:24.458 509 603 I AlarmManager: sending alarm Alarm{40bd1650 type 0 com.google.android.gsf} 03-31 22:59:24.481 897 4041 I EventLogService: Aggregate from 1333254564412 (log), 1333254564412 (data) 03-31 22:59:25.872 509 600 D BatteryTempPolicy: updateBatteryTemp temperature = 310, Threshhold = 3 03-31 22:59:25.880 258 495 E NetlinkListener: ignoring non-kernel netlink multicast message 03-31 22:59:25.880 256 283 E NetlinkListener: ignoring non-kernel netlink multicast message 03-31 22:59:25.880 254 291 E NetlinkListener: ignoring non-kernel netlink multicast message 03-31 22:59:25.880 258 584 E NetlinkListener: ignoring non-kernel netlink multicast message 03-31 22:59:25.911 664 664 D StatusBarPolicy: handleBatteryUpdate 03-31 22:59:30.997 890 890 D dalvikvm: GC_EXPLICIT freed 527K, 49% free 4499K/8775K, external 8803K/10851K, paused 76ms 03-31 22:59:36.005 2207 2207 D dalvikvm: GC_EXPLICIT freed 15K, 38% free 4178K/6663K, external 2357K/2773K, paused 75ms 03-31 22:59:40.989 2281 2281 D dalvikvm: GC_EXPLICIT freed 8K, 44% free 3173K/5575K, external 2357K/2773K, paused 57ms 03-31 22:59:46.005 2082 2082 D dalvikvm: GC_EXPLICIT freed 299K, 42% free 3443K/5895K, external 2357K/2773K, paused 72ms 03-31 22:59:49.552 5847 5886 W TiAnalyticsSvc: (Thread-13) [29641,29641] Analytics Service Started 03-31 22:59:49.575 5847 5886 I TiAnalyticsSvc: (Thread-13) [26,29667] Network unavailable, can't send analytics 03-31 22:59:49.575 5847 5886 W TiAnalyticsSvc: (Thread-13) [0,29667] Stopping Analytics Service 03-31 22:59:54.606 4351 4351 D dalvikvm: GC_EXPLICIT freed 11K, 42% free 3131K/5379K, external 2357K/2773K, paused 58ms 03-31 22:59:59.630 2191 2191 D dalvikvm: GC_EXPLICIT freed 163K, 47% free 4043K/7559K, external 2357K/2773K, paused 78ms 03-31 22:59:59.997 509 603 I AlarmManager: sending alarm Alarm{40d99778 type 1 android} 03-31 23:00:05.075 2216 2216 D dalvikvm: GC_EXPLICIT freed 17K, 44% free 3042K/5379K, external 2357K/2773K, paused 24ms 03-31 23:00:10.099 2226 2226 D dalvikvm: GC_EXPLICIT freed 6K, 44% free 3022K/5379K, external 2357K/2773K, paused 42ms 03-31 23:00:10.552 5847 5855 W TypeConverter: jsValueToJavaObject returning null 03-31 23:00:10.552 5847 5847 D AndroidRuntime: Shutting down VM 03-31 23:00:10.552 5847 5847 W dalvikvm: threadid=1: thread exiting with uncaught exception (group=0x4001e560) 03-31 23:00:10.560 5847 5847 E TiApplication: (main) [20975,50642] Sending event: exception on thread: main msg:java.lang.NullPointerException; Titanium 1.8.1,2012/01/27 17:31,a24502a 03-31 23:00:10.560 5847 5847 E TiApplication: java.lang.NullPointerException 03-31 23:00:10.560 5847 5847 E TiApplication: at ti.modules.titanium.ui.widget.tableview.TiBaseTableViewItem.setBackgroundFromProxy(TiBaseTableViewItem.java:182) 03-31 23:00:10.560 5847 5847 E TiApplication: at ti.modules.titanium.ui.widget.tableview.TiTableViewRowProxyItem.setRowData(TiTableViewRowProxyItem.java:213) 03-31 23:00:10.560 5847 5847 E TiApplication: at ti.modules.titanium.ui.widget.tableview.TiTableViewRowProxyItem.setRowData(TiTableViewRowProxyItem.java:84) 03-31 23:00:10.560 5847 5847 E TiApplication: at ti.modules.titanium.ui.widget.tableview.TiTableView$TTVListAdapter.getView(TiTableView.java:210) 03-31 23:00:10.560 5847 5847 E TiApplication: at android.widget.AbsListView.obtainView(AbsListView.java:1435) 03-31 23:00:10.560 5847 5847 E TiApplication: at android.widget.ListView.makeAndAddView(ListView.java:1824) 03-31 23:00:10.560 5847 5847 E TiApplication: at android.widget.ListView.fillSpecific(ListView.java:1365) 03-31 23:00:10.560 5847 5847 E TiApplication: at android.widget.ListView.layoutChildren(ListView.java:1651) 03-31 23:00:10.560 5847 5847 E TiApplication: at android.widget.AbsListView.onLayout(AbsListView.java:1286) 03-31 23:00:10.560 5847 5847 E TiApplication: at android.view.View.layout(View.java:7184) 03-31 23:00:10.560 5847 5847 E TiApplication: at android.widget.FrameLayout.onLayout(FrameLayout.java:338) 03-31 23:00:10.560 5847 5847 E TiApplication: at android.view.View.layout(View.java:7184) 03-31 23:00:10.560 5847 5847 E TiApplication: at org.appcelerator.titanium.view.TiCompositeLayout.onLayout(TiCompositeLayout.java:382) 03-31 23:00:10.560 5847 5847 E TiApplication: at android.view.View.layout(View.java:7184) 03-31 23:00:10.560 5847 5847 E TiApplication: at org.appcelerator.titanium.view.TiCompositeLayout.onLayout(TiCompositeLayout.java:382) 03-31 23:00:10.560 5847 5847 E TiApplication: at android.view.View.layout(View.java:7184) 03-31 23:00:10.560 5847 5847 E TiApplication: at android.widget.FrameLayout.onLayout(FrameLayout.java:338) 03-31 23:00:10.560 5847 5847 E TiApplication: at android.view.View.layout(View.java:7184) 03-31 23:00:10.560 5847 5847 E TiApplication: at android.widget.LinearLayout.setChildFrame(LinearLayout.java:1254) 03-31 23:00:10.560 5847 5847 E TiApplication: at android.widget.LinearLayout.layoutVertical(LinearLayout.java:1130) 03-31 23:00:10.560 5847 5847 E TiApplication: at android.widget.LinearLayout.onLayout(LinearLayout.java:1047) 03-31 23:00:10.560 5847 5847 E TiApplication: at android.view.View.layout(View.java:7184) 03-31 23:00:10.560 5847 5847 E TiApplication: at android.widget.FrameLayout.onLayout(FrameLayout.java:338) 03-31 23:00:10.560 5847 5847 E TiApplication: at android.view.View.layout(View.java:7184) 03-31 23:00:10.560 5847 5847 E TiApplication: at android.view.ViewRoot.performTraversals(ViewRoot.java:1180) 03-31 23:00:10.560 5847 5847 E TiApplication: at android.view.ViewRoot.handleMessage(ViewRoot.java:1914) 03-31 23:00:10.560 5847 5847 E TiApplication: at android.os.Handler.dispatchMessage(Handler.java:99) 03-31 23:00:10.560 5847 5847 E TiApplication: at android.os.Looper.loop(Looper.java:130) 03-31 23:00:10.560 5847 5847 E TiApplication: at android.app.ActivityThread.main(ActivityThread.java:3859) 03-31 23:00:10.560 5847 5847 E TiApplication: at java.lang.reflect.Method.invokeNative(Native Method) 03-31 23:00:10.560 5847 5847 E TiApplication: at java.lang.reflect.Method.invoke(Method.java:507) 03-31 23:00:10.560 5847 5847 E TiApplication: at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:840) 03-31 23:00:10.560 5847 5847 E TiApplication: at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:598) 03-31 23:00:10.560 5847 5847 E TiApplication: at dalvik.system.NativeStart.main(Native Method) 03-31 23:00:10.591 5847 5847 E AndroidRuntime: FATAL EXCEPTION: main 03-31 23:00:10.591 5847 5847 E AndroidRuntime: java.lang.NullPointerException 03-31 23:00:10.591 5847 5847 E AndroidRuntime: at ti.modules.titanium.ui.widget.tableview.TiBaseTableViewItem.setBackgroundFromProxy(TiBaseTableViewItem.java:182) 03-31 23:00:10.591 5847 5847 E AndroidRuntime: at ti.modules.titanium.ui.widget.tableview.TiTableViewRowProxyItem.setRowData(TiTableViewRowProxyItem.java:213) 03-31 23:00:10.591 5847 5847 E AndroidRuntime: at ti.modules.titanium.ui.widget.tableview.TiTableViewRowProxyItem.setRowData(TiTableViewRowProxyItem.java:84) 03-31 23:00:10.591 5847 5847 E AndroidRuntime: at ti.modules.titanium.ui.widget.tableview.TiTableView$TTVListAdapter.getView(TiTableView.java:210) 03-31 23:00:10.591 5847 5847 E AndroidRuntime: at android.widget.AbsListView.obtainView(AbsListView.java:1435) 03-31 23:00:10.591 5847 5847 E AndroidRuntime: at android.widget.ListView.makeAndAddView(ListView.java:1824) 03-31 23:00:10.591 5847 5847 E AndroidRuntime: at android.widget.ListView.fillSpecific(ListView.java:1365) 03-31 23:00:10.591 5847 5847 E AndroidRuntime: at android.widget.ListView.layoutChildren(ListView.java:1651) 03-31 23:00:10.591 5847 5847 E AndroidRuntime: at android.widget.AbsListView.onLayout(AbsListView.java:1286) 03-31 23:00:10.591 5847 5847 E AndroidRuntime: at android.view.View.layout(View.java:7184) 03-31 23:00:10.591 5847 5847 E AndroidRuntime: at android.widget.FrameLayout.onLayout(FrameLayout.java:338) 03-31 23:00:10.591 5847 5847 E AndroidRuntime: at android.view.View.layout(View.java:7184) 03-31 23:00:10.591 5847 5847 E AndroidRuntime: at org.appcelerator.titanium.view.TiCompositeLayout.onLayout(TiCompositeLayout.java:382) 03-31 23:00:10.591 5847 5847 E AndroidRuntime: at android.view.View.layout(View.java:7184) 03-31 23:00:10.591 5847 5847 E AndroidRuntime: at org.appcelerator.titanium.view.TiCompositeLayout.onLayout(TiCompositeLayout.java:382) 03-31 23:00:10.591 5847 5847 E AndroidRuntime: at android.view.View.layout(View.java:7184) 03-31 23:00:10.591 5847 5847 E AndroidRuntime: at android.widget.FrameLayout.onLayout(FrameLayout.java:338) 03-31 23:00:10.591 5847 5847 E AndroidRuntime: at android.view.View.layout(View.java:7184) 03-31 23:00:10.591 5847 5847 E AndroidRuntime: at android.widget.LinearLayout.setChildFrame(LinearLayout.java:1254) 03-31 23:00:10.591 5847 5847 E AndroidRuntime: at android.widget.LinearLayout.layoutVertical(LinearLayout.java:1130) 03-31 23:00:10.591 5847 5847 E AndroidRuntime: at android.widget.LinearLayout.onLayout(LinearLayout.java:1047) 03-31 23:00:10.591 5847 5847 E AndroidRuntime: at android.view.View.layout(View.java:7184) 03-31 23:00:10.591 5847 5847 E AndroidRuntime: at android.widget.FrameLayout.onLayout(FrameLayout.java:338) 03-31 23:00:10.591 5847 5847 E AndroidRuntime: at android.view.View.layout(View.java:7184) 03-31 23:00:10.591 5847 5847 E AndroidRuntime: at android.view.ViewRoot.performTraversals(ViewRoot.java:1180) 03-31 23:00:10.591 5847 5847 E AndroidRuntime: at android.view.ViewRoot.handleMessage(ViewRoot.java:1914) 03-31 23:00:10.591 5847 5847 E AndroidRuntime: at android.os.Handler.dispatchMessage(Handler.java:99) 03-31 23:00:10.591 5847 5847 E AndroidRuntime: at android.os.Looper.loop(Looper.java:130) 03-31 23:00:10.591 5847 5847 E AndroidRuntime: at android.app.ActivityThread.main(ActivityThread.java:3859) 03-31 23:00:10.591 5847 5847 E AndroidRuntime: at java.lang.reflect.Method.invokeNative(Native Method) 03-31 23:00:10.591 5847 5847 E AndroidRuntime: at java.lang.reflect.Method.invoke(Method.java:507) 03-31 23:00:10.591 5847 5847 E AndroidRuntime: at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:840) 03-31 23:00:10.591 5847 5847 E AndroidRuntime: at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:598) 03-31 23:00:10.591 5847 5847 E AndroidRuntime: at dalvik.system.NativeStart.main(Native Method) 03-31 23:00:10.599 509 783 W ActivityManager: Force finishing activity com.appcelerator.test/._1bestpracticesActivity 03-31 23:00:10.708 509 526 D dalvikvm: GC_EXTERNAL_ALLOC freed 1343K, 36% free 9055K/14023K, external 10065K/10188K, paused 85ms 03-31 23:00:10.724 509 526 W ApplicationContext: Unable to create files directory 03-31 23:00:10.747 509 526 I gralloc : Allocated 0x61663d64 size 2103800684 03-31 23:00:11.099 509 524 W ActivityManager: Activity pause timeout for HistoryRecord{40a2c3d8 com.appcelerator.test/._1bestpracticesActivity} 03-31 23:00:11.099 509 524 I ActivityManager: No longer want amep.games.af_final:remote (pid 4351): hidden #21 03-31 23:00:11.122 890 890 D ActivitityRenderTarget: onResume 03-31 23:00:11.177 890 5830 W IMGSRV : eglglue.c:778: InitContext: ignoring buffer type CBUF_TYPE_PDS_VERT_SECONDARY_PREGEN_BUFFER 03-31 23:00:11.192 509 515 I gralloc : Allocated 0x660072 size 6488161 03-31 23:00:11.294 509 873 I gralloc : Allocated 0x660072 size 6488161 03-31 23:00:11.349 509 722 I gralloc : Allocated 0x660072 size 6488161 03-31 23:00:11.356 509 820 W ActivityManager: Scheduling restart of crashed service amep.games.af_final/com.appenda.AppNotify in 5000ms 03-31 23:00:11.599 509 524 I ActivityManager: No longer want com.motorola.im.service (pid 4333): hidden #21 03-31 23:00:11.622 509 827 W ActivityManager: Scheduling restart of crashed service com.motorola.im/.service.RemoteImService in 14734ms 03-31 23:00:11.731 509 526 I gralloc : Allocated 0x61663d64 size 2103800684 {noformat} h6.API docs http://developer.appcelerator.com/apidoc/mobile/latest/Titanium.UI.TableViewRow.backgroundImage-property.html

    Appcelerator JIRA | 5 years ago | Shawn Lipscomb
    java.lang.NullPointerException
  4. Speed up your debug routine!

    Automated exception search integrated into your IDE

  5. 0

    h6.Problem Setting the backgroundImage property of a TableViewRow to null crashes the app with a NullPointerException/force close. Setting backgroundImage to an empty string locks up the app (which will eventually crash if you keep clicking or try to back out). h6.Rationale This is a problem because we have the need to apply a background image to a row, and then at some point later remove that background image completely. h6.Tested on Droid Razr 2.3.5 Android 2.2 emulator h6.Runtime engines V8/Rhino h6.Reproduction steps 1. Drop the following app.js code into a new project - initially, the row has no background image (property no specified) 2. click the row once...a background image appears (and the caption changes) 3. click the row again...a Force Close messaage appears on the screen, and a NullPointerException appears in the console if you repeat the test with the "1st test" line commented out and the "2nd test" line uncommented, the app will freeze (nothing new appears in the console window) and then crash if you click the row again or try to "back" out. h6.Repro sequence {code} var win1 = Ti.UI.createWindow({ backgroundColor:'black' }); var TheListBox=Ti.UI.createTableView({width:'auto'}); var BIRow=Ti.UI.createTableViewRow({color:'white', title:'No background image...click to toggle'}); TheListBox.appendRow(BIRow); win1.open(); win1.add(TheListBox); BIRow.addEventListener('click',ToggleBI); function ToggleBI() { if (!BIRow.backgroundImage) { BIRow.backgroundImage='appicon.png'; BIRow.title='Titanium background image...click to toggle'; } else { BIRow.backgroundImage=null; // 1st test...NullPointerException //BIRow.backgroundImage=''; // 2nd test...lockup/freeze...crash on next click BIRow.title='No background image...click to toggle'; } } {code} h6.Console output {noformat} cation: (main) [34,34] Titanium 1.8.1 (2012/01/27 17:31 a24502a) 03-31 22:59:19.411 5847 5847 I TiApplication: (main) [52,86] Titanium Javascript runtime: v8 03-31 22:59:19.411 5847 5855 D dalvikvm: Trying to load lib /data/data/com.appcelerator.test/lib/libstlport_shared.so 0x4051cf58 03-31 22:59:19.411 5847 5855 D dalvikvm: Added shared lib /data/data/com.appcelerator.test/lib/libstlport_shared.so 0x4051cf58 03-31 22:59:19.411 5847 5855 D dalvikvm: No JNI_OnLoad found in /data/data/com.appcelerator.test/lib/libstlport_shared.so 0x4051cf58, skipping init 03-31 22:59:19.411 5847 5855 D dalvikvm: Trying to load lib /data/data/com.appcelerator.test/lib/libkroll-v8.so 0x4051cf58 03-31 22:59:19.419 5847 5855 D dalvikvm: Added shared lib /data/data/com.appcelerator.test/lib/libkroll-v8.so 0x4051cf58 03-31 22:59:19.442 5847 5847 W TiApplication: (main) [38,124] activity stack is emtpy, unable to get current activity 03-31 22:59:19.442 5847 5847 I TiRootActivity: (main) [0,0] checkpoint, on root activity create, savedInstanceState: null 03-31 22:59:19.513 5847 5847 W TiApplication: (main) [70,70] activity stack is emtpy, unable to get current activity 03-31 22:59:19.513 5847 5847 W TiApplication: (main) [1,71] activity stack is emtpy, unable to get current activity 03-31 22:59:19.513 5847 5847 W TiApplication: (main) [0,71] activity stack is emtpy, unable to get current activity 03-31 22:59:19.716 5847 5855 E TiApplication: (KrollRuntimeThread) [201,272] APP PROXY: ti.modules.titanium.app.AppModule@405ac7e0 03-31 22:59:19.864 5847 5847 D dalvikvm: GC_EXTERNAL_ALLOC freed 490K, 45% free 3304K/5959K, external 2741K/2773K, paused 36ms 03-31 22:59:19.911 5847 5847 I TiRootActivity: (main) [0,0] checkpoint, on root activity resume. activity = com.appcelerator.test._1bestpracticesActivity@40594d48 03-31 22:59:19.942 509 722 W InputManagerService: Starting input on non-focused client com.android.internal.view.IInputMethodClient$Stub$Proxy@4092bfd8 (uid=10035 pid=890) 03-31 22:59:19.950 509 801 I gralloc : Allocated 0x660072 size 6488161 03-31 22:59:19.997 509 604 I ActivityManager: Displayed com.appcelerator.test/._1bestpracticesActivity: +743ms 03-31 22:59:21.122 509 509 I gralloc : Allocated 0x660072 size 6488161 03-31 22:59:23.349 509 603 I AlarmManager: sending alarm Alarm{4067a338 type 0 com.android.vending} 03-31 22:59:23.771 1836 1838 D dalvikvm: GC_CONCURRENT freed 149K, 45% free 4022K/7239K, external 2357K/2773K, paused 1ms+1ms 03-31 22:59:23.825 1836 1836 D Finsky : [1] 5.onFinished: Installation state replication succeeded. 03-31 22:59:24.458 509 603 I AlarmManager: sending alarm Alarm{40bd1650 type 0 com.google.android.gsf} 03-31 22:59:24.481 897 4041 I EventLogService: Aggregate from 1333254564412 (log), 1333254564412 (data) 03-31 22:59:25.872 509 600 D BatteryTempPolicy: updateBatteryTemp temperature = 310, Threshhold = 3 03-31 22:59:25.880 258 495 E NetlinkListener: ignoring non-kernel netlink multicast message 03-31 22:59:25.880 256 283 E NetlinkListener: ignoring non-kernel netlink multicast message 03-31 22:59:25.880 254 291 E NetlinkListener: ignoring non-kernel netlink multicast message 03-31 22:59:25.880 258 584 E NetlinkListener: ignoring non-kernel netlink multicast message 03-31 22:59:25.911 664 664 D StatusBarPolicy: handleBatteryUpdate 03-31 22:59:30.997 890 890 D dalvikvm: GC_EXPLICIT freed 527K, 49% free 4499K/8775K, external 8803K/10851K, paused 76ms 03-31 22:59:36.005 2207 2207 D dalvikvm: GC_EXPLICIT freed 15K, 38% free 4178K/6663K, external 2357K/2773K, paused 75ms 03-31 22:59:40.989 2281 2281 D dalvikvm: GC_EXPLICIT freed 8K, 44% free 3173K/5575K, external 2357K/2773K, paused 57ms 03-31 22:59:46.005 2082 2082 D dalvikvm: GC_EXPLICIT freed 299K, 42% free 3443K/5895K, external 2357K/2773K, paused 72ms 03-31 22:59:49.552 5847 5886 W TiAnalyticsSvc: (Thread-13) [29641,29641] Analytics Service Started 03-31 22:59:49.575 5847 5886 I TiAnalyticsSvc: (Thread-13) [26,29667] Network unavailable, can't send analytics 03-31 22:59:49.575 5847 5886 W TiAnalyticsSvc: (Thread-13) [0,29667] Stopping Analytics Service 03-31 22:59:54.606 4351 4351 D dalvikvm: GC_EXPLICIT freed 11K, 42% free 3131K/5379K, external 2357K/2773K, paused 58ms 03-31 22:59:59.630 2191 2191 D dalvikvm: GC_EXPLICIT freed 163K, 47% free 4043K/7559K, external 2357K/2773K, paused 78ms 03-31 22:59:59.997 509 603 I AlarmManager: sending alarm Alarm{40d99778 type 1 android} 03-31 23:00:05.075 2216 2216 D dalvikvm: GC_EXPLICIT freed 17K, 44% free 3042K/5379K, external 2357K/2773K, paused 24ms 03-31 23:00:10.099 2226 2226 D dalvikvm: GC_EXPLICIT freed 6K, 44% free 3022K/5379K, external 2357K/2773K, paused 42ms 03-31 23:00:10.552 5847 5855 W TypeConverter: jsValueToJavaObject returning null 03-31 23:00:10.552 5847 5847 D AndroidRuntime: Shutting down VM 03-31 23:00:10.552 5847 5847 W dalvikvm: threadid=1: thread exiting with uncaught exception (group=0x4001e560) 03-31 23:00:10.560 5847 5847 E TiApplication: (main) [20975,50642] Sending event: exception on thread: main msg:java.lang.NullPointerException; Titanium 1.8.1,2012/01/27 17:31,a24502a 03-31 23:00:10.560 5847 5847 E TiApplication: java.lang.NullPointerException 03-31 23:00:10.560 5847 5847 E TiApplication: at ti.modules.titanium.ui.widget.tableview.TiBaseTableViewItem.setBackgroundFromProxy(TiBaseTableViewItem.java:182) 03-31 23:00:10.560 5847 5847 E TiApplication: at ti.modules.titanium.ui.widget.tableview.TiTableViewRowProxyItem.setRowData(TiTableViewRowProxyItem.java:213) 03-31 23:00:10.560 5847 5847 E TiApplication: at ti.modules.titanium.ui.widget.tableview.TiTableViewRowProxyItem.setRowData(TiTableViewRowProxyItem.java:84) 03-31 23:00:10.560 5847 5847 E TiApplication: at ti.modules.titanium.ui.widget.tableview.TiTableView$TTVListAdapter.getView(TiTableView.java:210) 03-31 23:00:10.560 5847 5847 E TiApplication: at android.widget.AbsListView.obtainView(AbsListView.java:1435) 03-31 23:00:10.560 5847 5847 E TiApplication: at android.widget.ListView.makeAndAddView(ListView.java:1824) 03-31 23:00:10.560 5847 5847 E TiApplication: at android.widget.ListView.fillSpecific(ListView.java:1365) 03-31 23:00:10.560 5847 5847 E TiApplication: at android.widget.ListView.layoutChildren(ListView.java:1651) 03-31 23:00:10.560 5847 5847 E TiApplication: at android.widget.AbsListView.onLayout(AbsListView.java:1286) 03-31 23:00:10.560 5847 5847 E TiApplication: at android.view.View.layout(View.java:7184) 03-31 23:00:10.560 5847 5847 E TiApplication: at android.widget.FrameLayout.onLayout(FrameLayout.java:338) 03-31 23:00:10.560 5847 5847 E TiApplication: at android.view.View.layout(View.java:7184) 03-31 23:00:10.560 5847 5847 E TiApplication: at org.appcelerator.titanium.view.TiCompositeLayout.onLayout(TiCompositeLayout.java:382) 03-31 23:00:10.560 5847 5847 E TiApplication: at android.view.View.layout(View.java:7184) 03-31 23:00:10.560 5847 5847 E TiApplication: at org.appcelerator.titanium.view.TiCompositeLayout.onLayout(TiCompositeLayout.java:382) 03-31 23:00:10.560 5847 5847 E TiApplication: at android.view.View.layout(View.java:7184) 03-31 23:00:10.560 5847 5847 E TiApplication: at android.widget.FrameLayout.onLayout(FrameLayout.java:338) 03-31 23:00:10.560 5847 5847 E TiApplication: at android.view.View.layout(View.java:7184) 03-31 23:00:10.560 5847 5847 E TiApplication: at android.widget.LinearLayout.setChildFrame(LinearLayout.java:1254) 03-31 23:00:10.560 5847 5847 E TiApplication: at android.widget.LinearLayout.layoutVertical(LinearLayout.java:1130) 03-31 23:00:10.560 5847 5847 E TiApplication: at android.widget.LinearLayout.onLayout(LinearLayout.java:1047) 03-31 23:00:10.560 5847 5847 E TiApplication: at android.view.View.layout(View.java:7184) 03-31 23:00:10.560 5847 5847 E TiApplication: at android.widget.FrameLayout.onLayout(FrameLayout.java:338) 03-31 23:00:10.560 5847 5847 E TiApplication: at android.view.View.layout(View.java:7184) 03-31 23:00:10.560 5847 5847 E TiApplication: at android.view.ViewRoot.performTraversals(ViewRoot.java:1180) 03-31 23:00:10.560 5847 5847 E TiApplication: at android.view.ViewRoot.handleMessage(ViewRoot.java:1914) 03-31 23:00:10.560 5847 5847 E TiApplication: at android.os.Handler.dispatchMessage(Handler.java:99) 03-31 23:00:10.560 5847 5847 E TiApplication: at android.os.Looper.loop(Looper.java:130) 03-31 23:00:10.560 5847 5847 E TiApplication: at android.app.ActivityThread.main(ActivityThread.java:3859) 03-31 23:00:10.560 5847 5847 E TiApplication: at java.lang.reflect.Method.invokeNative(Native Method) 03-31 23:00:10.560 5847 5847 E TiApplication: at java.lang.reflect.Method.invoke(Method.java:507) 03-31 23:00:10.560 5847 5847 E TiApplication: at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:840) 03-31 23:00:10.560 5847 5847 E TiApplication: at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:598) 03-31 23:00:10.560 5847 5847 E TiApplication: at dalvik.system.NativeStart.main(Native Method) 03-31 23:00:10.591 5847 5847 E AndroidRuntime: FATAL EXCEPTION: main 03-31 23:00:10.591 5847 5847 E AndroidRuntime: java.lang.NullPointerException 03-31 23:00:10.591 5847 5847 E AndroidRuntime: at ti.modules.titanium.ui.widget.tableview.TiBaseTableViewItem.setBackgroundFromProxy(TiBaseTableViewItem.java:182) 03-31 23:00:10.591 5847 5847 E AndroidRuntime: at ti.modules.titanium.ui.widget.tableview.TiTableViewRowProxyItem.setRowData(TiTableViewRowProxyItem.java:213) 03-31 23:00:10.591 5847 5847 E AndroidRuntime: at ti.modules.titanium.ui.widget.tableview.TiTableViewRowProxyItem.setRowData(TiTableViewRowProxyItem.java:84) 03-31 23:00:10.591 5847 5847 E AndroidRuntime: at ti.modules.titanium.ui.widget.tableview.TiTableView$TTVListAdapter.getView(TiTableView.java:210) 03-31 23:00:10.591 5847 5847 E AndroidRuntime: at android.widget.AbsListView.obtainView(AbsListView.java:1435) 03-31 23:00:10.591 5847 5847 E AndroidRuntime: at android.widget.ListView.makeAndAddView(ListView.java:1824) 03-31 23:00:10.591 5847 5847 E AndroidRuntime: at android.widget.ListView.fillSpecific(ListView.java:1365) 03-31 23:00:10.591 5847 5847 E AndroidRuntime: at android.widget.ListView.layoutChildren(ListView.java:1651) 03-31 23:00:10.591 5847 5847 E AndroidRuntime: at android.widget.AbsListView.onLayout(AbsListView.java:1286) 03-31 23:00:10.591 5847 5847 E AndroidRuntime: at android.view.View.layout(View.java:7184) 03-31 23:00:10.591 5847 5847 E AndroidRuntime: at android.widget.FrameLayout.onLayout(FrameLayout.java:338) 03-31 23:00:10.591 5847 5847 E AndroidRuntime: at android.view.View.layout(View.java:7184) 03-31 23:00:10.591 5847 5847 E AndroidRuntime: at org.appcelerator.titanium.view.TiCompositeLayout.onLayout(TiCompositeLayout.java:382) 03-31 23:00:10.591 5847 5847 E AndroidRuntime: at android.view.View.layout(View.java:7184) 03-31 23:00:10.591 5847 5847 E AndroidRuntime: at org.appcelerator.titanium.view.TiCompositeLayout.onLayout(TiCompositeLayout.java:382) 03-31 23:00:10.591 5847 5847 E AndroidRuntime: at android.view.View.layout(View.java:7184) 03-31 23:00:10.591 5847 5847 E AndroidRuntime: at android.widget.FrameLayout.onLayout(FrameLayout.java:338) 03-31 23:00:10.591 5847 5847 E AndroidRuntime: at android.view.View.layout(View.java:7184) 03-31 23:00:10.591 5847 5847 E AndroidRuntime: at android.widget.LinearLayout.setChildFrame(LinearLayout.java:1254) 03-31 23:00:10.591 5847 5847 E AndroidRuntime: at android.widget.LinearLayout.layoutVertical(LinearLayout.java:1130) 03-31 23:00:10.591 5847 5847 E AndroidRuntime: at android.widget.LinearLayout.onLayout(LinearLayout.java:1047) 03-31 23:00:10.591 5847 5847 E AndroidRuntime: at android.view.View.layout(View.java:7184) 03-31 23:00:10.591 5847 5847 E AndroidRuntime: at android.widget.FrameLayout.onLayout(FrameLayout.java:338) 03-31 23:00:10.591 5847 5847 E AndroidRuntime: at android.view.View.layout(View.java:7184) 03-31 23:00:10.591 5847 5847 E AndroidRuntime: at android.view.ViewRoot.performTraversals(ViewRoot.java:1180) 03-31 23:00:10.591 5847 5847 E AndroidRuntime: at android.view.ViewRoot.handleMessage(ViewRoot.java:1914) 03-31 23:00:10.591 5847 5847 E AndroidRuntime: at android.os.Handler.dispatchMessage(Handler.java:99) 03-31 23:00:10.591 5847 5847 E AndroidRuntime: at android.os.Looper.loop(Looper.java:130) 03-31 23:00:10.591 5847 5847 E AndroidRuntime: at android.app.ActivityThread.main(ActivityThread.java:3859) 03-31 23:00:10.591 5847 5847 E AndroidRuntime: at java.lang.reflect.Method.invokeNative(Native Method) 03-31 23:00:10.591 5847 5847 E AndroidRuntime: at java.lang.reflect.Method.invoke(Method.java:507) 03-31 23:00:10.591 5847 5847 E AndroidRuntime: at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:840) 03-31 23:00:10.591 5847 5847 E AndroidRuntime: at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:598) 03-31 23:00:10.591 5847 5847 E AndroidRuntime: at dalvik.system.NativeStart.main(Native Method) 03-31 23:00:10.599 509 783 W ActivityManager: Force finishing activity com.appcelerator.test/._1bestpracticesActivity 03-31 23:00:10.708 509 526 D dalvikvm: GC_EXTERNAL_ALLOC freed 1343K, 36% free 9055K/14023K, external 10065K/10188K, paused 85ms 03-31 23:00:10.724 509 526 W ApplicationContext: Unable to create files directory 03-31 23:00:10.747 509 526 I gralloc : Allocated 0x61663d64 size 2103800684 03-31 23:00:11.099 509 524 W ActivityManager: Activity pause timeout for HistoryRecord{40a2c3d8 com.appcelerator.test/._1bestpracticesActivity} 03-31 23:00:11.099 509 524 I ActivityManager: No longer want amep.games.af_final:remote (pid 4351): hidden #21 03-31 23:00:11.122 890 890 D ActivitityRenderTarget: onResume 03-31 23:00:11.177 890 5830 W IMGSRV : eglglue.c:778: InitContext: ignoring buffer type CBUF_TYPE_PDS_VERT_SECONDARY_PREGEN_BUFFER 03-31 23:00:11.192 509 515 I gralloc : Allocated 0x660072 size 6488161 03-31 23:00:11.294 509 873 I gralloc : Allocated 0x660072 size 6488161 03-31 23:00:11.349 509 722 I gralloc : Allocated 0x660072 size 6488161 03-31 23:00:11.356 509 820 W ActivityManager: Scheduling restart of crashed service amep.games.af_final/com.appenda.AppNotify in 5000ms 03-31 23:00:11.599 509 524 I ActivityManager: No longer want com.motorola.im.service (pid 4333): hidden #21 03-31 23:00:11.622 509 827 W ActivityManager: Scheduling restart of crashed service com.motorola.im/.service.RemoteImService in 14734ms 03-31 23:00:11.731 509 526 I gralloc : Allocated 0x61663d64 size 2103800684 {noformat} h6.API docs http://developer.appcelerator.com/apidoc/mobile/latest/Titanium.UI.TableViewRow.backgroundImage-property.html

    Appcelerator JIRA | 5 years ago | Shawn Lipscomb
    java.lang.NullPointerException
  6. 0

    Android: Saving Map State in Google map

    Stack Overflow | 11 months ago | Junie Negentien
    java.lang.RuntimeException: Unable to resume activity {com.ourThesis.junieNegentien2015/com.ourThesis.junieNegentien2015.MainActivity}: java.lang.NullPointerException

    Not finding the right solution?
    Take a tour to get the most out of Samebug.

    Tired of useless tips?

    Automated exception search integrated into your IDE

    Root Cause Analysis

    1. java.lang.NullPointerException

      No message provided

      at ti.modules.titanium.ui.widget.tableview.TiTableViewRowProxyItem.createControls()
    2. ti.modules.titanium
      TiTableView$TTVListAdapter.getView
      1. ti.modules.titanium.ui.widget.tableview.TiTableViewRowProxyItem.createControls(TiTableViewRowProxyItem.java:151)
      2. ti.modules.titanium.ui.widget.tableview.TiTableViewRowProxyItem.setRowData(TiTableViewRowProxyItem.java:286)
      3. ti.modules.titanium.ui.widget.tableview.TiTableViewRowProxyItem.setRowData(TiTableViewRowProxyItem.java:81)
      4. ti.modules.titanium.ui.widget.tableview.TiTableView$TTVListAdapter.getView(TiTableView.java:226)
      4 frames
    3. Android Platform
      FrameLayout.onLayout
      1. android.widget.AbsListView.obtainView(AbsListView.java:2451)
      2. android.widget.ListView.makeAndAddView(ListView.java:1780)
      3. android.widget.ListView.fillDown(ListView.java:678)
      4. android.widget.ListView.fillFromTop(ListView.java:738)
      5. android.widget.ListView.layoutChildren(ListView.java:1631)
      6. android.widget.AbsListView.onLayout(AbsListView.java:2281)
      7. android.view.View.layout(View.java:11338)
      8. android.view.ViewGroup.layout(ViewGroup.java:4238)
      9. android.widget.FrameLayout.onLayout(FrameLayout.java:431)
      9 frames
    4. ti.modules.titanium
      TiTableView.onLayout
      1. ti.modules.titanium.ui.widget.tableview.TiTableView.onLayout(TiTableView.java:555)
      1 frame
    5. Android Platform
      ViewGroup.layout
      1. android.view.View.layout(View.java:11338)
      2. android.view.ViewGroup.layout(ViewGroup.java:4238)
      2 frames
    6. org.appcelerator.titanium
      TiCompositeLayout.onLayout
      1. org.appcelerator.titanium.view.TiCompositeLayout.onLayout(TiCompositeLayout.java:583)
      1 frame
    7. Android Platform
      ViewGroup.layout
      1. android.view.View.layout(View.java:11338)
      2. android.view.ViewGroup.layout(ViewGroup.java:4238)
      2 frames
    8. org.appcelerator.titanium
      TiCompositeLayout.onLayout
      1. org.appcelerator.titanium.view.TiCompositeLayout.onLayout(TiCompositeLayout.java:583)
      1 frame
    9. Android Platform
      ActivityThread.main
      1. android.view.View.layout(View.java:11338)
      2. android.view.ViewGroup.layout(ViewGroup.java:4238)
      3. android.widget.FrameLayout.onLayout(FrameLayout.java:431)
      4. android.view.View.layout(View.java:11338)
      5. android.view.ViewGroup.layout(ViewGroup.java:4238)
      6. android.widget.LinearLayout.setChildFrame(LinearLayout.java:1644)
      7. android.widget.LinearLayout.layoutVertical(LinearLayout.java:1502)
      8. android.widget.LinearLayout.onLayout(LinearLayout.java:1415)
      9. android.view.View.layout(View.java:11338)
      10. android.view.ViewGroup.layout(ViewGroup.java:4238)
      11. android.widget.FrameLayout.onLayout(FrameLayout.java:431)
      12. android.view.View.layout(View.java:11338)
      13. android.view.ViewGroup.layout(ViewGroup.java:4238)
      14. android.view.ViewRootImpl.performTraversals(ViewRootImpl.java:1667)
      15. android.view.ViewRootImpl.handleMessage(ViewRootImpl.java:2624)
      16. android.os.Handler.dispatchMessage(Handler.java:99)
      17. android.os.Looper.loop(Looper.java:137)
      18. android.app.ActivityThread.main(ActivityThread.java:4517)
      18 frames
    10. Java RT
      Method.invoke
      1. java.lang.reflect.Method.invokeNative(Native Method)
      2. java.lang.reflect.Method.invoke(Method.java:511)
      2 frames
    11. Android
      ZygoteInit.main
      1. com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:980)
      2. com.android.internal.os.ZygoteInit.main(ZygoteInit.java:747)
      2 frames
    12. Android Platform
      NativeStart.main
      1. dalvik.system.NativeStart.main(Native Method)
      1 frame