{ "id": "163224", "key": "AC-4462", "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": "7", "description": "", "name": "Invalid" }, "resolutiondate": "2016-09-19T20:48:23.000+0000", "created": "2016-09-15T09:15:45.000+0000", "labels": [ "ios" ], "versions": [], "issuelinks": [], "assignee": { "name": "shossain", "key": "shossain", "displayName": "Shak Hossain", "active": false, "timeZone": "America/Los_Angeles" }, "updated": "2016-09-19T20:48:23.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": "14548", "name": "Titanium SDK & CLI", "description": "Please enter tickets related to the MobileSDK here." } ], "description": "I can't reproduce the problem with a test project , but i'm pretty sure that the problem is due to the fact that i change the backgroundImage property of a view in this way\r\n\r\n{code}\r\nmyview.backgroundImage = \"\";\r\n{code}\r\n\r\nMy app is very complex, but commenting the line of code where i edit the backgroundImage property the app no longer crashes.\r\nHas anyone ever had problems of this kind?\r\nThis issue can help (http://stackoverflow.com/questions/36427020/appcelerator-bomstream-bomstreamwithfileandsysint-off-t-size-t-int-char) ?\r\n\r\nThis is the crash error (is always the same , in different points of the app)\r\n\r\n{code}\r\n[ERROR] : The application has crashed with an uncaught exception 'NSRangeException'.\r\n[ERROR] : Reason:\r\n[ERROR] : *** -[__NSCFString substringFromIndex:]: Index 180 out of bounds; string length 179\r\n[ERROR] : Stack trace:\r\n[ERROR] : \r\n[ERROR] : 0 CoreFoundation 0x067991f0 __exceptionPreprocess + 160\r\n[ERROR] : 1 libobjc.A.dylib 0x05e0ee66 objc_exception_throw + 52\r\n[ERROR] : 2 CoreFoundation 0x0680af15 +[NSException raise:format:] + 133\r\n[ERROR] : 3 Foundation 0x017acc52 -[NSString substringFromIndex:] + 113\r\n[ERROR] : 4 App Name 0x000adbbb +[TiUtils loadAppResource:] + 331\r\n[ERROR] : 5 App Name 0x001faf6c -[LocalProtocolHandler startLoading] + 412\r\n[ERROR] : 6 CFNetwork 0x03e9dad6 ___ZN16CFURLProtocol_NS28_protocolInterface_startLoadEPK20_CFCachedURLResponse_block_invoke + 288\r\n[ERROR] : 7 libdispatch.dylib 0x08c806ef _dispatch_client_callout + 14\r\n[ERROR] : 8 libdispatch.dylib 0x08c61e14 _dispatch_block_invoke_direct + 347\r\n[ERROR] : 9 libdispatch.dylib 0x08c7de04 ___dispatch_block_create_block_invoke + 20\r\n[ERROR] : 10 CFNetwork 0x03d6ab6e _ZN19RunloopBlockContext13_invoke_blockEPKvPv + 24\r\n[ERROR] : 11 CoreFoundation 0x066e3ef9 CFArrayApplyFunction + 57\r\n[ERROR] : 12 CFNetwork 0x03d6aa69 _ZN19RunloopBlockContext7performEv + 139\r\n[ERROR] : 13 CFNetwork 0x03e70ebc _ZThn16_N19RunloopBlockContext24multiplexerClientPerformEv + 20\r\n[ERROR] : 14 CFNetwork 0x03d6a905 _ZN17MultiplexerSource7performEv + 319\r\n[ERROR] : 15 CFNetwork 0x03d6a724 _ZN17MultiplexerSource8_performEPv + 62\r\n[ERROR] : 16 CoreFoundation 0x06738cbf __CFRUNLOOP_IS_CALLING_OUT_TO_A_SOURCE0_PERFORM_FUNCTION__ + 15\r\n[ERROR] : 17 CoreFoundation 0x0671cdf7 __CFRunLoopDoSources0 + 519\r\n[ERROR] : 18 CoreFoundation 0x0671c284 __CFRunLoopRun + 1124\r\n[ERROR] : 19 CoreFoundation 0x0671bbab CFRunLoopRunSpecific + 395\r\n[ERROR] : 20 CoreFoundation 0x0671ba0b CFRunLoopRunInMode + 123\r\n[ERROR] : 21 CFNetwork 0x04013cb8 _ZL27_privateRunloopEmulationSetPv + 246\r\n[ERROR] : 22 libsystem_pthread.dylib 0x08ff9780 _pthread_body + 138\r\n[ERROR] : 23 libsystem_pthread.dylib 0x08ff96f6 _pthread_body + 0\r\n[ERROR] : 24 libsystem_pthread.dylib 0x08ff6f7a thread_start + 34\r\n[ERROR] : \r\n[ERROR] : 2016-09-15 10:57:28.699 App Name[20463:141440] *** Terminating app due to uncaught exception 'NSRangeException', reason: '*** -[__NSCFString substringFromIndex:]: Index 180 out of bounds; string length 179'\r\n[ERROR] : *** First throw call stack:\r\n[ERROR] : (\r\n[ERROR] : \t0 CoreFoundation 0x06799212 __exceptionPreprocess + 194\r\n[ERROR] : \t1 libobjc.A.dylib 0x05e0ee66 objc_exception_throw + 52\r\n[ERROR] : \t2 CoreFoundation 0x0680af15 +[NSException raise:format:] + 133\r\n[ERROR] : \t3 Foundation 0x017acc52 -[NSString substringFromIndex:] + 113\r\n[ERROR] : \t4 App Name 0x000adbbb +[TiUtils loadAppResource:] + 331\r\n[ERROR] : \t5 App Name 0x001faf6c -[LocalProtocolHandler startLoading] + 412\r\n[ERROR] : \t6 CFNetwork 0x03e9dad6 ___ZN16CFURLProtocol_NS28_protocolInterface_startLoadEPK20_CFCachedURLResponse_block_invoke + 288\r\n[ERROR] : \t7 libdispatch.dylib 0x08c806ef _dispatch_client_callout + 14\r\n[ERROR] : \t8 libdispatch.dylib 0x08c61e14 _dispatch_block_invoke_direct + 347\r\n[ERROR] : \t9 libdispatch.dylib 0x08c7de04 ___dispatch_block_create_block_invoke + 20\r\n[ERROR] : \t10 CFNetwork 0x03d6ab6e _ZN19RunloopBlockContext13_invoke_blockEPKvPv + 24\r\n[ERROR] : \t11 CoreFoundation 0x066e3ef9 CFArrayApplyFunction + 57\r\n[ERROR] : \t12 CFNetwork 0x03d6aa69 _ZN19RunloopBlockContext7performEv + 139\r\n[ERROR] : \t13 CFNetwork 0x03e70ebc _ZThn16_N19RunloopBlockContext24multiplexerClientPerformEv + 20\r\n[ERROR] : \t14 CFNetwork 0x03d6a905 _ZN17MultiplexerSource7performEv + 319\r\n[ERROR] : \t15 CFNetwork 0x03d6a724 _ZN17MultiplexerSource8_performEPv + 62\r\n[ERROR] : \t16 CoreFoundation 0x06738cbf __CFRUNLOOP_IS_CALLING_OUT_TO_A_SOURCE0_PERFORM_FUNCTION__ + 15\r\n[ERROR] : \t17 CoreFoundation 0x0671cdf7 __CFRunLoopDoSources0 + 519\r\n[ERROR] : \t18 CoreFoundation 0x0671c284 __CFRunLoopRun + 1124\r\n[ERROR] : \t19 CoreFoundation 0x0671bbab CFRunLoopRunSpecific + 395\r\n[ERROR] : \t20 CoreFoundation 0x0671ba0b CFRunLoopRunInMode + 123\r\n[ERROR] : \t21 CFNetwork 0x04013cb8 _ZL27_privateRunloopEmulationSetPv + 246\r\n[ERROR] : \t22 libsystem_pthread.dylib 0x08ff9780 _pthread_body + 138\r\n[ERROR] : \t23 libsystem_pthread.dylib 0x08ff96f6 _pthread_body + 0\r\n[ERROR] : \t24 libsystem_pthread.dylib 0x08ff6f7a thread_start + 34\r\n[ERROR] : )\r\n[ERROR] : libc++abi.dylib: terminating with uncaught exception of type NSException\r\n{code}\r\n\r\nWith SDK 5.4.0.G.A and 5.5.0.G.A the app crash.\r\nWith SDK 5.3.1.G.A the app doesn't crash ", "attachment": [], "flagged": false, "summary": "Set an empty view backgroundImage crash the application", "creator": { "name": "nicolomonili", "key": "nicolomonili", "displayName": "nicolomonili", "active": true, "timeZone": "Europe/Rome" }, "subtasks": [], "reporter": { "name": "nicolomonili", "key": "nicolomonili", "displayName": "nicolomonili", "active": true, "timeZone": "Europe/Rome" }, "environment": "Appcelerator Studio, build: 4.3.3.201510212245\r\nTitanium SDK 5.4.0/5.5.0\r\nApple SDK 9.3/10.0\r\nxCode 7.3.1/8.0", "comment": { "comments": [ { "id": "396215", "author": { "name": "sdarda", "key": "sdarda", "displayName": "Sharif AbuDarda", "active": false, "timeZone": "Asia/Dhaka" }, "body": "Hello, When backgroundImage is specified, you have to provide a local file path or URL. Default behavior, when `backgroundImage` is unspecified depends on the type of view and the platform. For generic views, no image is used. For most controls (buttons, text fields, and so on), platform-specific default images are used. Reference: http://docs.appcelerator.com/platform/latest/#!/api/Titanium.UI.View-property-backgroundImage. \r\n\r\nSo, Assign an image to the property. Thanks.", "updateAuthor": { "name": "sdarda", "key": "sdarda", "displayName": "Sharif AbuDarda", "active": false, "timeZone": "Asia/Dhaka" }, "created": "2016-09-15T14:40:38.000+0000", "updated": "2016-09-15T14:40:38.000+0000" }, { "id": "396216", "author": { "name": "nicolomonili", "key": "nicolomonili", "displayName": "nicolomonili", "active": true, "timeZone": "Europe/Rome" }, "body": "So , the crash can be related to this ==> view.backgroundImage = \"\"; ? \r\nBecause from the crash log i don't understand what can cause the problem", "updateAuthor": { "name": "nicolomonili", "key": "nicolomonili", "displayName": "nicolomonili", "active": true, "timeZone": "Europe/Rome" }, "created": "2016-09-15T14:52:20.000+0000", "updated": "2016-09-15T14:54:01.000+0000" }, { "id": "396373", "author": { "name": "sdarda", "key": "sdarda", "displayName": "Sharif AbuDarda", "active": false, "timeZone": "Asia/Dhaka" }, "body": "Yes, Leaving \"backgroundImage\" as blank, is the cause of the error. You have to provide an image path or link. Thanks.", "updateAuthor": { "name": "sdarda", "key": "sdarda", "displayName": "Sharif AbuDarda", "active": false, "timeZone": "Asia/Dhaka" }, "created": "2016-09-16T19:09:10.000+0000", "updated": "2016-09-16T19:09:10.000+0000" }, { "id": "396475", "author": { "name": "nicolomonili", "key": "nicolomonili", "displayName": "nicolomonili", "active": true, "timeZone": "Europe/Rome" }, "body": "Ok , problem solved.\r\nMaybe it would be better to specify in the docs that this property can't be empty.\r\n", "updateAuthor": { "name": "nicolomonili", "key": "nicolomonili", "displayName": "nicolomonili", "active": true, "timeZone": "Europe/Rome" }, "created": "2016-09-19T06:43:37.000+0000", "updated": "2016-09-19T06:43:37.000+0000" } ], "maxResults": 4, "total": 4, "startAt": 0 } } }