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

Kitchen Sink Crashes on initial install

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Critical
    • Resolution: Fixed
    • Affects Version/s: Release 5.2.0
    • Fix Version/s: Release 5.2.0
    • Component/s: Android
    • Labels:
    • Environment:

      Appc Studio : 4.5.0.201602170821
      Ti SDK : 5.2.0.v20160219124528
      OS X El Capitan : 10.11.3
      Appc NPM : 4.2.3-2
      Appc CLI : 5.2.0-269
      Node: 4.2.4
      Nexus 6P - Android 6.0.1

    • Story Points:
      3
    • Sprint:
      2016 Sprint 4 SDK

      Description

      Description

      When installing a fresh version of the kitchen sink from the stable branch on github, The first install on the phone crashes,

      if you change the SDK to the 5.1.2 GA and run it works.
      if you change the Facebook module to the 4.0.5 and run it works.

      After either of these it also works on 5.2.0.v20160219124528 SDK aswell

      This is a Regression.

      Steps to reproduce:

      1. Download a fresh install of the stable kitchen sink
      2. Change targetSdkVersion to 23
      3. add Android config code below to the tiapp.xml
      4. Run the application with the 5.2.0.v20160219124528 SDK and 5.0.0 Facebook module

      <android xmlns:android="http://schemas.android.com/apk/res/android">
              <manifest>
                  <application>
                      <activity android:alwaysRetainTaskState="true"
                          android:configChanges="keyboardHidden|orientation"
                          android:label="KitchenSink"
                          android:name=".KitchensinkActivity" android:theme="@style/Theme.Titanium">
                          <intent-filter>
                              <action android:name="android.intent.action.MAIN"/>
                              <category android:name="android.intent.category.LAUNCHER"/>
                          </intent-filter>
                      </activity>
                      <activity
                          android:configChanges="keyboard|keyboardHidden|screenLayout|screenSize|orientation"
                          android:label="KitchenSinkFacebook"
                          android:name="com.facebook.FacebookActivity" android:theme="@android:style/Theme.Translucent.NoTitleBar"/>
                      <activity android:label="KitchenSinkFacebook"
                          android:name="com.facebook.LoginActivity" android:theme="@android:style/Theme.Translucent.NoTitleBar"/>
                      <meta-data android:name="com.facebook.sdk.ApplicationId" android:value="@string/app_id"/>
                  </application>
                  <uses-sdk android:targetSdkVersion="23"/>
              </manifest>
              <activity android:name="ti.modules.titanium.ui.android.TiPreferencesActivity"/>
              <services>
                  <service type="interval" url="testservice.js"/>
              </services>
          </android>
      

      Actual :
      The application crashes

      Log

      -- Start application log -----------------------------------------------------
      [INFO] :   TiApplication: (main) [0,0] checkpoint, app created.
      [INFO] :   TiApplication: (main) [51,51] Titanium 5.2.0 (2016/02/19 12:45 fd837d1)
      [INFO] :   DatabaseHelper: No value in database for platform key: 'unique_machine_id' returning supplied default ''
      [INFO] :   DatabaseHelper: No value in database for platform key: 'hardware_machine_id' returning supplied default ''
      [INFO] :   TiApplication: (main) [201,252] Titanium Javascript runtime: v8
      [INFO] :   TiRootActivity: (main) [0,0] checkpoint, on root activity create, savedInstanceState: null
      [ERROR] :  TiApplication: (AsyncTask #1) [24,24] Sending event: exception on thread: AsyncTask #1 msg:java.lang.NullPointerException: Attempt to invoke virtual method 'int android.app.Activity.checkSelfPermission(java.lang.String)' on a null object reference; Titanium 5.2.0,2016/02/19 12:45,fd837d1
      [ERROR] :  TiApplication: java.lang.NullPointerException: Attempt to invoke virtual method 'int android.app.Activity.checkSelfPermission(java.lang.String)' on a null object reference
      [ERROR] :  TiApplication: 	at org.appcelerator.titanium.util.TiFileHelper2.hasStoragePermission(TiFileHelper2.java:89)
      [ERROR] :  TiApplication: 	at org.appcelerator.titanium.util.TiResponseCache.get(TiResponseCache.java:314)
      [ERROR] :  TiApplication: 	at com.android.okhttp.internal.huc.CacheAdapter.getJavaCachedResponse(CacheAdapter.java:103)
      [ERROR] :  TiApplication: 	at com.android.okhttp.internal.huc.CacheAdapter.get(CacheAdapter.java:47)
      [ERROR] :  TiApplication: 	at com.android.okhttp.internal.http.HttpEngine.sendRequest(HttpEngine.java:229)
      [ERROR] :  TiApplication: 	at com.android.okhttp.internal.huc.HttpURLConnectionImpl.execute(HttpURLConnectionImpl.java:437)
      [ERROR] :  TiApplication: 	at com.android.okhttp.internal.huc.HttpURLConnectionImpl.getResponse(HttpURLConnectionImpl.java:388)
      [ERROR] :  TiApplication: 	at com.android.okhttp.internal.huc.HttpURLConnectionImpl.getResponseCode(HttpURLConnectionImpl.java:501)
      [ERROR] :  TiApplication: 	at com.android.okhttp.internal.huc.DelegatingHttpsURLConnection.getResponseCode(DelegatingHttpsURLConnection.java:105)
      [ERROR] :  TiApplication: 	at com.android.okhttp.internal.huc.HttpsURLConnectionImpl.getResponseCode(HttpsURLConnectionImpl.java)
      [ERROR] :  TiApplication: 	at com.facebook.GraphResponse.fromHttpConnection(GraphResponse.java:253)
      [ERROR] :  TiApplication: 	at com.facebook.GraphRequest.executeConnectionAndWait(GraphRequest.java:1255)
      [ERROR] :  TiApplication: 	at com.facebook.GraphRequest.executeBatchAndWait(GraphRequest.java:1157)
      [ERROR] :  TiApplication: 	at com.facebook.GraphRequest.executeBatchAndWait(GraphRequest.java:1124)
      [ERROR] :  TiApplication: 	at com.facebook.GraphRequest.executeBatchAndWait(GraphRequest.java:1108)
      [ERROR] :  TiApplication: 	at com.facebook.GraphRequest.executeAndWait(GraphRequest.java:1083)
      [ERROR] :  TiApplication: 	at com.facebook.GraphRequest.executeAndWait(GraphRequest.java:977)
      [ERROR] :  TiApplication: 	at com.facebook.internal.Utility.getAppSettingsQueryResponse(Utility.java:868)
      [ERROR] :  TiApplication: 	at com.facebook.internal.Utility.access$1(Utility.java:860)
      [ERROR] :  TiApplication: 	at com.facebook.internal.Utility$1.run(Utility.java:797)
      [ERROR] :  TiApplication: 	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1113)
      [ERROR] :  TiApplication: 	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:588)
      [ERROR] :  TiApplication: 	at java.lang.Thread.run(Thread.java:818)
      [INFO] :   SQLiteConnectionPool: The connection pool for /data/user/0/com.appcelerator.kitchensink/databases/appcAnalytics.db has been closed but there are still 1 connections in use.  They will be closed as they are released back to the pool.
      [INFO] :   SQLiteConnectionPool: The connection pool for /data/user/0/com.appcelerator.kitchensink/databases/appcAnalytics.db has been closed but there are still 1 connections in use.  They will be closed as they are released back to the pool.
      [ERROR] :  TiApplication: (main) [38,62] Sending event: exception on thread: main msg:java.lang.RuntimeException: Unable to start activity ComponentInfo{com.appcelerator.kitchensink/com.appcelerator.kitchensink.KitchensinkActivity}: java.lang.IllegalStateException: Cannot perform this operation because the connection pool has been closed.; Titanium 5.2.0,2016/02/19 12:45,fd837d1
      [ERROR] :  TiApplication: java.lang.RuntimeException: Unable to start activity ComponentInfo{com.appcelerator.kitchensink/com.appcelerator.kitchensink.KitchensinkActivity}: java.lang.IllegalStateException: Cannot perform this operation because the connection pool has been closed.
      [ERROR] :  TiApplication: 	at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2416)
      [ERROR] :  TiApplication: 	at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2476)
      [ERROR] :  TiApplication: 	at android.app.ActivityThread.-wrap11(ActivityThread.java)
      [ERROR] :  TiApplication: 	at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1344)
      [ERROR] :  TiApplication: 	at android.os.Handler.dispatchMessage(Handler.java:102)
      [ERROR] :  TiApplication: 	at android.os.Looper.loop(Looper.java:148)
      [ERROR] :  TiApplication: 	at android.app.ActivityThread.main(ActivityThread.java:5417)
      [ERROR] :  TiApplication: 	at java.lang.reflect.Method.invoke(Native Method)
      [ERROR] :  TiApplication: 	at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:726)
      [ERROR] :  TiApplication: 	at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:616)
      [ERROR] :  TiApplication: Caused by: java.lang.IllegalStateException: Cannot perform this operation because the connection pool has been closed.
      [ERROR] :  TiApplication: 	at android.database.sqlite.SQLiteConnectionPool.throwIfClosedLocked(SQLiteConnectionPool.java:962)
      [ERROR] :  TiApplication: 	at android.database.sqlite.SQLiteConnectionPool.waitForConnection(SQLiteConnectionPool.java:677)
      [ERROR] :  TiApplication: 	at android.database.sqlite.SQLiteConnectionPool.acquireConnection(SQLiteConnectionPool.java:348)
      [ERROR] :  TiApplication: 	at android.database.sqlite.SQLiteSession.acquireConnection(SQLiteSession.java:894)
      [ERROR] :  TiApplication: 	at android.database.sqlite.SQLiteSession.executeForCursorWindow(SQLiteSession.java:834)
      [ERROR] :  TiApplication: 	at android.database.sqlite.SQLiteQuery.fillWindow(SQLiteQuery.java:62)
      [ERROR] :  TiApplication: 	at android.database.sqlite.SQLiteCursor.fillWindow(SQLiteCursor.java:143)
      [ERROR] :  TiApplication: 	at android.database.sqlite.SQLiteCursor.getCount(SQLiteCursor.java:132)
      [ERROR] :  TiApplication: 	at android.database.AbstractCursor.moveToPosition(AbstractCursor.java:219)
      [ERROR] :  TiApplication: 	at android.database.AbstractCursor.moveToNext(AbstractCursor.java:268)
      [ERROR] :  TiApplication: 	at com.appcelerator.analytics.APSAnalyticsModel.getProps(APSAnalyticsModel.java:307)
      [ERROR] :  TiApplication: 	at com.appcelerator.analytics.APSAnalyticsModel.addEvent(APSAnalyticsModel.java:78)
      [ERROR] :  TiApplication: 	at com.appcelerator.analytics.APSAnalyticsHelper.sendAnalyticsEvent(APSAnalyticsHelper.java:523)
      [ERROR] :  TiApplication: 	at com.appcelerator.analytics.APSAnalyticsHelper.postAnalyticsEvent(APSAnalyticsHelper.java:479)
      [ERROR] :  TiApplication: 	at com.appcelerator.analytics.APSAnalytics.sendAppEnrollEvent(APSAnalytics.java:121)
      [ERROR] :  TiApplication: 	at org.appcelerator.titanium.TiApplication.setRootActivity(TiApplication.java:498)
      [ERROR] :  TiApplication: 	at org.appcelerator.titanium.TiRootActivity.onCreate(TiRootActivity.java:94)
      [ERROR] :  TiApplication: 	at android.app.Activity.performCreate(Activity.java:6251)
      [ERROR] :  TiApplication: 	at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1107)
      [ERROR] :  TiApplication: 	at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2369)
      [WARN] :   V8Object: (KrollRuntimeThread) [19,81] Runtime disposed, cannot set property 'userAgent'
      [INFO] :   Process: Sending signal. PID: 11338 SIG: 9
      

      GA :

      The application runs

      Expected:
      The application runs

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                msamah Ashraf Abu (Inactive)
                Reporter:
                jlongton Josh Longton
              • Watchers:
                1 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved:

                  Backbone Issue Sync

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

                    Git Source Code