{ "id": "164493", "key": "TIMOB-24139", "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": "16980", "description": "New V8", "name": "Release 6.0.0", "archived": false, "released": true, "releaseDate": "2016-11-15" } ], "resolution": { "id": "1", "description": "A fix for this issue is checked into the tree and tested.", "name": "Fixed" }, "resolutiondate": "2016-11-11T14:21:50.000+0000", "created": "2016-11-11T08:58:33.000+0000", "priority": { "name": "Critical", "id": "1" }, "labels": [ "regression" ], "versions": [ { "id": "16980", "description": "New V8", "name": "Release 6.0.0", "archived": false, "released": true, "releaseDate": "2016-11-15" } ], "issuelinks": [], "assignee": { "name": "hknoechel", "key": "hansknoechel", "displayName": "Hans Knöchel", "active": true, "timeZone": "Europe/Berlin" }, "updated": "2016-11-11T19:19:21.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\n1. Click Show window button\r\n2. Click Back button\r\n3. Click Show window button again\r\n=> window is crashed.\r\n\r\nRemove the backgroundImage property of button, App is not crashed anymore.\r\n\r\nSDK: 6 RC 6.0.0.v20161101155110\r\nIOS simulator + device iPhone 5C\r\nOSX 10.11.6\r\n", "attachment": [ { "id": "60687", "filename": "close3.png", "author": { "name": "hknoechel", "key": "hansknoechel", "displayName": "Hans Knöchel", "active": true, "timeZone": "Europe/Berlin" }, "created": "2016-11-11T14:12:32.000+0000", "size": 5673, "mimeType": "image/png" }, { "id": "60682", "filename": "test.zip", "author": { "name": "ptquang86", "key": "ptquang86", "displayName": "Quang Pham", "active": true, "timeZone": "Asia/Jakarta" }, "created": "2016-11-11T08:54:52.000+0000", "size": 10480672, "mimeType": "application/zip" } ], "flagged": false, "summary": "iOS: App is crashed if it contain Button with backgroundImage property (regression)", "creator": { "name": "ptquang86", "key": "ptquang86", "displayName": "Quang Pham", "active": true, "timeZone": "Asia/Jakarta" }, "subtasks": [], "reporter": { "name": "ptquang86", "key": "ptquang86", "displayName": "Quang Pham", "active": true, "timeZone": "Asia/Jakarta" }, "environment": null, "closedSprints": [ { "id": 752, "state": "closed", "name": "2016 Sprint 23 SDK", "startDate": "2016-11-05T00:39:37.027Z", "endDate": "2016-11-19T01:39:00.000Z", "completeDate": "2016-11-29T06:51:57.887Z", "originBoardId": 114 } ], "comment": { "comments": [ { "id": "400776", "author": { "name": "eharris", "key": "eharris", "displayName": "Ewan Harris", "active": true, "timeZone": "Europe/Dublin" }, "body": "[~ptquang86] Thanks for the report!\r\n\r\n*This is a regression from 5.5.1.GA*\r\nI can reproduce this using\r\n\r\nOS: Mac OS X 10.11.6\r\nAppc core: 6.0.0-69\r\nAppc NPM: 4.2.8-9\r\nTi SDK: 6.0.0.v20161110183702\r\nXcode: 8.1\r\niOS 10.1 simulator\r\n\r\n{code: title=Classic test case}\r\nvar win2 = Titanium.UI.createWindow();\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\r\nvar button = Titanium.UI.createButton({\r\n title: 'Open Window'\r\n});\r\nbutton.addEventListener('click', function(){\r\n win1.openWindow(win3);\r\n});\r\n\r\nwin2.add(button);\r\nvar button2 = Titanium.UI.createButton({\r\n backgroundImage: 'assets/images/tab1.png'\r\n});\r\n\r\nwin3.add(button2);\r\nwin1.open();\r\n{code}\r\n\r\n{code: title:Crash log}\r\n[ERROR] The application has crashed with an uncaught exception 'NSInvalidArgumentException'.\r\n[ERROR] Reason:\r\n[ERROR] -[NSPathStore2 drawingStroke]: unrecognized selector sent to instance 0x6000002833e0\r\n[ERROR] Stack trace:\r\n[ERROR] 0 CoreFoundation 0x000000011530f333 __exceptionPreprocess + 147\r\n[ERROR] 1 libobjc.A.dylib 0x00000001148b521e objc_exception_throw + 48\r\n[ERROR] 2 CoreFoundation 0x000000011537ef34 -[NSObject(NSObject) doesNotRecognizeSelector:] + 132\r\n[ERROR] 3 CoreFoundation 0x0000000115294c15 ___forwarding___ + 1013\r\n[ERROR] 4 CoreFoundation 0x0000000115294798 _CF_forwarding_prep_0 + 120\r\n[ERROR] 5 UIKit 0x000000011085d5cb UICheckForDrawingStyle + 39\r\n[ERROR] 6 CoreFoundation 0x0000000115257666 __CFDictionaryApplyFunction_block_invoke + 22\r\n[ERROR] 7 CoreFoundation 0x0000000115257620 CFBasicHashApply + 144\r\n[ERROR] 8 CoreFoundation 0x0000000115257549 CFDictionaryApplyFunction + 185\r\n[ERROR] 9 UIKit 0x000000011085d64b -[UIButton _hasDrawingStyle] + 49\r\n[ERROR] 10 UIKit 0x000000011085a3b1 -[UIButton _isModernButton] + 86\r\n[ERROR] 11 UIKit 0x0000000110864ffe -[UIButton _shouldDefaultToTemplatesForImageViewBackground:] + 25\r\n[ERROR] 12 UIKit 0x000000011086505e -[UIButton _updateEffectsForImageView:background:] + 58\r\n[ERROR] 13 UIKit 0x000000011085999a -[UIButton _didChangeFromIdiom:onScreen:traverseHierarchy:] + 104\r\n[ERROR] 14 UIKit 0x000000011052a13f -[UIView(Internal) _didChangeFromIdiomOnScreen:traverseHierarchy:] + 181\r\n[ERROR] 15 UIKit 0x000000011052969b -[UIView(Internal) _didMoveFromWindow:toWindow:] + 1713\r\n[ERROR] 16 UIKit 0x00000001105f2331 -[UIControl _didMoveFromWindow:toWindow:] + 68\r\n[ERROR] 17 UIKit 0x000000011052931d -[UIView(Internal) _didMoveFromWindow:toWindow:] + 819\r\n[ERROR] 18 UIKit 0x000000011052931d -[UIView(Internal) _didMoveFromWindow:toWindow:] + 819\r\n[ERROR] 19 UIKit 0x000000011052931d -[UIView(Internal) _didMoveFromWindow:toWindow:] + 819\r\n[ERROR] 20 UIKit 0x000000011051c6b4 __45-[UIView(Hierarchy) _postMovedFromSuperview:]_block_invoke + 151\r\n[ERROR] 21 UIKit 0x000000011051c5a2 -[UIView(Hierarchy) _postMovedFromSuperview:] + 857\r\n[ERROR] 22 UIKit 0x000000011052c2eb -[UIView(Internal) _addSubview:positioned:relativeTo:] + 1982\r\n[ERROR] 23 UIKit 0x000000011051a7a1 -[UIView(Hierarchy) addSubview:] + 838\r\n[ERROR] 24 UIKit 0x0000000110457869 -[_UIParallaxDimmingView didMoveToWindow] + 180\r\n[ERROR] 25 UIKit 0x00000001105296f1 -[UIView(Internal) _didMoveFromWindow:toWindow:] + 1799\r\n[ERROR] 26 UIKit 0x000000011052931d -[UIView(Internal) _didMoveFromWindow:toWindow:] + 819\r\n[ERROR] 27 UIKit 0x000000011051c6b4 __45-[UIView(Hierarchy) _postMovedFromSuperview:]_block_invoke + 151\r\n[ERROR] 28 UIKit 0x000000011051c5a2 -[UIView(Hierarchy) _postMovedFromSuperview:] + 857\r\n[ERROR] 29 UIKit 0x000000011052c2eb -[UIView(Internal) _addSubview:positioned:relativeTo:] + 1982\r\n[ERROR] 30 UIKit 0x000000011051a7a1 -[UIView(Hierarchy) addSubview:] + 838\r\n[ERROR] 31 UIKit 0x00000001104524e3 __53-[_UINavigationParallaxTransition animateTransition:]_block_invoke_2 + 2604\r\n[ERROR] 32 UIKit 0x00000001105246e6 +[UIView(Animation) performWithoutAnimation:] + 90\r\n[ERROR] 33 UIKit 0x0000000110451a55 __53-[_UINavigationParallaxTransition animateTransition:]_block_invoke + 270\r\n[ERROR] 34 UIKit 0x000000011052a7e4 +[UIView(Internal) _performBlockDelayingTriggeringResponderEvents:] + 188\r\n[ERROR] 35 UIKit 0x0000000110451463 -[_UINavigationParallaxTransition animateTransition:] + 1433\r\n[ERROR] 36 UIKit 0x000000011063ebff -[UINavigationController _startCustomTransition:] + 4426\r\n[ERROR] 37 UIKit 0x000000011064ec34 -[UINavigationController _startDeferredTransitionIfNeeded:] + 697\r\n[ERROR] 38 UIKit 0x000000011064fdc7 -[UINavigationController __viewWillLayoutSubviews] + 58\r\n[ERROR] 39 UIKit 0x0000000110846d6f -[UILayoutContainerView layoutSubviews] + 223\r\n[ERROR] 40 UIKit 0x0000000128ea5251 -[UILayoutContainerViewAccessibility layoutSubviews] + 43\r\n[ERROR] 41 UIKit 0x000000011052ff50 -[UIView(CALayerDelegate) layoutSublayersOfLayer:] + 1237\r\n[ERROR] 42 QuartzCore 0x0000000113579cc4 -[CALayer layoutSublayers] + 146\r\n[ERROR] 43 QuartzCore 0x000000011356d788 _ZN2CA5Layer16layout_if_neededEPNS_11TransactionE + 366\r\n[ERROR] 44 QuartzCore 0x000000011356d606 _ZN2CA5Layer28layout_and_display_if_neededEPNS_11TransactionE + 24\r\n[ERROR] 45 QuartzCore 0x00000001134fb680 _ZN2CA7Context18commit_transactionEPNS_11TransactionE + 280\r\n[ERROR] 46 QuartzCore 0x0000000113528767 _ZN2CA11Transaction6commitEv + 475\r\n[ERROR] 47 UIKit 0x0000000110464a97 _UIApplicationFlushRunLoopCATransactionIfTooLate + 206\r\n[ERROR] 48 UIKit 0x0000000110c746e0 __handleEventQueue + 5672\r\n[ERROR] 49 CoreFoundation 0x00000001152b4311 __CFRUNLOOP_IS_CALLING_OUT_TO_A_SOURCE0_PERFORM_FUNCTION__ + 17\r\n[ERROR] 50 CoreFoundation 0x000000011529959c __CFRunLoopDoSources0 + 556\r\n[ERROR] 51 CoreFoundation 0x0000000115298a86 __CFRunLoopRun + 918\r\n[ERROR] 52 CoreFoundation 0x0000000115298494 CFRunLoopRunSpecific + 420\r\n[ERROR] 53 GraphicsServices 0x000000011656ea6f GSEventRunModal + 161\r\n[ERROR] 54 UIKit 0x000000011046b964 UIApplicationMain + 159\r\n[ERROR] 55 ppBootTC 0x000000010e6c6f44 main + 100\r\n[ERROR] 56 libdyld.dylib 0x0000000117b4768d start + 1\r\n{code}", "updateAuthor": { "name": "eharris", "key": "eharris", "displayName": "Ewan Harris", "active": true, "timeZone": "Europe/Dublin" }, "created": "2016-11-11T10:30:45.000+0000", "updated": "2016-11-11T10:30:45.000+0000" }, { "id": "400783", "author": { "name": "hknoechel", "key": "hansknoechel", "displayName": "Hans Knöchel", "active": true, "timeZone": "Europe/Berlin" }, "body": "Test-case:\r\n{code:javascript}\r\n// -- General UI -- //\r\nvar win = Ti.UI.createWindow({\r\n backgroundColor: \"#fff\"\r\n});\r\n\r\nvar label = Ti.UI.createLabel({\r\n text: \"Show window\"\r\n});\r\n\r\nlabel.addEventListener(\"click\", doClick);\r\n \r\nwin.add(label); \r\n\r\nvar nav = Ti.UI.iOS.createNavigationWindow({\r\n window: win\r\n});\r\n\r\nnav.open();\r\n\r\nfunction doClick() {\r\n var win2 = Ti.UI.createWindow({\r\n backgroundColor: \"white\"\r\n });\r\n \r\n var btn = Ti.UI.createButton({\r\n width: 46, \r\n height: 46, \r\n top: 100, \r\n backgroundImage: '/images/close3.png', \r\n backgroundColor: 'red' \r\n });\r\n \r\n win2.add(btn);\r\n \r\n nav.openWindow(win2);\r\n}\r\n{code}\r\n\r\nThe crash is reproducible when you open the window for the second time and the reason seems to be that the image cache has an invalid memory address during the second access. We had a similar issue in TIMOB-24040, but it was regarding empty background images. I need to dive into the recent changes between 5.5.x and 6.0.0 to see what happened. Thx for reporting!\r\n\r\n*EDIT*: The issue was caused by [this commit|https://github.com/appcelerator/titanium_mobile/commit/7ee97f46b21ab05434d3c588e1ae24450a6eb5f0], investigating ...", "updateAuthor": { "name": "hknoechel", "key": "hansknoechel", "displayName": "Hans Knöchel", "active": true, "timeZone": "Europe/Berlin" }, "created": "2016-11-11T13:52:40.000+0000", "updated": "2016-11-11T14:03:49.000+0000" }, { "id": "400785", "author": { "name": "hknoechel", "key": "hansknoechel", "displayName": "Hans Knöchel", "active": true, "timeZone": "Europe/Berlin" }, "body": "PR (master): https://github.com/appcelerator/titanium_mobile/pull/8598\r\nPR (6_0_X): https://github.com/appcelerator/titanium_mobile/pull/8599\r\n\r\nThe issue was that when we replaced the method to get the image, we didn't retain the resulting value as before. This PR fixes that!", "updateAuthor": { "name": "hknoechel", "key": "hansknoechel", "displayName": "Hans Knöchel", "active": true, "timeZone": "Europe/Berlin" }, "created": "2016-11-11T14:08:49.000+0000", "updated": "2016-11-11T14:08:49.000+0000" }, { "id": "400790", "author": { "name": "cng", "key": "cng", "displayName": "Chee Kiat Ng", "active": false, "timeZone": "America/Los_Angeles" }, "body": "CR and FT Passed! APPROVED! ", "updateAuthor": { "name": "cng", "key": "cng", "displayName": "Chee Kiat Ng", "active": false, "timeZone": "America/Los_Angeles" }, "created": "2016-11-11T14:21:22.000+0000", "updated": "2016-11-11T14:21:22.000+0000" }, { "id": "400819", "author": { "name": "amukherjee", "key": "amukherjee", "displayName": "Abir Mukherjee", "active": true, "timeZone": "America/Los_Angeles" }, "body": "Verified fix using this environment:\r\n\r\nNPM Version: 2.15.9\r\nNode Version: 4.5.0\r\nMac OS: 10.12.1\r\nAppc CLI: 6.0.0-69\r\nAppc CLI NPM: 4.2.8-9\r\nTitanium SDK version: 6.0.0. v20161111062138\r\nAppcelerator Studio, build: 4.8.0.201611020954\r\nXcode 8.1 GM\r\nDevice: iPhone 7 iOS 10.0.1\r\nSimulator: iOS 10.1 Simulator\r\n\r\nAn app was installed using Han's demo code. With an earlier build, Ti SDK 6.0.0.v20161031201605, I clicked on the \"Show Window\" button, then clicked \"Back\", then clicked \"Show Window\" a second time. At that point, the app crashed. When I tried the same steps with the latest Ti SDK 6.0.0. v20161111062138, the app did not crash. This fix was validated on both Simulator and Device. ", "updateAuthor": { "name": "amukherjee", "key": "amukherjee", "displayName": "Abir Mukherjee", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2016-11-11T19:19:09.000+0000", "updated": "2016-11-11T19:19:09.000+0000" } ], "maxResults": 5, "total": 5, "startAt": 0 } } }