{ "id": "172745", "key": "AC-6063", "fields": { "issuetype": { "id": "1", "description": "A problem which impairs or prevents the functions of the product.", "name": "Bug", "subtask": false }, "project": { "id": "12217", "key": "AC", "name": "Appcelerator - INBOX", "projectCategory": { "id": "10000", "description": "", "name": "Customer Service" } }, "resolution": { "id": "8", "description": "", "name": "Needs more info" }, "resolutiondate": "2019-01-17T16:10:36.000+0000", "created": "2018-12-14T08:26:42.000+0000", "labels": [], "versions": [], "issuelinks": [], "assignee": { "name": "shossain", "key": "shossain", "displayName": "Shak Hossain", "active": false, "timeZone": "America/Los_Angeles" }, "updated": "2019-01-17T16:10:37.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": [], "description": "UPDATE:\r\n\r\nThe crash happened because the url of the defaultImage was \"/\". It took us a long time to find it out, a possible enhancement would be to check if the passed url is valid.\r\n\r\nThank you\r\n\r\n-----------\r\n\r\nIf I pass a simple url string to an ImageView inside a Widget:\r\n\r\n{code:java}\r\n$.imageView.setImage(\"http://path/to/image.png\");\r\n{code}\r\n\r\nI get the crash:\r\n\r\n{code:java}\r\n[ERROR] \b\b \b message = \"*** -[__NSCFString substringFromIndex:]: Index 180 out of bounds; string length 179\";\r\n[ERROR] \b\b \b nativeStack = \"3 Foundation 0x000000010feeaa3b -[NSString substringFromIndex:] + 126\\n4 *** 0x000000010d35f540 -[ImageLoader entryForKey:] + 896\\n5 *** 0x000000010d35fec8 -[ImageLoader loadImmediateImage:withSize:] + 72\\n6 *** 0x000000010d2d7fab -[TiUIImageView loadDefaultImage:] + 443\\n7 *** 0x000000010d2d868c -[TiUIImageView loadUrl:] + 1580\\n8 *** 0x000000010d2d9665 -[TiUIImageView setImage_:] + 677\\n9 *** 0x000000010d2e84bc DoProxyDelegateReadKeyFromProxy + 268\\n10 *** 0x000000010d2e889d DoProxyDelegateReadValuesWithKeysFromProxy + 653\\n11 *** 0x000000010d26bcc6 -[TiUIView readProxyValuesWithKeys:] + 54\\n12 *** 0x000000010d24102e -[TiViewProxy firePropertyChanges] + 158\\n13 *** 0x000000010d23e433 -[TiViewProxy view] + 691\\n14 *** 0x000000010d23e5c9 -[TiViewProxy view] + 1097\\n15 ASL Biella 0x000000010d23e5c9 -[TiViewProxy view] + 1097\\n16 *** 0x000000010d23e5c9 -[TiViewProxy view] + 1097\\n17 *** 0x000000010d23e5c9 -[TiViewProxy view] + 1097\\n18 *** 0x000000010d23e5c9 -[TiViewProxy view] + 1097\\n19 *** 0x000000010d37fc49 -[TiUIScrollableView renderViewForIndex:] + 249\";\r\n{code}\r\n\r\nThis doesn't happen when the imageView is outside the widget.\r\n\r\nApparently the problem is inside ImageLoader.m, the snippet at line 447\r\n\r\n{code:java}\r\n- (ImageCacheEntry *)entryForKey:(NSURL *)url\r\n...\r\nif (result == nil) {\r\n if ([url isFileURL]) // Load up straight from disk\r\n { \r\n NSString *path = [url path];\r\n....\r\n{code}\r\n\r\nisFileUrl returns true even if it's a remote url.\r\n", "attachment": [], "flagged": false, "summary": "App crashes when defaultImage is not valid", "creator": { "name": "a.marcone", "key": "a.marcone", "displayName": "Alberto Marcone", "active": true, "timeZone": "Europe/Berlin" }, "subtasks": [], "reporter": { "name": "a.marcone", "key": "a.marcone", "displayName": "Alberto Marcone", "active": true, "timeZone": "Europe/Berlin" }, "environment": "iOS 11, TiSDK 7.5.0", "comment": { "comments": [ { "id": "444970", "author": { "name": "sdarda", "key": "sdarda", "displayName": "Sharif AbuDarda", "active": false, "timeZone": "Asia/Dhaka" }, "body": "Hello, Please share a standalone sample project that demonstrates the issue described. Thanks.", "updateAuthor": { "name": "sdarda", "key": "sdarda", "displayName": "Sharif AbuDarda", "active": false, "timeZone": "Asia/Dhaka" }, "created": "2019-01-03T16:43:34.000+0000", "updated": "2019-01-03T16:43:34.000+0000" }, { "id": "445428", "author": { "name": "rmitro", "key": "rmitro", "displayName": "Rakhi Mitro", "active": false, "timeZone": "America/Los_Angeles" }, "body": "Hello,\r\n\r\nWe haven't heard back from you since our last response. I thought I’d check in to see how things are progressing with your need. Let us know if the problem persists and share the sample project.", "updateAuthor": { "name": "rmitro", "key": "rmitro", "displayName": "Rakhi Mitro", "active": false, "timeZone": "America/Los_Angeles" }, "created": "2019-01-17T07:27:21.000+0000", "updated": "2019-01-17T07:27:21.000+0000" } ], "maxResults": 2, "total": 2, "startAt": 0 } } }