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

[Android] Unable to destroy activity when exiting application has a TableView

    Details

    • Type: Bug
    • Status: Closed
    • Priority: High
    • Resolution: Fixed
    • Affects Version/s: Release 6.1.0
    • Fix Version/s: Release 6.1.2
    • Component/s: Android
    • Labels:
    • Environment:
    • Story Points:
      2
    • Sprint:
      2017 Sprint 16 SDK

      Description

      When Pressing the back button on an android application, the application crashes and displays the following error message:

      [ERROR] :  TiApplication: (main) [353,2796] Sending event: exception on thread: main msg:java.lang.RuntimeException: Unable to destroy activity {com.appc.test1/org.appcelerator.titanium.TiActivity}: java.lang.NullPointerException: Attempt to invoke virtual method 'boolean org.appcelerator.titanium.proxy.TiViewProxy.fireEvent(java.lang.String, java.lang.Object, boolean)' on a null object reference; Titanium 6.1.1,2017/06/19 14:33,undefined
      [ERROR] :  TiApplication: java.lang.RuntimeException: Unable to destroy activity {com.appc.test1/org.appcelerator.titanium.TiActivity}: java.lang.NullPointerException: Attempt to invoke virtual method 'boolean org.appcelerator.titanium.proxy.TiViewProxy.fireEvent(java.lang.String, java.lang.Object, boolean)' on a null object reference
      [ERROR] :  TiApplication: 	at android.app.ActivityThread.performDestroyActivity(ActivityThread.java:4203)
      [ERROR] :  TiApplication: 	at android.app.ActivityThread.handleDestroyActivity(ActivityThread.java:4221)
      [ERROR] :  TiApplication: 	at android.app.ActivityThread.-wrap6(ActivityThread.java)
      [ERROR] :  TiApplication: 	at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1538)
      [ERROR] :  TiApplication: 	at android.os.Handler.dispatchMessage(Handler.java:102)
      [ERROR] :  TiApplication: 	at android.os.Looper.loop(Looper.java:154)
      [ERROR] :  TiApplication: 	at android.app.ActivityThread.main(ActivityThread.java:6119)
      [ERROR] :  TiApplication: 	at java.lang.reflect.Method.invoke(Native Method)
      [ERROR] :  TiApplication: 	at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:886)
      [ERROR] :  TiApplication: 	at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:776)
      [ERROR] :  TiApplication: Caused by: java.lang.NullPointerException: Attempt to invoke virtual method 'boolean org.appcelerator.titanium.proxy.TiViewProxy.fireEvent(java.lang.String, java.lang.Object, boolean)' on a null object reference
      [ERROR] :  TiApplication: 	at org.appcelerator.titanium.view.TiUIView.fireEvent(TiUIView.java:1940)
      [ERROR] :  TiApplication: 	at org.appcelerator.titanium.view.TiUIView.fireEvent(TiUIView.java:1931)
      [ERROR] :  TiApplication: 	at ti.modules.titanium.ui.widget.TiUIImageView.fireStop(TiUIImageView.java:509)
      [ERROR] :  TiApplication: 	at ti.modules.titanium.ui.widget.TiUIImageView.handleStop(TiUIImageView.java:664)
      [ERROR] :  TiApplication: 	at ti.modules.titanium.ui.widget.TiUIImageView.release(TiUIImageView.java:993)
      [ERROR] :  TiApplication: 	at org.appcelerator.titanium.proxy.TiViewProxy.releaseViews(TiViewProxy.java:543)
      [ERROR] :  TiApplication: 	at ti.modules.titanium.ui.TableViewRowProxy.releaseViews(TableViewRowProxy.java:280)
      [ERROR] :  TiApplication: 	at ti.modules.titanium.ui.TableViewSectionProxy.releaseViews(TableViewSectionProxy.java:147)
      [ERROR] :  TiApplication: 	at ti.modules.titanium.ui.TableViewProxy.releaseViews(TableViewProxy.java:133)
      [ERROR] :  TiApplication: 	at org.appcelerator.titanium.proxy.TiViewProxy.releaseViews(TiViewProxy.java:540)
      [ERROR] :  TiApplication: 	at org.appcelerator.titanium.proxy.TiWindowProxy.closeFromActivity(TiWindowProxy.java:191)
      [ERROR] :  TiApplication: 	at org.appcelerator.titanium.TiBaseActivity.onDestroy(TiBaseActivity.java:1579)
      [ERROR] :  TiApplication: 	at org.appcelerator.titanium.TiActivity.onDestroy(TiActivity.java:32)
      [ERROR] :  TiApplication: 	at android.app.Activity.performDestroy(Activity.java:6881)
      [ERROR] :  TiApplication: 	at android.app.Instrumentation.callActivityOnDestroy(Instrumentation.java:1153)
      [ERROR] :  TiApplication: 	at android.app.ActivityThread.performDestroyActivity(ActivityThread.java:4190)
      [ERROR] :  TiApplication: 	... 9 more
      

      Steps to reproduce
      1. Create a new app.
      2. Replace the contents of the app's app.js with the code below.
      3. Run the app.

      Titanium.UI.setBackgroundColor('#000');
      var win = Titanium.UI.createWindow({  
          title:'Test',
          backgroundColor:'gray',
      	exitOnClose: true
      });
       
      var rows = [];
      for (var i = 0; i < 30; i++) {
      	var row = Ti.UI.createTableViewRow({height: "40dp"});
      	var iv = Ti.UI.createImageView({image: "/KS_nav_ui.png", height: "43"});
      	row.add(iv);
      	rows.push(row);
      }
       
      var tv = Ti.UI.createTableView({data: rows});
      win.add(tv);
      win.open();
      

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                emerriman Eric Merriman
                Reporter:
                smohammed Samir Mohammed
              • Watchers:
                0 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved:

                  Backbone Issue Sync

                  • Titanium SDK/CLI <> Titanium Mobile
                    Synced with:
                    TIMOB-10817
                    Sync status:
                    ERROR
                    Last received:
                    Last sent:

                    Git Integration