{ "id": "122752", "key": "TIMOB-15971", "fields": { "issuetype": { "id": "1", "description": "A problem which impairs or prevents the functions of the product.", "name": "Bug", "subtask": false }, "project": { "id": "10153", "key": "TIMOB", "name": "Titanium SDK/CLI", "projectCategory": { "id": "10100", "description": "Titanium and related SDKs used in application development", "name": "Client" } }, "fixVersions": [], "resolution": { "id": "1", "description": "A fix for this issue is checked into the tree and tested.", "name": "Fixed" }, "resolutiondate": "2014-07-16T18:34:06.000+0000", "created": "2013-11-21T11:39:21.000+0000", "priority": { "name": "High", "id": "2" }, "labels": [ "android", "module", "urbanairship" ], "versions": [], "issuelinks": [ { "id": "38560", "type": { "id": "10003", "name": "Relates", "inward": "relates to", "outward": "relates to" }, "outwardIssue": { "id": "125744", "key": "TIMOB-16538", "fields": { "summary": "Android: Analytics crashes App intermittently onResume", "status": { "description": "The issue is considered finished, the resolution is correct. Issues which are closed can be reopened.", "name": "Closed", "id": "6", "statusCategory": { "id": 3, "key": "done", "colorName": "green", "name": "Done" } }, "priority": { "name": "High", "id": "2" }, "issuetype": { "id": "1", "description": "A problem which impairs or prevents the functions of the product.", "name": "Bug", "subtask": false } } } } ], "assignee": { "name": "hpham", "key": "hpham", "displayName": "Hieu Pham", "active": true, "timeZone": "America/Los_Angeles" }, "updated": "2017-03-22T22:37:48.000+0000", "status": { "description": "The issue is considered finished, the resolution is correct. Issues which are closed can be reopened.", "name": "Closed", "id": "6", "statusCategory": { "id": 3, "key": "done", "colorName": "green", "name": "Done" } }, "components": [ { "id": "10202", "name": "Android", "description": "Android Platform" } ], "description": "If you add the UrbanAirship module for Android to the Kitchen Sink app,\r\nthe app opens on a blank/black window after being backgrounded (and the app memory has been released).\r\n\r\nWithout this module, Kitchen Sink works properly.\r\n\r\nSet up Kitchen Sink for the issue\r\n1. Download the Kitchen Sink source code\r\n2. Include the latest Urban Airship module (https://github.com/appcelerator/titanium_modules/tree/master/urbanairship/mobile/android) to Kitchen Sink.\r\n- Add the module in the source code.\r\n- Add the module just below the other modules in the tiapp.xml: ti.urbanairship \r\n\r\nSteps to reproduce the bug:\r\n1. Open Kitchen Sink\r\n2. Click on the home button, to let the app live in background\r\n3. Open at least 15 other apps, and let the live by clicking on the home button.\r\n(The aim, here, is to destroy the Kitchen Sink alive activities in order to force the app to \"restart\"). Actually you have to open apps until the Kitchen Sink activities desappear when you launch the command: adb shell dumpsys activity\r\n4. Resume the Kitchen Sink app\r\n\r\nObserved behavior: app freeze on a black screen\r\n\r\nExpected behavior: \"clean\" restart", "attachment": [ { "id": "44077", "filename": "tiapp.xml", "author": { "name": "arnaud_besnier", "key": "arnaud_besnier", "displayName": "Arnaud Besnier", "active": true, "timeZone": "Europe/Berlin" }, "created": "2013-11-21T11:39:21.000+0000", "size": 2835, "mimeType": "text/xml" } ], "flagged": false, "summary": "Android: App Resume Crash with the Urban Airship Module", "creator": { "name": "arnaud_besnier", "key": "arnaud_besnier", "displayName": "Arnaud Besnier", "active": true, "timeZone": "Europe/Berlin" }, "subtasks": [], "reporter": { "name": "arnaud_besnier", "key": "arnaud_besnier", "displayName": "Arnaud Besnier", "active": true, "timeZone": "Europe/Berlin" }, "environment": "operation system: Mac OSX 10.8.5\r\nTitanium SDK: 3.1.3.GA (also reproduced on 3.1.1.GA so probably any SDK)\r\nDevices: Samsung Galaxy S4, Google Nexus 3\r\nTitanium Apps: KitchenSink, our business app", "closedSprints": [ { "id": 149, "state": "closed", "name": "2014 Sprint 14 SDK", "startDate": "2014-07-07T21:48:52.340Z", "endDate": "2014-07-19T00:00:00.000Z", "completeDate": "2014-07-21T15:58:32.928Z", "originBoardId": 114 } ], "comment": { "comments": [ { "id": "284797", "author": { "name": "ivan.skugor", "key": "ivan.skugor", "displayName": "Ivan Skugor", "active": true, "timeZone": "Europe/Amsterdam" }, "body": "Noticed this issue also, it happens when app is put in the background for some time. Black screen can be seen and after back button is pressed to close that black screen, splash screen is shown and app is restarted.", "updateAuthor": { "name": "ivan.skugor", "key": "ivan.skugor", "displayName": "Ivan Skugor", "active": true, "timeZone": "Europe/Amsterdam" }, "created": "2013-12-17T18:34:31.000+0000", "updated": "2013-12-17T18:34:31.000+0000" }, { "id": "288764", "author": { "name": "athorne", "key": "athorne", "displayName": "Alex Bernier", "active": true, "timeZone": "America/Los_Angeles" }, "body": "I'm seeing this on 3.2 SDK without the Urban Airship module, when installed from Studio (not seeing when installed from TestFlight). Here are the modules I'm using, though my list hasn't changed from 3.1.3.GA to 3.2.GA, so it seems 3.2.GA SDK is the cause, not a specific module:\r\n\r\nti.cloud\r\nti.cloudpush\r\nanalytics.google\r\nti.imagefactory\r\nfacebook\r\n\r\nOnly seeing this in dev, though, so we're not production impacted.", "updateAuthor": { "name": "athorne", "key": "athorne", "displayName": "Alex Bernier", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2014-01-19T18:49:19.000+0000", "updated": "2014-01-19T19:45:10.000+0000" }, { "id": "291905", "author": { "name": "adammagana", "key": "adammagana", "displayName": "Adam Magana", "active": true, "timeZone": "America/New_York" }, "body": "I can confirm that my company is having the same issue with our Android app. We are also using the Urban Airship module so I cannot confirm whether or not Alejandro's issue is something else entirely. Currently this bug is occurring in our production release of our app so this is extremely high priority for us. We will be rolling back our Titanium version until a fix can be made.", "updateAuthor": { "name": "adammagana", "key": "adammagana", "displayName": "Adam Magana", "active": true, "timeZone": "America/New_York" }, "created": "2014-02-07T15:37:27.000+0000", "updated": "2014-02-07T15:37:27.000+0000" }, { "id": "291930", "author": { "name": "ingo", "key": "ingo", "displayName": "Ingo Muschenetz", "active": true, "timeZone": "America/Los_Angeles" }, "body": "[~adammagana] A few questions:\n\n# What version of SDK are you using that works?\n# Which version fails?\n# What are the modules you are using in your project?\n# Can you please file the crash log?", "updateAuthor": { "name": "ingo", "key": "ingo", "displayName": "Ingo Muschenetz", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2014-02-07T18:06:14.000+0000", "updated": "2014-02-07T18:06:14.000+0000" }, { "id": "291947", "author": { "name": "adammagana", "key": "adammagana", "displayName": "Adam Magana", "active": true, "timeZone": "America/New_York" }, "body": "Since I left the first comment we've had a development. We reverted our Titanium SDK version to {{3.1.3.GA}} and our CLI version to {{3.1.2}} but we are still having crashes. We have tried deploying using deploy type {{test}} and deploy type {{production}}. The only module we are using is the Urban Airship (https://github.com/appcelerator/titanium_modules/blob/master/urbanairship/mobile/android/documentation/index.md) module. Here is our crash log:\r\n\r\n{code}\r\n02-07 14:32:23.498: E/TiApplication(32117): (main) [1141,1459] Sending event: exception on thread: main msg:java.lang.RuntimeException: Unable to resume activity {com.drund.mobile/org.appcelerator.titanium.TiActivity}: java.lang.NullPointerException; Titanium 3.1.3,2013/09/18 12:01,222f4d1\r\n02-07 14:32:23.498: E/TiApplication(32117): java.lang.RuntimeException: Unable to resume activity {com.drund.mobile/org.appcelerator.titanium.TiActivity}: java.lang.NullPointerException\r\n02-07 14:32:23.498: E/TiApplication(32117): \tat android.app.ActivityThread.performResumeActivity(ActivityThread.java:3228)\r\n02-07 14:32:23.498: E/TiApplication(32117): \tat android.app.ActivityThread.handleResumeActivity(ActivityThread.java:3266)\r\n02-07 14:32:23.498: E/TiApplication(32117): \tat android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2579)\r\n02-07 14:32:23.498: E/TiApplication(32117): \tat android.app.ActivityThread.access$600(ActivityThread.java:162)\r\n02-07 14:32:23.498: E/TiApplication(32117): \tat android.app.ActivityThread$H.handleMessage(ActivityThread.java:1413)\r\n02-07 14:32:23.498: E/TiApplication(32117): \tat android.os.Handler.dispatchMessage(Handler.java:99)\r\n02-07 14:32:23.498: E/TiApplication(32117): \tat android.os.Looper.loop(Looper.java:158)\r\n02-07 14:32:23.498: E/TiApplication(32117): \tat android.app.ActivityThread.main(ActivityThread.java:5789)\r\n02-07 14:32:23.498: E/TiApplication(32117): \tat java.lang.reflect.Method.invokeNative(Native Method)\r\n02-07 14:32:23.498: E/TiApplication(32117): \tat java.lang.reflect.Method.invoke(Method.java:525)\r\n02-07 14:32:23.498: E/TiApplication(32117): \tat com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:1027)\r\n02-07 14:32:23.498: E/TiApplication(32117): \tat com.android.internal.os.ZygoteInit.main(ZygoteInit.java:843)\r\n02-07 14:32:23.498: E/TiApplication(32117): \tat dalvik.system.NativeStart.main(Native Method)\r\n02-07 14:32:23.498: E/TiApplication(32117): Caused by: java.lang.NullPointerException\r\n02-07 14:32:23.498: E/TiApplication(32117): \tat org.appcelerator.titanium.TiApplication.postAnalyticsEvent(TiApplication.java:662)\r\n02-07 14:32:23.498: E/TiApplication(32117): \tat org.appcelerator.titanium.TiBaseActivity.onResume(TiBaseActivity.java:973)\r\n02-07 14:32:23.498: E/TiApplication(32117): \tat org.appcelerator.titanium.TiActivity.onResume(TiActivity.java:35)\r\n02-07 14:32:23.498: E/TiApplication(32117): \tat android.app.Instrumentation.callActivityOnResume(Instrumentation.java:1282)\r\n02-07 14:32:23.498: E/TiApplication(32117): \tat android.app.Activity.performResume(Activity.java:5287)\r\n02-07 14:32:23.498: E/TiApplication(32117): \tat android.app.ActivityThread.performResumeActivity(ActivityThread.java:3211)\r\n02-07 14:32:23.498: E/TiApplication(32117): \t... 12 more\r\n{code}\r\n\r\n", "updateAuthor": { "name": "adammagana", "key": "adammagana", "displayName": "Adam Magana", "active": true, "timeZone": "America/New_York" }, "created": "2014-02-07T19:48:40.000+0000", "updated": "2014-02-07T19:48:40.000+0000" }, { "id": "291949", "author": { "name": "ingo", "key": "ingo", "displayName": "Ingo Muschenetz", "active": true, "timeZone": "America/Los_Angeles" }, "body": "That appears to be caused by this line:\n\nhttps://github.com/appcelerator/titanium_mobile/blob/3_1_X/android/titanium/src/java/org/appcelerator/titanium/TiApplication.java#L662\n\nor this in master:\n\nhttps://github.com/appcelerator/titanium_mobile/blob/master/android/titanium/src/java/org/appcelerator/titanium/TiApplication.java#L690\n\nIt seems that https://github.com/appcelerator/titanium_mobile/blob/master/android/titanium/src/java/org/appcelerator/titanium/TiApplication.java#L495 (collectAnalytics) appears to have returned false.", "updateAuthor": { "name": "ingo", "key": "ingo", "displayName": "Ingo Muschenetz", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2014-02-07T19:59:40.000+0000", "updated": "2014-02-07T19:59:40.000+0000" }, { "id": "307245", "author": { "name": "ingo", "key": "ingo", "displayName": "Ingo Muschenetz", "active": true, "timeZone": "America/Los_Angeles" }, "body": "[~hpham] to double-check if still crashing with 3.3.0.", "updateAuthor": { "name": "ingo", "key": "ingo", "displayName": "Ingo Muschenetz", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2014-06-02T21:27:20.000+0000", "updated": "2014-06-02T21:27:20.000+0000" }, { "id": "310035", "author": { "name": "ingo", "key": "ingo", "displayName": "Ingo Muschenetz", "active": true, "timeZone": "America/Los_Angeles" }, "body": "All, we believe this may have been solved in SDK 3.3.0 (or that the exception above noting the error of org.appcelerator.titanium.TiApplication.postAnalyticsEvent() is a red herring and will now be replaced with the true error). Can you all please try this with SDK 3.3.0 and let us know if the issue is resolved or if you get a different error.", "updateAuthor": { "name": "ingo", "key": "ingo", "displayName": "Ingo Muschenetz", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2014-06-19T21:46:53.000+0000", "updated": "2014-06-19T21:46:53.000+0000" }, { "id": "310492", "author": { "name": "ingo", "key": "ingo", "displayName": "Ingo Muschenetz", "active": true, "timeZone": "America/Los_Angeles" }, "body": "All, please try build #77 of 3.3.X (from http://builds.appcelerator.com/#3_3_X) to see if this addresses the issue. This includes a fix for thread-safety in analytics.", "updateAuthor": { "name": "ingo", "key": "ingo", "displayName": "Ingo Muschenetz", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2014-06-23T18:55:01.000+0000", "updated": "2014-06-23T18:55:01.000+0000" }, { "id": "312085", "author": { "name": "arnaud_besnier", "key": "arnaud_besnier", "displayName": "Arnaud Besnier", "active": true, "timeZone": "Europe/Berlin" }, "body": "I tried the 3.3.0.Beta SDK and I am sorry to tell you that the bug still happens.", "updateAuthor": { "name": "arnaud_besnier", "key": "arnaud_besnier", "displayName": "Arnaud Besnier", "active": true, "timeZone": "Europe/Berlin" }, "created": "2014-07-02T17:23:03.000+0000", "updated": "2014-07-02T17:23:03.000+0000" }, { "id": "312459", "author": { "name": "ingo", "key": "ingo", "displayName": "Ingo Muschenetz", "active": true, "timeZone": "America/Los_Angeles" }, "body": "[~arnaud] Can you please tell me the exact version you tried? Was it build #77 or later? If you are still getting the crash, what is the crash you are now getting?", "updateAuthor": { "name": "ingo", "key": "ingo", "displayName": "Ingo Muschenetz", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2014-07-06T20:17:14.000+0000", "updated": "2014-07-06T20:17:14.000+0000" }, { "id": "312512", "author": { "name": "arnaud_besnier", "key": "arnaud_besnier", "displayName": "Arnaud Besnier", "active": true, "timeZone": "Europe/Berlin" }, "body": "I don't know which version it is. I think I downloaded it from this page:\r\nhttps://www.appcelerator.com/blog/2014/06/announcing-the-3-3-0-release-candidate-of-titanium-sdk-and-studio/\r\nThe SDK name is 3.3.0.Beta (now the page link enables to download the 3.3.0.RC) but I don't which version.\r\nCan you tell me if I can find this info in the SDK package?\r\n\r\nThe bug may not be exactly the same (I tried this new SDK in development environment - vs the issue found in production -)\r\nThe application opens a \"white screen\" (empty activity), like it does with old SDKs.\r\nAnd then, the app crashes (I did not experience that with the production app).", "updateAuthor": { "name": "arnaud_besnier", "key": "arnaud_besnier", "displayName": "Arnaud Besnier", "active": true, "timeZone": "Europe/Berlin" }, "created": "2014-07-07T08:47:48.000+0000", "updated": "2014-07-07T15:57:37.000+0000" }, { "id": "312558", "author": { "name": "ingo", "key": "ingo", "displayName": "Ingo Muschenetz", "active": true, "timeZone": "America/Los_Angeles" }, "body": "[~arnaud_besnier] What is the crash log?", "updateAuthor": { "name": "ingo", "key": "ingo", "displayName": "Ingo Muschenetz", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2014-07-07T15:45:51.000+0000", "updated": "2014-07-07T15:45:51.000+0000" }, { "id": "313421", "author": { "name": "arnaud_besnier", "key": "arnaud_besnier", "displayName": "Arnaud Besnier", "active": true, "timeZone": "Europe/Berlin" }, "body": "I tried to reproduce the bug with the latest 3.3.0.RC and also 3.3.0.v20140710142512-osx.\r\nThe bug is still present.\r\n\r\nHere is the crash log:\r\n\r\n7-11 14:31:40.180: D/TiProperties(6221): (KrollRuntimeThread) [38,2934] setBool called with key:UrbanAirship.showAppOnClick, value:true\r\n07-11 14:31:40.535: I/TiAPI(6221): | 2014-07-11 14:31:40:519 | ===> UrbanAirship Registration\r\n07-11 14:31:41.890: I/Dev 1.0.0 - UALib(6221): Sending Analytics to: https://combine.urbanairship.com/warp9/\r\n07-11 14:32:20.940: D/dalvikvm(7562): Trying to load lib /data/app-lib/com.shopmium-1/libti.urbanairship.so 0x425b3398\r\n07-11 14:32:20.945: D/dalvikvm(7562): Added shared lib /data/app-lib/com.shopmium-1/libti.urbanairship.so 0x425b3398\r\n07-11 14:32:20.945: D/dalvikvm(7562): No JNI_OnLoad found in /data/app-lib/com.shopmium-1/libti.urbanairship.so 0x425b3398, skipping init\r\n07-11 14:32:49.900: D/KrollV8Runtime(8723): (KrollRuntimeThread) [5,1994] Bootstrapping module: ti.urbanairship\r\n07-11 14:32:49.905: D/dalvikvm(8723): Trying to load lib /data/app-lib/com.shopmium.dev-1/libti.urbanairship.so 0x425b5fd8\r\n07-11 14:32:49.910: D/dalvikvm(8723): Added shared lib /data/app-lib/com.shopmium.dev-1/libti.urbanairship.so 0x425b5fd8\r\n07-11 14:32:49.910: D/dalvikvm(8723): No JNI_OnLoad found in /data/app-lib/com.shopmium.dev-1/libti.urbanairship.so 0x425b5fd8, skipping init\r\n07-11 14:32:52.205: I/Dev 1.0.0 - UALib(8723): Sending Analytics to: https://combine.urbanairship.com/warp9/\r\n07-11 14:32:53.615: W/ActivityManager(2347): Unable to start service Intent { act=android.intent.action.PACKAGE_REPLACED dat=package:com.shopmium.dev flg=0x8000014 cmp=com.shopmium.dev/com.urbanairship.push.GCMPushReceiver (has extras) } U=0: not found\r\n07-11 14:32:57.120: D/dalvikvm(9057): Trying to load lib /data/app-lib/com.shopmium-1/libti.urbanairship.so 0x425b0d38\r\n07-11 14:32:57.130: D/dalvikvm(9057): Added shared lib /data/app-lib/com.shopmium-1/libti.urbanairship.so 0x425b0d38\r\n07-11 14:32:57.130: D/dalvikvm(9057): No JNI_OnLoad found in /data/app-lib/com.shopmium-1/libti.urbanairship.so 0x425b0d38, skipping init\r\n\r\nWe tried to update the UrbanAirship module with the latest UrbanAirship library (4.0.2), it does not fix the bug.\r\nAre you really sure the SDK can fix something?", "updateAuthor": { "name": "arnaud_besnier", "key": "arnaud_besnier", "displayName": "Arnaud Besnier", "active": true, "timeZone": "Europe/Berlin" }, "created": "2014-07-11T12:47:37.000+0000", "updated": "2014-07-11T12:47:37.000+0000" }, { "id": "314118", "author": { "name": "arnaud_besnier", "key": "arnaud_besnier", "displayName": "Arnaud Besnier", "active": true, "timeZone": "Europe/Berlin" }, "body": "With a minimal Titanium app, the bug is present.\r\n\r\nI tried to create a minimal Android native app with the Urban Airship integration (library version 4.0.2), I did not manage to reproduce the bug.\r\n\r\nI have no doubts now, that Titanium integration is the origin of the issue.\r\nDo you have any inputs? Could we patch the SDK (even a ugly patch) ?\r\n", "updateAuthor": { "name": "arnaud_besnier", "key": "arnaud_besnier", "displayName": "Arnaud Besnier", "active": true, "timeZone": "Europe/Berlin" }, "created": "2014-07-15T13:04:53.000+0000", "updated": "2014-07-15T13:04:53.000+0000" }, { "id": "314120", "author": { "name": "jsplaine", "key": "jsplaine", "displayName": "jay splaine", "active": true, "timeZone": "America/New_York" }, "updateAuthor": { "name": "jsplaine", "key": "jsplaine", "displayName": "jay splaine", "active": true, "timeZone": "America/New_York" }, "created": "2014-07-15T13:16:44.000+0000", "updated": "2014-07-15T13:16:44.000+0000" }, { "id": "314134", "author": { "name": "arnaud_besnier", "key": "arnaud_besnier", "displayName": "Arnaud Besnier", "active": true, "timeZone": "Europe/Berlin" }, "body": "Ok, I just tried your patch.\r\nIt works! the app restarts properly.\r\n\r\nReading the code, I don't feel like this patch could bring severe regression.\r\nCan we be confident with it? What do you think?\r\n\r\nThank you for your help", "updateAuthor": { "name": "arnaud_besnier", "key": "arnaud_besnier", "displayName": "Arnaud Besnier", "active": true, "timeZone": "Europe/Berlin" }, "created": "2014-07-15T14:03:53.000+0000", "updated": "2014-07-15T14:03:53.000+0000" }, { "id": "314437", "author": { "name": "pwang", "key": "pwang", "displayName": "Ping Wang", "active": true, "timeZone": "America/Los_Angeles" }, "body": "This is a duplicate of TIMOB-16538.", "updateAuthor": { "name": "pwang", "key": "pwang", "displayName": "Ping Wang", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2014-07-16T18:38:30.000+0000", "updated": "2014-07-16T18:38:30.000+0000" }, { "id": "415144", "author": { "name": "lmorris", "key": "lmorris", "displayName": "Lee Morris", "active": false, "timeZone": "America/Los_Angeles" }, "body": "Closing ticket with reference to previous comments.", "updateAuthor": { "name": "lmorris", "key": "lmorris", "displayName": "Lee Morris", "active": false, "timeZone": "America/Los_Angeles" }, "created": "2017-03-22T22:37:48.000+0000", "updated": "2017-03-22T22:37:48.000+0000" } ], "maxResults": 24, "total": 24, "startAt": 0 } } }