{ "id": "160770", "key": "TIMOB-23477", "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": "5", "description": "All attempts at reproducing this issue failed, or not enough information was available to reproduce the issue. Reading the code produces no clues as to why this behavior would occur. If more information appears later, please reopen the issue.", "name": "Cannot Reproduce" }, "resolutiondate": "2017-01-19T14:17:12.000+0000", "created": "2016-06-03T19:52:25.000+0000", "priority": { "name": "Critical", "id": "1" }, "labels": [], "versions": [], "issuelinks": [], "assignee": { "name": "hknoechel", "key": "hansknoechel", "displayName": "Hans Knöchel", "active": true, "timeZone": "Europe/Berlin" }, "updated": "2017-01-19T14:36:54.000+0000", "status": { "description": "A resolution has been taken, and it is awaiting verification by reporter. From here issues are either reopened, or are closed.", "name": "Resolved", "id": "5", "statusCategory": { "id": 3, "key": "done", "colorName": "green", "name": "Done" } }, "components": [ { "id": "10206", "name": "iOS", "description": "iOS Platform" } ], "description": "Seen on iOS only\r\n\r\nWe're attempting to replicate the photo-viewing experience of the native photos app. We use a ScrollableView, with embedded ScrollViews, each with an image so that the user can swipe between photos, then pinch-to-zoom on the photos. We reset the zoom scale to 1 if the user swipes to the next/previous photo.\r\n\r\nHowever, we have found the ScrollableView freezes randomly. Using the sample code below, you can reproduce with the following steps:\r\n\r\n# Swipe forward a photo or two\r\n# Pinch to zoom in\r\n# Swipe back to the previous photos (aka, to the left)\r\n# Swipe forward / right\r\n# Not every time, but frequently the ScrollableView is now stuck. You can't swipe to the next or previous image in the set. The view bounces a bit, but won't scroll. No log output or errors are seen in the console. It's as if the ScrollableView no longer receives the swipe gesture. Zooming in then out \"un-sticks\" it, which is not reasonable to expect our users to discover.\r\n# If it doesn't freeze, repeat the steps above. It sometimes freezes if you swipe forward (to the right) after zooming a photo also. \r\n\r\n{code}\r\nvar currentPage = 0,\r\n deviceWidth = Ti.Platform.displayCaps.platformWidth;\r\n\r\nvar win = Titanium.UI.createWindow({\r\n title: 'Tab 1',\r\n backgroundColor: '#000',\r\n navBarHidden: true,\r\n fullscreen: true\r\n});\r\nvar sav = Ti.UI.createScrollableView();\r\nwin.add(sav);\r\n\r\nvar photos = [\r\n \"https://s3.amazonaws.com/static-uat.acvauctions.com/vehicle_photos/AL1VP9Ng5N.jpg\",\r\n \"https://s3.amazonaws.com/static-uat.acvauctions.com/vehicle_photos/4xdHX5gCpF.jpg\",\r\n \"https://s3.amazonaws.com/static-uat.acvauctions.com/vehicle_photos/3T0ZeAED7m.jpg\",\r\n \"https://s3.amazonaws.com/static-uat.acvauctions.com/vehicle_photos/D6imFFILV8.jpg\",\r\n \"https://s3.amazonaws.com/static-uat.acvauctions.com/vehicle_photos/hn5Ia8Zvof.jpg\",\r\n \"https://s3.amazonaws.com/static-uat.acvauctions.com/vehicle_photos/6BcuYSToU9.jpg\",\r\n \"https://s3.amazonaws.com/static-uat.acvauctions.com/vehicle_photos/DpQlIzHfE1.jpg\",\r\n \"https://s3.amazonaws.com/static-uat.acvauctions.com/vehicle_photos/l0TndCtDnf.jpg\",\r\n \"https://s3.amazonaws.com/static-uat.acvauctions.com/vehicle_photos/tVq0HjMPBh.jpg\",\r\n \"https://s3.amazonaws.com/static-uat.acvauctions.com/vehicle_photos/9CKlRimn_G.jpg\",\r\n \"https://s3.amazonaws.com/static-uat.acvauctions.com/vehicle_photos/auekHpHf1Z.jpg\"\r\n];\r\n\r\nphotos.forEach(function (picURL) {\r\n var zoomView = Ti.UI.createScrollView({\r\n height: Ti.UI.FILL,\r\n width: Ti.UI.FILL,\r\n zoomScale: 1,\r\n maxZoomScale: 5,\r\n minZoomScale: 1,\r\n contentHeight: Ti.UI.SIZE,\r\n contentWidth: Ti.UI.SIZE,\r\n top: 0,\r\n left: 0,\r\n disableBounce: false,\r\n backgroundColor: 'black'\r\n });\r\n zoomView.add(Ti.UI.createImageView({\r\n image: picURL,\r\n width: deviceWidth,\r\n height: deviceWidth,\r\n left: 0\r\n }));\r\n sav.addView(zoomView);\r\n});\r\n\r\nfunction onScroll(event) {\r\n if (!event || isNaN(event.currentPage)) {\r\n console.log('no event / currentPage');\r\n return;\r\n }\r\n currentPage = event.currentPage;\r\n if (sav.views[currentPage - 1]) {\r\n resetZoom(currentPage - 1);\r\n }\r\n if (sav.views[currentPage + 1]) {\r\n resetZoom(currentPage + 1);\r\n }\r\n}\r\nsav.addEventListener(\"scrollend\", onScroll);\r\n\r\nsav.addEventListener(\"doubletap\", function () {\r\n resetZoom(currentPage);\r\n});\r\n\r\nfunction resetZoom(pageNum) {\r\n if (sav.views[pageNum].apiName === \"Ti.UI.ScrollView\" && sav.views[pageNum].zoomScale !== 1) {\r\n sav.views[pageNum].zoomScale = 1;\r\n }\r\n}\r\n\r\nwin.open();\r\n{code}", "attachment": [], "flagged": false, "summary": "iOS: ScrollableView with embedded ScrollView freezes after zooming the scrollview", "creator": { "name": "acvauctions", "key": "acvauctions", "displayName": "Tim Poulsen (ACV)", "active": true, "timeZone": "America/New_York" }, "subtasks": [], "reporter": { "name": "acvauctions", "key": "acvauctions", "displayName": "Tim Poulsen (ACV)", "active": true, "timeZone": "America/New_York" }, "environment": "5.2.2.GA, iOS", "closedSprints": [ { "id": 796, "state": "closed", "name": "2017 Sprint 02 SDK", "startDate": "2017-01-15T00:00:41.845Z", "endDate": "2017-01-29T00:00:00.000Z", "completeDate": "2017-01-30T21:10:44.640Z", "originBoardId": 114 } ], "comment": { "comments": [ { "id": "388091", "author": { "name": "hknoechel", "key": "hansknoechel", "displayName": "Hans Knöchel", "active": true, "timeZone": "Europe/Berlin" }, "body": "So the following code does work and does not crash:\r\n{code:javascript}\r\n// Does not crash\r\n\r\nvar win = Ti.UI.createWindow({\r\n backgroundColor: \"white\"\r\n});\r\n\r\nvar scroll = Ti.UI.createScrollView({\r\n backgroundColor: \"#f00\",\r\n maxZoomScale: 10.0,\r\n minZoomScale: 0.1,\r\n animated: true\r\n});\r\n\r\nscroll.add(Ti.UI.createImageView({\r\n image: \"default_app_logo.png\"\r\n}))\r\n\r\nvar dummyView = Ti.UI.createView({\r\n backgroundColor: \"yellow\"\r\n});\r\n\r\nvar scrollableView = Ti.UI.createScrollableView({\r\n views: [dummyView, scroll]\r\n});\r\n \r\nwin.add(scrollableView);\r\nwin.open();\r\n{code}\r\n\r\nWill check yours", "updateAuthor": { "name": "hknoechel", "key": "hansknoechel", "displayName": "Hans Knöchel", "active": true, "timeZone": "Europe/Berlin" }, "created": "2016-06-10T20:22:52.000+0000", "updated": "2016-06-10T20:22:52.000+0000" }, { "id": "389776", "author": { "name": "arohini", "key": "arohini", "displayName": "Ajith Rohini", "active": true, "timeZone": "America/Los_Angeles" }, "body": "Hi [~hansknoechel] Is this still an issue or is it resolved? \r\nThx !", "updateAuthor": { "name": "arohini", "key": "arohini", "displayName": "Ajith Rohini", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2016-07-01T18:22:47.000+0000", "updated": "2016-07-01T18:22:47.000+0000" }, { "id": "389778", "author": { "name": "acvauctions", "key": "acvauctions", "displayName": "Tim Poulsen (ACV)", "active": true, "timeZone": "America/New_York" }, "body": "The test code from Hans above does not match the scenario I posted in the original ticket & example. It does _not_ resolve this ticket nor show that the issue is invalid.", "updateAuthor": { "name": "acvauctions", "key": "acvauctions", "displayName": "Tim Poulsen (ACV)", "active": true, "timeZone": "America/New_York" }, "created": "2016-07-01T19:09:12.000+0000", "updated": "2016-07-01T19:09:12.000+0000" }, { "id": "393727", "author": { "name": "hknoechel", "key": "hansknoechel", "displayName": "Hans Knöchel", "active": true, "timeZone": "Europe/Berlin" }, "body": "Hey Tim, sorry for the delay. Just re-tested your example as well (using 5.4.0 and 6.0.0) and cannot reproduce it at all. Please see [this video|https://www.dropbox.com/s/u0fwxtd3nxl0sco/TIMOB-23477.mov?dl=0] for some visual interaction. I'd like ask you to recheck with the above SDK's and ensure that it's not something at your end. I will try to get the QE to test it as well, but currently it does not look like an SDK-issue. Thanks!", "updateAuthor": { "name": "hknoechel", "key": "hansknoechel", "displayName": "Hans Knöchel", "active": true, "timeZone": "Europe/Berlin" }, "created": "2016-08-21T23:17:54.000+0000", "updated": "2016-08-21T23:17:54.000+0000" }, { "id": "393776", "author": { "name": "acvauctions", "key": "acvauctions", "displayName": "Tim Poulsen (ACV)", "active": true, "timeZone": "America/New_York" }, "body": "Hans, using the code posted above, I'm still able to reproduce. Using SDK 5.2.2.GA and 5.4.0.GA with Alloy 1.9.0 on an iPhone 5 running iOS 9.3.4. Steps are: cold launch app, swipe forward one pic, zoom in, don't zoom back out and swipe backward, swipe forward, try to swipe again but the app will be frozen. The app doesn't freeze every time, but does a lot of the times I've tested.", "updateAuthor": { "name": "acvauctions", "key": "acvauctions", "displayName": "Tim Poulsen (ACV)", "active": true, "timeZone": "America/New_York" }, "created": "2016-08-22T15:33:28.000+0000", "updated": "2016-08-22T15:33:28.000+0000" }, { "id": "397173", "author": { "name": "hknoechel", "key": "hansknoechel", "displayName": "Hans Knöchel", "active": true, "timeZone": "Europe/Berlin" }, "body": "Hey Tim, can you provide the tiapp you use? (especially if you have {{use-autolayout}} and/or {{run-on-main-thread}} enabled.", "updateAuthor": { "name": "hknoechel", "key": "hansknoechel", "displayName": "Hans Knöchel", "active": true, "timeZone": "Europe/Berlin" }, "created": "2016-09-24T22:26:59.000+0000", "updated": "2016-09-24T22:26:59.000+0000" }, { "id": "397191", "author": { "name": "acvauctions", "key": "acvauctions", "displayName": "Tim Poulsen (ACV)", "active": true, "timeZone": "America/New_York" }, "body": "[~hansknoechel] we do not use either {{use-autolayout}} or {{run-on-main-thread}}. Is there a way to send you the tiapp securely? I don't want to release keys or guids that would compromise our app. Maybe something through the Axway support portal or PM me your email on TiSlack or something (I'm there as skypanther). ? Here's the ios section if it helps:\r\n\r\n{code}\r\n\r\ntrue\r\n#ffffff\r\n\r\n \r\n NSLocationWhenInUseUsageDescription\r\n We need this to search for auctions near you.\r\n UISupportedInterfaceOrientations~iphone\r\n \r\n UIInterfaceOrientationPortrait\r\n \r\n UISupportedInterfaceOrientations~ipad\r\n \r\n UIInterfaceOrientationPortrait\r\n UIInterfaceOrientationPortraitUpsideDown\r\n UIInterfaceOrientationLandscapeLeft\r\n UIInterfaceOrientationLandscapeRight\r\n \r\n UIRequiresPersistentWiFi\r\n \r\n UIPrerenderedIcon\r\n \r\n UIStatusBarHidden\r\n \r\n UIStatusBarStyle\r\n UIStatusBarStyleDefault\r\n CFBundleURLTypes\r\n \r\n \r\n CFBundleTypeRole\r\n Editor\r\n CFBundleURLName\r\n our_bundle_name\r\n \r\n \r\n \r\n\r\n\r\n{code}", "updateAuthor": { "name": "acvauctions", "key": "acvauctions", "displayName": "Tim Poulsen (ACV)", "active": true, "timeZone": "America/New_York" }, "created": "2016-09-25T23:57:08.000+0000", "updated": "2016-09-25T23:57:08.000+0000" }, { "id": "397211", "author": { "name": "nmishra", "key": "nmishra", "displayName": "Neeraj Mishra", "active": true, "timeZone": "America/Phoenix" }, "body": "Hi [~timpoulsen]: You can send tiapp to us over support portal. The current ticket is INC0379874. I will send you an email from our support portal and you can send the app then as attachment which i can share it with [~hansknoechel].", "updateAuthor": { "name": "nmishra", "key": "nmishra", "displayName": "Neeraj Mishra", "active": true, "timeZone": "America/Phoenix" }, "created": "2016-09-26T05:30:13.000+0000", "updated": "2016-09-26T05:30:13.000+0000" }, { "id": "404372", "author": { "name": "amukherjee", "key": "amukherjee", "displayName": "Abir Mukherjee", "active": true, "timeZone": "America/Los_Angeles" }, "body": "I tested with this environment:\r\nNPM Version: 2.15.9\r\nNode Version: 4.5.0\r\nMac OS: 10.12.1\r\nAppc CLI: 6.1.0\r\nAppc CLI NPM: 4.2.8\r\nTitanium SDK version: 6.0.1.GA\r\nAppcelerator Studio, build: 4.8.1.201612050850\r\nXcode 8.2\r\niOS Device: 10.0\r\n\r\nI was not able to reproduce the issue with SDK 6.0.1 GA. I used the demo code provided in the description. When I zoomed in, I was able to scroll either left or right consistently. To see if I could reproduce it with an older build, I tried it with SDK 5.5.0 GA, and was able to reproduce the issue. When I zoomed in, ScrollView would get \"stuck\", and the only way to scroll to a different picture was to zoom back out. However, as I first stated, with the latest SDK 6.0.1 and CLI 6.1.0, I am not able to reproduce the issue.", "updateAuthor": { "name": "amukherjee", "key": "amukherjee", "displayName": "Abir Mukherjee", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2017-01-10T17:57:19.000+0000", "updated": "2017-01-11T00:20:25.000+0000" }, { "id": "404852", "author": { "name": "hknoechel", "key": "hansknoechel", "displayName": "Hans Knöchel", "active": true, "timeZone": "Europe/Berlin" }, "body": "Based on [~amukherjee]s finding, I'm resolving this ticket for now. Tim, please let me know if it still persists for you, then we may need to update our test-cases in revisit it again. Thanks everyone!", "updateAuthor": { "name": "hknoechel", "key": "hansknoechel", "displayName": "Hans Knöchel", "active": true, "timeZone": "Europe/Berlin" }, "created": "2017-01-19T14:17:12.000+0000", "updated": "2017-01-19T14:17:12.000+0000" }, { "id": "404856", "author": { "name": "acvauctions", "key": "acvauctions", "displayName": "Tim Poulsen (ACV)", "active": true, "timeZone": "America/New_York" }, "body": "Thanks and sorry for the slow follow-up. We removed this feature from our app because of the bug. Users are pretty accustomed to the current functionality so I haven't made it a priority to add this back in. Other fish to fry, as the saying goes. ", "updateAuthor": { "name": "acvauctions", "key": "acvauctions", "displayName": "Tim Poulsen (ACV)", "active": true, "timeZone": "America/New_York" }, "created": "2017-01-19T14:36:54.000+0000", "updated": "2017-01-19T14:36:54.000+0000" } ], "maxResults": 15, "total": 15, "startAt": 0 } } }