{ "id": "150331", "key": "AC-297", "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": "3", "description": "The problem is a duplicate of an existing issue.", "name": "Duplicate" }, "resolutiondate": "2015-11-05T09:47:22.000+0000", "created": "2015-08-12T12:52:39.000+0000", "labels": [ "ios" ], "versions": [], "issuelinks": [ { "id": "49636", "type": { "id": "10002", "name": "Duplicate", "inward": "is duplicated by", "outward": "duplicates" }, "outwardIssue": { "id": "144131", "key": "TIMOB-19884", "fields": { "summary": "iOS: Debug crash when setting breakpoint in alloy model response", "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" } }, "priority": { "name": "Critical", "id": "1" }, "issuetype": { "id": "1", "description": "A problem which impairs or prevents the functions of the product.", "name": "Bug", "subtask": false } } } } ], "assignee": { "name": "shossain", "key": "shossain", "displayName": "Shak Hossain", "active": false, "timeZone": "America/Los_Angeles" }, "updated": "2015-11-05T21:59:59.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": "14551", "name": "Studio", "description": "Please enter tickets related to Titanium Studio here." } ], "description": "\r\nReproduction:\r\n1. Start with an older version of a titanium app built with 3.2 or 3.4SDK.\r\n2. Upgrade to the new appcelerator \r\n3. Import the old app into appcelerator\r\n4. Change the tiapp.xml file of the app to 4.1.0SDK\r\n5. Set a breakpoint in the resources directory controller js file\r\n6. When the app hits the breakpoint the app crashes (see attached crash file)\r\n\r\nThis is from /var/log/system.log:\r\nAug 11 12:21:01 DW1415USBUM com.apple.xpc.launchd[1] (com.apple.ReportCrash[28863]): Endpoint has been activated through legacy launch(3) APIs. Please switch to XPC or bootstrap_check_in(): com.apple.ReportCrash\r\nAug 11 12:21:01 DW1415USBUM.local ReportCrash[28863]: Saved crash report for EndlessAisle[28784] version 1.0 (10) to /Users/cthomas/Library/Logs/DiagnosticReports/EndlessAisle_2015-08-11-122101_DW1415USBUM.crash\r\n\r\nIf I build a new project (hello, world) and set a breakpoint using 4.1.0SDK the breakpoint is never triggered, but the app doesn't crash. If I set the SDK back to 3.4.1 in this tiapp.xml file the breakpoint is triggered.", "attachment": [ { "id": "56419", "filename": "Demo App_2015-08-13-084140_DW1415USBUM.crash", "author": { "name": "cthomas", "key": "cthomas", "displayName": "Christy Thomas", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2015-08-13T12:46:45.000+0000", "size": 70462, "mimeType": "application/octet-stream" }, { "id": "56941", "filename": "DiagnosticLog.txt", "author": { "name": "morahman", "key": "morahman", "displayName": "Motiur Rahman", "active": true, "timeZone": "Asia/Dhaka" }, "created": "2015-10-08T06:06:19.000+0000", "size": 824112, "mimeType": "text/plain" }, { "id": "56402", "filename": "EndlessAisle_2015-08-11-122101_DW1415USBUM.crash", "author": { "name": "cthomas", "key": "cthomas", "displayName": "Christy Thomas", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2015-08-12T12:42:50.000+0000", "size": 314863, "mimeType": "application/octet-stream" }, { "id": "56418", "filename": "Screenshot 2015-08-13 08.29.11.png", "author": { "name": "cthomas", "key": "cthomas", "displayName": "Christy Thomas", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2015-08-13T12:42:51.000+0000", "size": 150928, "mimeType": "image/png" }, { "id": "56417", "filename": "Screenshot 2015-08-13 08.37.34.png", "author": { "name": "cthomas", "key": "cthomas", "displayName": "Christy Thomas", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2015-08-13T12:43:02.000+0000", "size": 167318, "mimeType": "image/png" }, { "id": "56416", "filename": "Screen Shot 2015-08-13 at 3.30.59 PM.png", "author": { "name": "morahman", "key": "morahman", "displayName": "Motiur Rahman", "active": true, "timeZone": "Asia/Dhaka" }, "created": "2015-08-13T11:18:21.000+0000", "size": 90824, "mimeType": "image/png" }, { "id": "56942", "filename": "Studio.log", "author": { "name": "morahman", "key": "morahman", "displayName": "Motiur Rahman", "active": true, "timeZone": "Asia/Dhaka" }, "created": "2015-10-08T06:12:18.000+0000", "size": 15070, "mimeType": "text/plain" } ], "flagged": false, "summary": "iOS: Debug crash when setting breakpoint in Resources controller file with 4.1SDK", "creator": { "name": "cthomas", "key": "cthomas", "displayName": "Christy Thomas", "active": true, "timeZone": "America/Los_Angeles" }, "subtasks": [], "reporter": { "name": "cthomas", "key": "cthomas", "displayName": "Christy Thomas", "active": true, "timeZone": "America/Los_Angeles" }, "environment": "Mac OS Yosemite version 10.10.4\r\nAppcelerator Studio, build: 4.1.1.201507141126", "comment": { "comments": [ { "id": "359803", "author": { "name": "cthomas", "key": "cthomas", "displayName": "Christy Thomas", "active": true, "timeZone": "America/Los_Angeles" }, "body": "I set the same exact breakpoint as shown in the attached screenshot and it never stopped there. If I click on the label in the app it does not stop in appcelerator at all. I see the alert and the log output of what is happening. Nothing happens when the exception happens as well. If I change to 3.4.1 SDK then I get the correct behavior.\r\n\r\nI have attached images of the debugger looks like and what our project settings are.\r\n\r\nHow did you get a breakpoint set in the index.js that is not in the Resources/compiled version of index.js? We have never been able to do that and have always had to set breakpoints in Resources directory. This has been a pain.\r\n\r\nMy project type is 'Alloy' and 'Mobile - Primary'\r\n\r\n", "updateAuthor": { "name": "cthomas", "key": "cthomas", "displayName": "Christy Thomas", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2015-08-13T12:41:34.000+0000", "updated": "2015-08-13T12:42:21.000+0000" }, { "id": "359804", "author": { "name": "cthomas", "key": "cthomas", "displayName": "Christy Thomas", "active": true, "timeZone": "America/Los_Angeles" }, "body": "I also noticed if I try to set a breakpoint (in the /Demo App/Resources/iphone/alloy/controllers/index.js) while the app is running I get a crash of the app.\r\n\r\nFrom /var/log/system.log:\r\nAug 13 08:41:40 DW1415USBUM com.apple.xpc.launchd[1] (com.apple.ReportCrash[28545]): Endpoint has been activated through legacy launch(3) APIs. Please switch to XPC or bootstrap_check_in(): com.apple.ReportCrash\r\nAug 13 08:41:40 DW1415USBUM.local ReportCrash[28545]: Saved crash report for Demo App[27850] version 1.0 (1.0) to /Users/cthomas/Library/Logs/DiagnosticReports/Demo App_2015-08-13-084140_DW1415USBUM.crash\r\n\r\nI will attach this crash log as well.\r\n\r\n", "updateAuthor": { "name": "cthomas", "key": "cthomas", "displayName": "Christy Thomas", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2015-08-13T12:45:58.000+0000", "updated": "2015-08-13T12:45:58.000+0000" }, { "id": "360194", "author": { "name": "cthomas", "key": "cthomas", "displayName": "Christy Thomas", "active": true, "timeZone": "America/Los_Angeles" }, "body": "Any thoughts on what the issue might be here? Why aren't others seeing this problem? Anything we can try so that we can debug our project with 4.1 SDK?\r\n\r\nThis is a critical issue for our team.", "updateAuthor": { "name": "cthomas", "key": "cthomas", "displayName": "Christy Thomas", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2015-08-18T14:22:34.000+0000", "updated": "2015-08-18T14:23:13.000+0000" }, { "id": "360364", "author": { "name": "cthomas", "key": "cthomas", "displayName": "Christy Thomas", "active": true, "timeZone": "America/Los_Angeles" }, "body": "There are some breakpoints that do work, it seems to fail whenever an event is involved.\r\n\r\nI was able to set a breakpoint in our Resources/iphone/alloy/controllers/index.js with no events involved.", "updateAuthor": { "name": "cthomas", "key": "cthomas", "displayName": "Christy Thomas", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2015-08-19T16:55:20.000+0000", "updated": "2015-08-19T16:55:20.000+0000" }, { "id": "365426", "author": { "name": "cthomas", "key": "cthomas", "displayName": "Christy Thomas", "active": true, "timeZone": "America/Los_Angeles" }, "body": "Now that 4.3.0 has released you can no longer pick 3.4 SDK and therefore we can no longer debug.", "updateAuthor": { "name": "cthomas", "key": "cthomas", "displayName": "Christy Thomas", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2015-09-30T15:12:52.000+0000", "updated": "2015-09-30T15:12:52.000+0000" }, { "id": "365980", "author": { "name": "mannyp", "key": "mannyp", "displayName": "Manny Parasirakis", "active": true, "timeZone": "America/Los_Angeles" }, "body": "I have reproduced this issue using two lines of code in a brand new clean project generated by appcelerator. Steps to reproduce:\r\n\r\n1) Create a new mobile app project in appcelerator using the 5.0.2.GA SDK\r\n2) Replace the index.js with this code:\r\n\r\nfunction doClick(e) {\r\n alert($.label.text);\r\n}\r\n\r\nvar a = {b:1, c:2, d:{e:3}};\r\na.d.f = a; // <------ COMMENT THIS LINE OUT AND IT WON'T CRASH THE APP\r\n\r\n$.index.open();\r\n\r\n3) Run the app in the debugger. Put a breakpoint on the line \"a.d.f = a;\"\r\n4) When you step over the line of code in step 3, the app will crash with the infinite loop below. Note that it is crashing in the TiDebuggerUtils::generate_variables(). The debugger cannot handle the case when there are circular references in data objects. This problem started in the 3.5.1.GA SDK. Not allowing circular references in javascript objects seems like a very basic requirement of a debugger.\r\n\r\nThread 6 Crashed:: KrollContext\r\n0 com.demandware.EndlessAisle \t0x006376f7 WTI::CString::CString(char const*, unsigned long) + 39\r\n1 com.demandware.EndlessAisle \t0x0064e7d9 WTI::StringImpl::utf8ForRange(unsigned int, unsigned int, WTI::ConversionMode) const + 297\r\n2 com.demandware.EndlessAisle \t0x0064e8bf WTI::StringImpl::utf8(WTI::ConversionMode) const + 47\r\n3 com.demandware.EndlessAisle \t0x00652c6b WTI::String::utf8(WTI::ConversionMode) const + 43\r\n4 com.demandware.EndlessAisle \t0x0035aaf5 TiDebuggerUtils::wtf_string_to_string(WTI::String const&) + 37\r\n5 com.demandware.EndlessAisle \t0x0035bc66 TiDebuggerUtils::generate_variables(TI::ExecState*, TI::JSObject*, std::__1::map, std::__1::allocator >, TiDebuggerVariableStruct, std::__1::less, std::__1::allocator > >, std::__1::allocator, std::__1::allocator > const, TiDebuggerVariableStruct> > >&, bool, std::__1::basic_string, std::__1::allocator > const&) + 278\r\n6 com.demandware.EndlessAisle \t0x0035ba92 TiDebuggerUtils::generate_variable(TI::ExecState*, TI::TiValue&, TiDebuggerVariableStruct&, std::__1::basic_string, std::__1::allocator > const&, bool, std::__1::basic_string, std::__1::allocator > const&) + 1922\r\n7 com.demandware.EndlessAisle \t0x0035be43 TiDebuggerUtils::generate_variables(TI::ExecState*, TI::JSObject*, std::__1::map, std::__1::allocator >, TiDebuggerVariableStruct, std::__1::less, std::__1::allocator > >, std::__1::allocator, std::__1::allocator > const, TiDebuggerVariableStruct> > >&, bool, std::__1::basic_string, std::__1::allocator > const&) + 755\r\n8 com.demandware.EndlessAisle \t0x0035ba92 TiDebuggerUtils::generate_variable(TI::ExecState*, TI::TiValue&, TiDebuggerVariableStruct&, std::__1::basic_string, std::__1::allocator > const&, bool, std::__1::basic_string, std::__1::allocator > const&) + 1922\r\n9 com.demandware.EndlessAisle \t0x0035be43 TiDebuggerUtils::generate_variables(TI::ExecState*, TI::JSObject*, std::__1::map, std::__1::allocator >, TiDebuggerVariableStruct, std::__1::less, std::__1::allocator > >, std::__1::allocator, std::__1::allocator > const, TiDebuggerVariableStruct> > >&, bool, std::__1::basic_string, std::__1::allocator > const&) + 755\r\n10 com.demandware.EndlessAisle \t0x0035ba92 TiDebuggerUtils::generate_variable(TI::ExecState*, TI::TiValue&, TiDebuggerVariableStruct&, std::__1::basic_string, std::__1::allocator > const&, bool, std::__1::basic_string, std::__1::allocator > const&) + 1922\r\n11 com.demandware.EndlessAisle \t0x0035be43 TiDebuggerUtils::generate_variables(TI::ExecState*, TI::JSObject*, std::__1::map, std::__1::allocator >, TiDebuggerVariableStruct, std::__1::less, std::__1::allocator > >, std::__1::allocator, std::__1::allocator > const, TiDebuggerVariableStruct> > >&, bool, std::__1::basic_string, std::__1::allocator > const&) + 755\r\n12 com.demandware.EndlessAisle \t0x0035ba92 TiDebuggerUtils::generate_variable(TI::ExecState*, TI::TiValue&, TiDebuggerVariableStruct&, std::__1::basic_string, std::__1::allocator > const&, bool, std::__1::basic_string, std::__1::allocator > const&) + 1922\r\n13 com.demandware.EndlessAisle \t0x0035be43 TiDebuggerUtils::generate_variables(TI::ExecState*, TI::JSObject*, std::__1::map, std::__1::allocator >, TiDebuggerVariableStruct, std::__1::less, std::__1::allocator > >, std::__1::allocator, std::__1::allocator > const, TiDebuggerVariableStruct> > >&, bool, std::__1::basic_string, std::__1::allocator > const&) + 755\r\n14 com.demandware.EndlessAisle \t0x0035ba92 TiDebuggerUtils::generate_variable(TI::ExecState*, TI::TiValue&, TiDebuggerVariableStruct&, std::__1::basic_string, std::__1::allocator > const&, bool, std::__1::basic_string, std::__1::allocator > const&) + 1922\r\n15 com.demandware.EndlessAisle \t0x0035be43 TiDebuggerUtils::generate_variables(TI::ExecState*, TI::JSObject*, std::__1::map, std::__1::allocator >, TiDebuggerVariableStruct, std::__1::less, std::__1::allocator > >, std::__1::allocator, std::__1::allocator > const, TiDebuggerVariableStruct> > >&, bool, std::__1::basic_string, std::__1::allocator > const&) + 755\r\n16 com.demandware.EndlessAisle \t0x0035ba92 TiDebuggerUtils::generate_variable(TI::ExecState*, TI::TiValue&, TiDebuggerVariableStruct&, std::__1::basic_string, std::__1::allocator > const&, bool, std::__1::basic_string, std::__1::allocator > const&) + 1922\r\n17 com.demandware.EndlessAisle \t0x0035be43 TiDebuggerUtils::generate_variables(TI::ExecState*, TI::JSObject*, std::__1::map, std::__1::allocator >, TiDebuggerVariableStruct, std::__1::less, std::__1::allocator > >, std::__1::allocator, std::__1::allocator > const, TiDebuggerVariableStruct> > >&, bool, std::__1::basic_string, std::__1::allocator > const&) + 755\r\n18 com.demandware.EndlessAisle \t0x0035ba92 TiDebuggerUtils::generate_variable(TI::ExecState*, TI::TiValue&, TiDebuggerVariableStruct&, std::__1::basic_string, std::__1::allocator > const&, bool, std::__1::basic_string, std::__1::allocator > const&) + 1922\r\n19 com.demandware.EndlessAisle \t0x0035be43 TiDebuggerUtils::generate_variables(TI::ExecState*, TI::JSObject*, std::__1::map, std::__1::allocator >, TiDebuggerVariableStruct, std::__1::less, std::__1::allocator > >, std::__1::allocator, std::__1::allocator > const, TiDebuggerVariableStruct> > >&, bool, std::__1::basic_string, std::__1::allocator > const&) + 755\r\n", "updateAuthor": { "name": "mannyp", "key": "mannyp", "displayName": "Manny Parasirakis", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2015-10-06T20:12:44.000+0000", "updated": "2015-10-06T20:12:44.000+0000" }, { "id": "366242", "author": { "name": "mannyp", "key": "mannyp", "displayName": "Manny Parasirakis", "active": true, "timeZone": "America/Los_Angeles" }, "body": "I see you have updated the steps to reproduce, however, what you are seeing where the breakpoint does not get triggered is a different issue. That may be yet another bug, but if you follow the steps I put in the comment above then you will see the infinite loop and crash.", "updateAuthor": { "name": "mannyp", "key": "mannyp", "displayName": "Manny Parasirakis", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2015-10-08T15:15:33.000+0000", "updated": "2015-10-08T15:15:33.000+0000" } ], "maxResults": 17, "total": 17, "startAt": 0 } } }