Uploaded image for project: 'Titanium SDK/CLI'
  1. Titanium SDK/CLI
  2. TIMOB-26989

Android: TableView having SearchBar/SearchView will crash upon resume while "Don't keep activities" is enabled as of 7.2.1

    Details

    • Story Points:
      7
    • Sprint:
      2019 Sprint 9, 2019 Sprint 10

      Description

      Summary:
      If Android "Developer Options" setting "Don't keep activities" is enabled, then a TableView having a SearchBar or SearchView assigned to its "search" property will cause the app to crash after homing-out of the app and then resuming it.

      This regression was introduced as of 7.2.1.

      ListView does not have this problem. This is only a regression with TableView.

      Steps to reproduce:

      1. Go to the Android device's main "Settings" screen.
      2. Tap on "System" under "Settings.
      3. Tap on "Developer options" under "System" settings.
      4. Enable "Don't keep activities", which should be near the bottom of the list.
      5. Build and run the below code on the above Android device.
      6. Wait for the app to launch.
      7. Tap on the Android "Home" button.
      8. Resume the app.
      9. Notice that the app crashes upon resume.

      var window = Ti.UI.createWindow();
      var tableView = Ti.UI.createTableView({
      	data: [],
      //	search: Ti.UI.createSearchBar({ showCancel: true, width: Ti.UI.FILL }),
      	search: Ti.UI.Android.createSearchView(),
      	width: Ti.UI.FILL,
      	height: Ti.UI.FILL,
      });
      window.add(tableView);
      window.open();
      

      Result:

      [ERROR] TiExceptionHandler: (main) [6143,6143] Attempt to invoke virtual method 'java.lang.Object org.appcelerator.kroll.KrollDict.get(java.lang.Object)' on a null object reference
      [ERROR] TiExceptionHandler:
      [ERROR] TiExceptionHandler:     org.appcelerator.titanium.view.TiUIView.composeContentDescription(TiUIView.java:2188)
      [ERROR] TiExceptionHandler:     org.appcelerator.titanium.view.TiUIView.applyContentDescription(TiUIView.java:2162)
      [ERROR] TiExceptionHandler:     org.appcelerator.titanium.view.TiUIView.applyAccessibilityProperties(TiUIView.java:2225)
      [ERROR] TiExceptionHandler:     org.appcelerator.titanium.view.TiUIView.setNativeView(TiUIView.java:351)
      [ERROR] TiExceptionHandler:     ti.modules.titanium.ui.widget.searchview.TiUISearchView.<init>(TiUISearchView.java:44)
      [ERROR] TiExceptionHandler:     ti.modules.titanium.ui.android.SearchViewProxy.createView(SearchViewProxy.java:40)
      [ERROR] TiExceptionHandler:     org.appcelerator.titanium.proxy.TiViewProxy.handleGetView(TiViewProxy.java:490)
      [ERROR] TiExceptionHandler:     org.appcelerator.titanium.proxy.TiViewProxy.getOrCreateView(TiViewProxy.java:462)
      [ERROR] TiExceptionHandler:     ti.modules.titanium.ui.widget.TiUITableView.processProperties(TiUITableView.java:154)
      [ERROR] TiExceptionHandler:     org.appcelerator.kroll.KrollProxy.setModelListener(KrollProxy.java:1296)
      [ERROR] TiExceptionHandler:     org.appcelerator.titanium.proxy.TiViewProxy.realizeViews(TiViewProxy.java:505)
      [ERROR] TiExceptionHandler:     org.appcelerator.titanium.proxy.TiViewProxy.handleGetView(TiViewProxy.java:496)
      [ERROR] TiExceptionHandler:     org.appcelerator.titanium.proxy.TiViewProxy.getOrCreateView(TiViewProxy.java:462)
      [ERROR] TiExceptionHandler:     org.appcelerator.titanium.proxy.TiViewProxy.realizeViews(TiViewProxy.java:512)
      [ERROR] TiExceptionHandler:     org.appcelerator.titanium.proxy.TiViewProxy.handleGetView(TiViewProxy.java:496)
      [ERROR] TiExceptionHandler:     org.appcelerator.titanium.proxy.TiViewProxy.getOrCreateView(TiViewProxy.java:462)
      [ERROR] TiExceptionHandler:     org.appcelerator.titanium.proxy.TiViewProxy.add(TiViewProxy.java:601)
      [ERROR] TiExceptionHandler:     ti.modules.titanium.ui.WindowProxy.windowCreated(WindowProxy.java:292)
      [ERROR] TiExceptionHandler:     org.appcelerator.titanium.TiActivityWindows.windowCreated(TiActivityWindows.java:33)
      [ERROR] TiExceptionHandler:     org.appcelerator.titanium.TiBaseActivity.windowCreated(TiBaseActivity.java:624)
      [ERROR] TiExceptionHandler:     org.appcelerator.titanium.TiBaseActivity.onCreate(TiBaseActivity.java:767)
      [ERROR] TiExceptionHandler:     org.appcelerator.titanium.TiActivity.onCreate(TiActivity.java:21)
      [ERROR] TiExceptionHandler:     android.app.Activity.performCreate(Activity.java:7136)
      [ERROR] TiExceptionHandler:     android.app.Activity.performCreate(Activity.java:7127)
      [ERROR] TiExceptionHandler:     android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1271)
      [ERROR] TiExceptionHandler:     android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2893)
      [ERROR] TiExceptionHandler:     android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:3048)
      [ERROR] TiExceptionHandler:     android.app.servertransaction.LaunchActivityItem.execute(LaunchActivityItem.java:78)
      [ERROR] TiExceptionHandler:     android.app.servertransaction.TransactionExecutor.executeCallbacks(TransactionExecutor.java:108)
      [ERROR] TiExceptionHandler:     android.app.servertransaction.TransactionExecutor.execute(TransactionExecutor.java:68)
      [ERROR] TiExceptionHandler:     android.app.ActivityThread$H.handleMessage(ActivityThread.java:1808)
      [ERROR] TiExceptionHandler:     android.os.Handler.dispatchMessage(Handler.java:106)
      [ERROR] TiExceptionHandler:     android.os.Looper.loop(Looper.java:193)
      [ERROR] TiExceptionHandler:     android.app.ActivityThread.main(ActivityThread.java:6669)
      [ERROR] TiExceptionHandler:     java.lang.reflect.Method.invoke(Native Method)
      [ERROR] TiExceptionHandler:     com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:493)
      

        Attachments

          Activity

            People

            • Assignee:
              jquick Joshua Quick
              Reporter:
              jquick Joshua Quick
              Reviewer:
              Gary Mathews
              Tester:
              Lokesh Choudhary
            • Watchers:
              3 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:

                Backbone Issue Sync

                • Backbone Issue Sync is enabled for your project, but we do not have any synchronization info for this issue.

                  Git Integration