{ "id": "174582", "key": "TIMOB-27691", "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": "8", "description": "", "name": "Needs more info" }, "resolutiondate": "2020-01-14T00:04:13.000+0000", "created": "2019-12-17T13:41:41.000+0000", "priority": { "name": "None", "id": "6" }, "labels": [ "ACF" ], "versions": [ { "id": "20832", "name": "Release 8.3.0", "archived": false, "released": true, "releaseDate": "2019-11-25" } ], "issuelinks": [], "assignee": { "name": "vijaysingh", "key": "vijaysingh", "displayName": "Vijay Singh", "active": true, "timeZone": "America/Los_Angeles" }, "updated": "2020-01-22T13:43:46.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": "10206", "name": "iOS", "description": "iOS Platform" } ], "description": "Hello,\r\n\r\nCustomer have an issue very strange. This app is for ios, He is working with TiSDK 8.3.0. Please have a look at the video. The error has not logs files on Studio console but it is crashing on physical device. The first error is related to crash app after recording video. The other error is related to go to background navigate between apps and return to my app. The same situation the app is crashing. \r\n\r\nExample code: Available on [Here| https://github.com/jorgehip/hipCameraCrash/tree/02-MoveCameraToAlloy]\r\n\r\nI have tested on following environment and able to reproduce the issue:\r\nSDK: 8.3.0.GA, 8.1.0.GA\r\nAppcelerator Command-Line Interface, version 7.1.2\r\nDevice: iPhone 6 plus (12.4.3)\r\nCustomer is getting this issue on iPhone X (iOS 13.x)\r\n\r\n1. I cannot reproduce the second issue (background crash issue).\r\n2. I can reproduce the first issue but not every time. It occurs after capturing video 3/4 times.\r\n\r\nPlease let us know if you need any more information. Thanks", "attachment": [ { "id": "67178", "filename": "Background Crash.mp4", "author": { "name": "fhaque", "key": "fhaque", "displayName": "Fazlul Haque", "active": false, "timeZone": "America/Los_Angeles" }, "created": "2019-12-17T13:40:22.000+0000", "size": 3325534, "mimeType": "video/mp4" }, { "id": "67180", "filename": "RPReplay_Final1576362358.MP4", "author": { "name": "fhaque", "key": "fhaque", "displayName": "Fazlul Haque", "active": false, "timeZone": "America/Los_Angeles" }, "created": "2019-12-17T13:33:14.000+0000", "size": 10175372, "mimeType": "video/mp4" }, { "id": "67179", "filename": "testCameraCrash 15-12-19 7-52 PM.crash", "author": { "name": "fhaque", "key": "fhaque", "displayName": "Fazlul Haque", "active": false, "timeZone": "America/Los_Angeles" }, "created": "2019-12-17T13:39:12.000+0000", "size": 77451, "mimeType": "application/octet-stream" } ], "flagged": false, "summary": "iOS: App is crashing after recording the video on device", "creator": { "name": "fhaque", "key": "fhaque", "displayName": "Fazlul Haque", "active": false, "timeZone": "America/Los_Angeles" }, "subtasks": [], "reporter": { "name": "morahman", "key": "morahman", "displayName": "Motiur Rahman", "active": true, "timeZone": "Asia/Dhaka" }, "environment": null, "closedSprints": [ { "id": 1176, "state": "closed", "name": "2020 Sprint 1", "startDate": "2020-01-02T21:15:56.301Z", "endDate": "2020-01-17T21:15:00.000Z", "completeDate": "2020-01-21T17:44:29.577Z", "originBoardId": 114 }, { "id": 1177, "state": "closed", "name": "2020 Sprint 2", "startDate": "2020-01-20T17:44:37.733Z", "endDate": "2020-01-31T17:44:00.000Z", "completeDate": "2020-01-31T16:57:44.689Z", "originBoardId": 114 } ], "comment": { "comments": [ { "id": "453232", "author": { "name": "homeinspectorpro", "key": "homeinspectorpro", "displayName": "Dominic Maricic", "active": true, "timeZone": "America/Los_Angeles" }, "body": "The background crash seems to happen only (or just a lot more often) on iPhone vs iPad. These issues are causing our users crashes every few minutes so these are critical. Did not occur in previous SDK versions.", "updateAuthor": { "name": "homeinspectorpro", "key": "homeinspectorpro", "displayName": "Dominic Maricic", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2019-12-18T07:09:35.000+0000", "updated": "2019-12-18T07:09:35.000+0000" }, { "id": "453237", "author": { "name": "spulipakkam", "key": "spulipakkam", "displayName": "Srinivasan Pulipakkam", "active": true, "timeZone": "America/Los_Angeles" }, "body": "[~homeinspectorpro] We are investigating it, will schedule it in the next sprint in the new year once we confirm a fix is required.", "updateAuthor": { "name": "spulipakkam", "key": "spulipakkam", "displayName": "Srinivasan Pulipakkam", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2019-12-18T17:46:17.000+0000", "updated": "2019-12-18T17:46:17.000+0000" }, { "id": "453270", "author": { "name": "vijaysingh", "key": "vijaysingh", "displayName": "Vijay Singh", "active": true, "timeZone": "America/Los_Angeles" }, "body": "Create video player once and update media, every time after capturing video. See following updated alloy.js -\r\n\r\nalloy.js\r\n{code:java}\r\n// The contents of this file will be executed before any of\r\n// your view controllers are ever executed, including the index.\r\n// You have access to all functionality on the `Alloy` namespace.\r\n//\r\n// This is a great place to do any initialization for your app\r\n// or create any global variables/functions that you'd like to\r\n// make available throughout your app. You can easily make things\r\n// accessible globally by attaching them to the `Alloy.Globals`\r\n// object. For example:\r\n//\r\n// Alloy.Globals.someGlobalFunction = function(){};\r\n\r\n// added during app creation. this will automatically login to\r\n// ACS for your application and then fire an event (see below)\r\n// when connected or errored. if you do not use ACS in your\r\n// application as a client, you should remove this block\r\n\r\nvar fdir = \"\",\r\n inspectionDir = \"\";\r\nif (Ti.Filesystem.isExternalStoragePresent()) {\r\n Alloy.Globals.fdir = Ti.Filesystem.externalStorageDirectory;\r\n Alloy.Globals.inspectionDir = Ti.Filesystem.externalStorageDirectory;\r\n} else {\r\n if (OS_ANDROID) {\r\n Alloy.Globals.fdir = Ti.Filesystem.applicationDataDirectory;\r\n Alloy.Globals.inspectionDir = Ti.Filesystem.applicationDataDirectory;\r\n } else {\r\n Alloy.Globals.fdir = Ti.Filesystem.applicationDataDirectory + \"../Library/Caches/\";\r\n Alloy.Globals.fdir.setRemoteBackup = false;\r\n Alloy.Globals.inspectionDir = Ti.Filesystem.applicationDataDirectory;\r\n }\r\n}\r\n\r\nvar root = {};\r\nroot.template = [];\r\nroot.pictures = [];\r\nroot.videos = [];\r\nAlloy.Globals.root = root;\r\n\r\n\r\n(function() {\r\n\r\n})();\r\nAlloy.Globals.counterVideos = 1;\r\nvar videoPlayer = Ti.Media.createVideoPlayer({\r\n scalingMode : Titanium.Media.VIDEO_SCALING_ASPECT_FIT,\r\n autoplay : true\r\n});\r\nAlloy.Globals.saveVideo = function(callback) {\r\n require(\"/permissions\").checkCameraPermission(function() {\r\n //var nextVideoId = Math.floor(Math.random() * 100);\r\n var nextVideoId = Alloy.Globals.counterVideos;\r\n\r\n Ti.Media.showCamera({\r\n success : function(e) {\r\n Alloy.Globals.counterVideos = Alloy.Globals.counterVideos+1;\r\n //callback(null, e);\r\n Ti.API.info(\"e.media.length:\" + e.media.length);\r\n var tempFile = Ti.Filesystem.getFile(Alloy.Globals.inspectionDir, nextVideoId + '.mp4');\r\n tempFile.write(e.media);\r\n videoPlayer.setMedia(e.media);\r\n\r\n function setBackgroundImage(thumbResponse, error) {\r\n console.log('--> setBackgroundImage() - thumbResponse: ', thumbResponse, ', error: ', error);\r\n if (error) {\r\n alert('could not capture video');\r\n return;\r\n }\r\n\r\n var thumbanilImage = thumbResponse.image;\r\n var thumbFile = Ti.Filesystem.getFile(Alloy.Globals.inspectionDir, nextVideoId + '.jpg');\r\n thumbFile.write(thumbanilImage);\r\n\r\n var imageView = Ti.UI.createView({\r\n width : \"352\",\r\n height : \"288\",\r\n backgroundImage : thumbFile.nativePath\r\n });\r\n\r\n var lbl = Titanium.UI.createLabel({\r\n text : \" Video \",\r\n backgroundColor : \"#fff\",\r\n font : {\r\n fontSize : 20\r\n },\r\n color : \"black\",\r\n left : 5,\r\n top : 5\r\n });\r\n imageView.add(lbl);\r\n var eventCalled = 0;\r\n imageView.addEventListener('postlayout', function(e) {\r\n if (eventCalled == 0) {\r\n eventCalled++;\r\n Ti.API.info('Inside postlayout event');\r\n Ti.API.info('size : ' + imageView.size.width + ' x ' + imageView.size.height);\r\n var blob = imageView.toImage();\r\n\r\n Ti.API.info(\"JSON.stringify(blob):\" + JSON.stringify(blob));\r\n Ti.API.info('blob.length : ' + blob.length);\r\n Ti.API.info('blob.apiName : ' + blob.apiName);\r\n var thumbFileNew = Ti.Filesystem.getFile(Alloy.Globals.inspectionDir, nextVideoId + '.jpg');\r\n thumbFileNew.write(blob);\r\n var videoFile = {\r\n imageFileName : thumbFileNew.getName(),\r\n thumb : thumbFileNew.getName(),\r\n video : tempFile.getName(),\r\n isVideo : true\r\n };\r\n \r\n Alloy.Globals.root.pictures.push(videoFile); \r\n\r\n callback(videoFile);\r\n window.close();\r\n window.remove(imageView);\r\n imageView = null;\r\n window = null;\r\n blob = null;\r\n thumbanilImage = null;\r\n thumbFile = null;\r\n thumbFileNew = null;\r\n blob = null;\r\n videoFile = null;\r\n }\r\n });\r\n var window = Titanium.UI.createWindow();\r\n window.add(imageView);\r\n window.open();\r\n\r\n }\r\n\r\n\r\n videoPlayer.requestThumbnailImagesAtTimes([0], Titanium.Media.VIDEO_TIME_OPTION_NEAREST_KEYFRAME, setBackgroundImage);\r\n\r\n },\r\n cancel : function(e) {\r\n callback(e, null);\r\n },\r\n error : function(e) {\r\n callback(e, null);\r\n },\r\n mediaTypes : [Titanium.Media.MEDIA_TYPE_VIDEO],\r\n videoMaximumDuration : 30000,\r\n videoQuality : Titanium.Media.QUALITY_LOW\r\n\r\n });\r\n });\r\n};\r\n{code}\r\n", "updateAuthor": { "name": "vijaysingh", "key": "vijaysingh", "displayName": "Vijay Singh", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2019-12-20T21:11:48.000+0000", "updated": "2019-12-20T21:11:48.000+0000" }, { "id": "453677", "author": { "name": "spulipakkam", "key": "spulipakkam", "displayName": "Srinivasan Pulipakkam", "active": true, "timeZone": "America/Los_Angeles" }, "body": "If the response from [~vijaysingh] doesn't resolve the issue , please re-open with additional information", "updateAuthor": { "name": "spulipakkam", "key": "spulipakkam", "displayName": "Srinivasan Pulipakkam", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2020-01-14T00:04:13.000+0000", "updated": "2020-01-14T00:04:13.000+0000" }, { "id": "453760", "author": { "name": "smohammed", "key": "smohammed", "displayName": "Samir Mohammed", "active": true, "timeZone": "America/Los_Angeles" }, "body": "Closing ticket, Please reopen if needed. ", "updateAuthor": { "name": "smohammed", "key": "smohammed", "displayName": "Samir Mohammed", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2020-01-22T13:43:38.000+0000", "updated": "2020-01-22T13:43:38.000+0000" } ], "maxResults": 8, "total": 8, "startAt": 0 } } }