{ "id": "170506", "key": "TIMOB-25574", "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": [ { "id": "19988", "description": "", "name": "Release 7.0.1", "archived": false, "released": true, "releaseDate": "2017-12-21" } ], "resolution": { "id": "1", "description": "A fix for this issue is checked into the tree and tested.", "name": "Fixed" }, "resolutiondate": "2017-12-13T22:37:02.000+0000", "created": "2017-11-30T14:27:52.000+0000", "priority": { "name": "Critical", "id": "1" }, "labels": [], "versions": [ { "id": "17609", "description": "", "name": "Release 7.0.0", "archived": false, "released": true, "releaseDate": "2017-12-07" } ], "issuelinks": [], "assignee": { "name": "hknoechel", "key": "hansknoechel", "displayName": "Hans Knöchel", "active": true, "timeZone": "Europe/Berlin" }, "updated": "2017-12-14T01:13:43.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": "*Steps to reproduce:*\r\n- Create a new project.\r\n- Add this code to index.js\r\n\r\n{code:java}\r\nvar win2 = Titanium.UI.createWindow({\r\n backgroundColor: 'red',\r\n title: 'Red Window'\r\n});\r\n\r\nvar win1 = Titanium.UI.iOS.createNavigationWindow({\r\n window: win2\r\n});\r\n\r\nvar win3 = Titanium.UI.createWindow({\r\n backgroundColor: 'blue',\r\n title: 'Blue Window'\r\n});\r\n\r\nvar button = Titanium.UI.createButton({\r\n title: 'Open Blue Window'\r\n});\r\nbutton.addEventListener('click', function(){\r\n win1.openWindow(win3, {animated:true});\r\n});\r\n\r\nwin2.add(button);\r\nvar button2 = Titanium.UI.createButton({\r\n title: 'Close Blue Window'\r\n});\r\nbutton2.addEventListener('click', function(){\r\n win1.closeWindow(win3, {animated:false}); //win3.close() will also work!!\r\n});\r\nvar videoPlayer = Titanium.Media.createVideoPlayer({\r\n\turl: 'https://www.w3schools.com/html/mov_bbb.mp4',\r\n top : 2,\r\n autoplay : true,\r\n backgroundColor : 'blue',\r\n height : 300,\r\n width : 300,\r\n mediaControlStyle : Titanium.Media.VIDEO_CONTROL_DEFAULT,\r\n scalingMode : Titanium.Media.VIDEO_SCALING_ASPECT_FIT\r\n});\r\nwin3.add(videoPlayer);\r\nwin3.add(button2);\r\nwin1.open();\r\n{code}\r\n- Run the app in ios simulator.\r\n- Click on \"Open blue window\" button.\r\n- Click on \"Close blue window\" button.\r\n\r\n*Actual result:*\r\nApp crashes with exception:\r\n\r\n{code:java}\r\n[ERROR] : The application has crashed with an uncaught exception 'NSInternalInconsistencyException'.\r\n[ERROR] : Reason:\r\n[ERROR] : Cannot update for observer for the key path \"player.status\" from , most likely because the value for the key \"player\" has changed without an appropriate KVO notification being sent. Check the KVO-compliance of the AVPlayerViewController class.\r\n[ERROR] : Stack trace:\r\n[ERROR] : 0 CoreFoundation 0x0000000111d5baf3 __exceptionPreprocess + 147\r\n[ERROR] : 1 libobjc.A.dylib 0x0000000111291141 objc_exception_throw + 48\r\n[ERROR] : 2 CoreFoundation 0x0000000111dc4625 +[NSException raise:format:] + 197\r\n[ERROR] : 3 Foundation 0x000000010c80d371 -[NSKeyValueNestedProperty object:withObservance:didChangeValueForKeyOrKeys:recurse:forwardingValues:] + 776\r\n[ERROR] : 4 Foundation 0x000000010c7e1fe2 NSKeyValueDidChange + 179\r\n[ERROR] : 5 Foundation 0x000000010c8bf90f -[NSObject(NSKeyValueObservingPrivate) _changeValueForKeys:count:maybeOldValuesDict:usingBlock:] + 868\r\n[ERROR] : 6 Foundation 0x000000010c7a7f8c -[NSObject(NSKeyValueObservingPrivate) _changeValueForKey:key:key:usingBlock:] + 61\r\n[ERROR] : 7 Foundation 0x000000010c80cee6 _NSSetObjectValueAndNotify + 262\r\n[ERROR] : 8 TestProject 0x000000010ab31875 -[TiMediaVideoPlayerProxy windowWillClose] + 133\r\n[ERROR] : 9 CoreFoundation 0x0000000111d01e8d -[NSArray makeObjectsPerformSelector:] + 269\r\n[ERROR] : 10 TestProject 0x000000010aa8bec1 -[TiViewProxy windowWillClose] + 65\r\n[ERROR] : 11 TestProject 0x000000010ac6be60 -[TiWindowProxy windowWillClose] + 256\r\n[ERROR] : 12 TestProject 0x000000010ab5841c -[TiUIiOSNavWindowProxy navigationController:willShowViewController:animated:] + 348\r\n[ERROR] : 13 UIKit 0x000000010cedec2f -[UINavigationController _startTransition:fromViewController:toViewController:] + 1011\r\n[ERROR] : 14 UIKit 0x000000010cedfa03 -[UINavigationController _startDeferredTransitionIfNeeded:] + 843\r\n[ERROR] : 15 UIKit 0x000000010cee0b41 -[UINavigationController __viewWillLayoutSubviews] + 58\r\n[ERROR] : 16 UIKit 0x000000010d0d260c -[UILayoutContainerView layoutSubviews] + 231\r\n[ERROR] : 17 UIKit 0x000000010cdbf55b -[UIView(CALayerDelegate) layoutSublayersOfLayer:] + 1268\r\n[ERROR] : 18 QuartzCore 0x000000010ffeb904 -[CALayer layoutSublayers] + 146\r\n[ERROR] : 19 QuartzCore 0x000000010ffdf526 _ZN2CA5Layer16layout_if_neededEPNS_11TransactionE + 370\r\n[ERROR] : 20 QuartzCore 0x000000010ffdf3a0 _ZN2CA5Layer28layout_and_display_if_neededEPNS_11TransactionE + 24\r\n[ERROR] : 21 QuartzCore 0x000000010ff6ee92 _ZN2CA7Context18commit_transactionEPNS_11TransactionE + 294\r\n[ERROR] : 22 QuartzCore 0x000000010ff9b130 _ZN2CA11Transaction6commitEv + 468\r\n[ERROR] : 23 UIKit 0x000000010ccf5367 _UIApplicationFlushRunLoopCATransactionIfTooLate + 167\r\n[ERROR] : 24 UIKit 0x000000010d4f67a3 __handleEventQueue + 5843\r\n[ERROR] : 25 CoreFoundation 0x0000000111d01c01 __CFRUNLOOP_IS_CALLING_OUT_TO_A_SOURCE0_PERFORM_FUNCTION__ + 17\r\n[ERROR] : 26 CoreFoundation 0x0000000111ce70cf __CFRunLoopDoSources0 + 527\r\n[ERROR] : 27 CoreFoundation 0x0000000111ce65ff __CFRunLoopRun + 911\r\n[ERROR] : 28 CoreFoundation 0x0000000111ce6016 CFRunLoopRunSpecific + 406\r\n[ERROR] : 29 GraphicsServices 0x0000000113467a24 GSEventRunModal + 62\r\n[ERROR] : 30 UIKit 0x000000010ccfc134 UIApplicationMain + 159\r\n[ERROR] : 31 TestProject 0x000000010aa4d114 main + 100\r\n[ERROR] : 32 libdyld.dylib 0x0000000112dbe65d start + 1\r\n[ERROR] : 33 ??? 0x0000000000000001 0x0 + 1\r\n{code}\r\n\r\n*Expected result:*\r\nApp closes the window without any exception.\r\n\r\nPlease let me know if there is any additional information needed to reproduce.", "attachment": [], "flagged": false, "summary": "iOS: SDK 7.0.0 - App crashes with exception when closing window that contains videoplayer", "creator": { "name": "kbrand", "key": "kbrand", "displayName": "Kristjan Brand", "active": true, "timeZone": "America/Los_Angeles" }, "subtasks": [], "reporter": { "name": "kbrand", "key": "kbrand", "displayName": "Kristjan Brand", "active": true, "timeZone": "America/Los_Angeles" }, "environment": "SDK version 7.0.0.v20171128203009\r\n", "comment": { "comments": [ { "id": "431536", "author": { "name": "hknoechel", "key": "hansknoechel", "displayName": "Hans Knöchel", "active": true, "timeZone": "Europe/Berlin" }, "body": "PR (master): https://github.com/appcelerator/titanium_mobile/pull/9641\r\nPR (7_0_X): https://github.com/appcelerator/titanium_mobile/pull/9664\r\n\r\nTest-case above, unit-test in the PR.", "updateAuthor": { "name": "hknoechel", "key": "hansknoechel", "displayName": "Hans Knöchel", "active": true, "timeZone": "Europe/Berlin" }, "created": "2017-11-30T16:07:11.000+0000", "updated": "2017-12-07T15:06:50.000+0000" }, { "id": "432057", "author": { "name": "ewieber", "key": "ewieber", "displayName": "Eric Wieber", "active": false, "timeZone": "America/Los_Angeles" }, "body": "FR Passed. App no longer crashes when a window with a playing video in it is closed", "updateAuthor": { "name": "ewieber", "key": "ewieber", "displayName": "Eric Wieber", "active": false, "timeZone": "America/Los_Angeles" }, "created": "2017-12-12T22:25:55.000+0000", "updated": "2017-12-12T22:46:27.000+0000" }, { "id": "432133", "author": { "name": "ewieber", "key": "ewieber", "displayName": "Eric Wieber", "active": false, "timeZone": "America/Los_Angeles" }, "body": "Verified in SDK builds 7.0.1.v20171213104555 & 7.1.0.v20171213155647", "updateAuthor": { "name": "ewieber", "key": "ewieber", "displayName": "Eric Wieber", "active": false, "timeZone": "America/Los_Angeles" }, "created": "2017-12-14T01:13:43.000+0000", "updated": "2017-12-14T01:13:43.000+0000" } ], "maxResults": 3, "total": 3, "startAt": 0 } } }