{ "id": "146436", "key": "TIMOB-18770", "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": "16723", "description": "Windows Platform Support, ListView updates, Vector overlays in maps", "name": "Release 4.1.0", "archived": false, "released": true, "releaseDate": "2015-07-08" } ], "resolution": { "id": "1", "description": "A fix for this issue is checked into the tree and tested.", "name": "Fixed" }, "resolutiondate": "2015-07-14T23:16:31.000+0000", "created": "2015-03-31T14:48:35.000+0000", "priority": { "name": "None", "id": "6" }, "labels": [ "HAL", "JavaScriptCore" ], "versions": [ { "id": "16723", "description": "Windows Platform Support, ListView updates, Vector overlays in maps", "name": "Release 4.1.0", "archived": false, "released": true, "releaseDate": "2015-07-08" } ], "issuelinks": [ { "id": "48103", "type": { "id": "10000", "name": "Blocks", "inward": "is blocked by", "outward": "blocks" }, "inwardIssue": { "id": "148185", "key": "TIMOB-18948", "fields": { "summary": "Windows: Archive & Upload JavaScriptCore CI build result onto AWS", "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": "Medium", "id": "3" }, "issuetype": { "id": "7", "description": "gh.issue.story.desc", "name": "Story", "subtask": false } } } }, { "id": "47047", "type": { "id": "10003", "name": "Relates", "inward": "relates to", "outward": "relates to" }, "inwardIssue": { "id": "142355", "key": "TIMOB-18322", "fields": { "summary": "Windows: Need to support UTF-8 characters", "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": "High", "id": "2" }, "issuetype": { "id": "1", "description": "A problem which impairs or prevents the functions of the product.", "name": "Bug", "subtask": false } } } } ], "assignee": { "name": "gmathews", "key": "gmathews", "displayName": "Gary Mathews", "active": true, "timeZone": "America/Los_Angeles" }, "updated": "2017-03-16T21:55: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": "13715", "name": "Hyperloop", "description": "Hyperloop project" }, { "id": "12642", "name": "Windows", "description": "Windows authoring support" } ], "description": "When you use a special unicode character in a variable name (which is perfectly fine on iOS and Android and valid JS) the application will crash.\r\n\r\nh1. Test case\r\n\r\n{code:javascript}\r\nvar φ = 'hello world';\r\n\r\nTi.UI.createWindow({\r\n backgroundColor: \"white\"\r\n}).open();\r\n{code}\r\n\r\nh1. Crash\r\n\r\n{code}\r\n[ERROR] Application Error: {\r\n[ERROR] \"message\": \"Error while require(./app) Invalid character '\\\\u0966'\",\r\n[ERROR] \"native_stack\": [\r\n[ERROR] \"JSExportClass::CallNamedFunction\"\r\n[ERROR] ],\r\n[ERROR] \"stack\": \"require@[native code]\\nglobal code\",\r\n[ERROR] \"line\": 2\r\n[ERROR] }\r\n{code}", "attachment": [], "flagged": false, "summary": "HAL: Variables using unicode characters cause Application Error", "creator": { "name": "fokkezb", "key": "fokke", "displayName": "Fokke Zandbergen", "active": true, "timeZone": "Europe/Amsterdam" }, "subtasks": [], "reporter": { "name": "fokkezb", "key": "fokke", "displayName": "Fokke Zandbergen", "active": true, "timeZone": "Europe/Amsterdam" }, "environment": "SDK 4.1.0.v20150330151254", "closedSprints": [ { "id": 420, "state": "closed", "name": "2015 Sprint 12 Windows", "startDate": "2015-06-07T01:15:19.706Z", "endDate": "2015-06-21T01:15:00.000Z", "completeDate": "2015-06-20T23:02:18.410Z", "originBoardId": 144 } ], "comment": { "comments": [ { "id": "347931", "author": { "name": "ingo", "key": "ingo", "displayName": "Ingo Muschenetz", "active": true, "timeZone": "America/Los_Angeles" }, "body": "Kota, can you please take a look when you get a moment?", "updateAuthor": { "name": "ingo", "key": "ingo", "displayName": "Ingo Muschenetz", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2015-03-31T14:49:44.000+0000", "updated": "2015-03-31T14:49:44.000+0000" }, { "id": "348709", "author": { "name": "kiguchi", "key": "kota", "displayName": "Kota Iguchi", "active": false, "timeZone": "America/Los_Angeles" }, "body": "Confirmed that this issue originally came from JavaScriptCore C API itself on Windows. Thus HAL on Windows can not handle this well. For instance following code should return \"hello, world\" string but on Windows it returns \"undefined\". I'm expecting there's some issue handling UTF-8 string on JavaScriptCore Windows but I'm not sure where it is and how to fix this.\r\n\r\n{code}\r\n\tJSGlobalContextRef context = JSGlobalContextCreate(NULL);\r\n\tJSStringRef jsScriptString = JSStringCreateWithUTF8CString(\"var φ = 'hello world'; φ;\");\r\n\tJSStringRef jsFilenameString = JSStringCreateWithUTF8CString(\"app.js\");\r\n\tJSValueRef exception = NULL;\r\n\r\n\tJSValueRef result = JSEvaluateScript(context, jsScriptString, NULL, jsFilenameString, 0, &exception);\r\n\r\n\tJSStringRelease(jsScriptString);\r\n\tJSStringRelease(jsFilenameString);\r\n{code}", "updateAuthor": { "name": "kiguchi", "key": "kota", "displayName": "Kota Iguchi", "active": false, "timeZone": "America/Los_Angeles" }, "created": "2015-04-07T03:11:25.000+0000", "updated": "2015-04-07T03:11:25.000+0000" }, { "id": "352118", "author": { "name": "kiguchi", "key": "kota", "displayName": "Kota Iguchi", "active": false, "timeZone": "America/Los_Angeles" }, "body": "Confirmed that the character `φ` is successfully converted into valid UTF-8 bytes (0xcf86) and passed to JSC functions. It means the issues are inside JavaScriptCore so in order to fix this issue we need to update JavaScriptCore. may be related: https://github.com/WebKit/webkit/commits/master/Source/JavaScriptCore/parser/Lexer.cpp", "updateAuthor": { "name": "kiguchi", "key": "kota", "displayName": "Kota Iguchi", "active": false, "timeZone": "America/Los_Angeles" }, "created": "2015-05-10T01:52:26.000+0000", "updated": "2015-05-10T01:52:26.000+0000" }, { "id": "353127", "author": { "name": "cwilliams", "key": "cwilliams", "displayName": "Christopher Williams", "active": true, "timeZone": "America/New_York" }, "body": "This may the commit that fixes the issue in webkit/JSC? https://github.com/WebKit/webkit/commit/2eb5f4de2fb20e7dddaba89da5118e84d71d82c5#diff-0af0b457165c27ee7ef19b92709c2df1", "updateAuthor": { "name": "cwilliams", "key": "cwilliams", "displayName": "Christopher Williams", "active": true, "timeZone": "America/New_York" }, "created": "2015-05-20T19:36:35.000+0000", "updated": "2015-05-20T19:36:35.000+0000" }, { "id": "354536", "author": { "name": "kiguchi", "key": "kota", "displayName": "Kota Iguchi", "active": false, "timeZone": "America/Los_Angeles" }, "body": "While trying to apply recent changes around [JavaScriptCore Lexer | https://github.com/WebKit/webkit/commit/2eb5f4de2fb20e7dddaba89da5118e84d71d82c5#diff-0af0b457165c27ee7ef19b92709c2df1], I found that recent JavaScriptCore is trying to eliminates use of {{WTF::Unicode}} but instead use ICU directly. The problem here is that our JavaScriptCore for Windows is relying on custom {{WTF::Unicode}} handler for {{wchar_t}} which is built specifically for Windows, which doesn't depend on ICU. That's why we can't merge latest changes around Lexer as it is. So the actual issue now is that, it looks like we actually didn't implement Unicode detection in our custom {{WTF::Unicode}} handler. See [WTF/wtf/unicode/wchar/UnicodeWchar.cpp|https://github.com/appcelerator/webkit/blob/javascriptcore-wp8.1/Source/WTF/wtf/unicode/wchar/UnicodeWchar.cpp#L33], we can see some {{FIXME: implement}} comment there. I would assume at least we should implement these to handle Unicode correctly to make JavaScriptCore Lexer work well.\r\n", "updateAuthor": { "name": "kiguchi", "key": "kota", "displayName": "Kota Iguchi", "active": false, "timeZone": "America/Los_Angeles" }, "created": "2015-06-08T07:51:41.000+0000", "updated": "2015-06-08T07:51:41.000+0000" }, { "id": "354551", "author": { "name": "kiguchi", "key": "kota", "displayName": "Kota Iguchi", "active": false, "timeZone": "America/Los_Angeles" }, "body": "https://github.com/appcelerator/webkit/pull/5", "updateAuthor": { "name": "kiguchi", "key": "kota", "displayName": "Kota Iguchi", "active": false, "timeZone": "America/Los_Angeles" }, "created": "2015-06-08T11:52:07.000+0000", "updated": "2015-06-08T11:52:07.000+0000" }, { "id": "355077", "author": { "name": "kiguchi", "key": "kota", "displayName": "Kota Iguchi", "active": false, "timeZone": "America/Los_Angeles" }, "body": "Original issue in JavaScriptCore is already fixed by [webkit#PR5|https://github.com/appcelerator/webkit/pull/5]. Waiting for TIMOB-18948 to be done.", "updateAuthor": { "name": "kiguchi", "key": "kota", "displayName": "Kota Iguchi", "active": false, "timeZone": "America/Los_Angeles" }, "created": "2015-06-14T02:18:04.000+0000", "updated": "2015-06-14T02:18:04.000+0000" }, { "id": "357574", "author": { "name": "eharris", "key": "eharris", "displayName": "Ewan Harris", "active": true, "timeZone": "Europe/Dublin" }, "body": "Reopening ticket, when building with:\r\n\r\nWindows 8.1\r\nAppc CLI (NPM): 4.1.0\r\nAppc CLI (Registry): 4.1.0\r\nTi SDK: 4.1.0.GA, 4.2.0.v20150710092422\r\n\r\nWhen using the code attached I still see the error\r\n\r\n{code}\r\n[ERROR] Application Error: {\r\n[ERROR] \"message\": \"Error while require(./app) Invalid character '\\\\u0966'\",\r\n[ERROR] \"native_stack\": [\r\n[ERROR] \"JSExportClass::CallNamedFunction\"\r\n[ERROR] ],\r\n[ERROR] \"stack\": \"require@[native code]\\nglobal code\",\r\n[ERROR] \"line\": 2\r\n[ERROR] }\r\n{code}", "updateAuthor": { "name": "eharris", "key": "eharris", "displayName": "Ewan Harris", "active": true, "timeZone": "Europe/Dublin" }, "created": "2015-07-13T18:01:20.000+0000", "updated": "2015-07-13T18:01:20.000+0000" }, { "id": "357697", "author": { "name": "gmathews", "key": "gmathews", "displayName": "Gary Mathews", "active": true, "timeZone": "America/Los_Angeles" }, "body": "This is because the build server for {{titanium_mobile_windows}} is using an old {{JavaScriptCore}} build to compile the SDK.\r\n\r\n[titanium_mobile_windows/Tools/Scripts/setup.js|https://github.com/appcelerator/titanium_mobile_windows/blob/master/Tools/Scripts/setup.js#L33]\r\n\r\nWe should be using [JavaScriptCore-Windows-1433795599.zip|http://studio-jenkins.appcelerator.org/job/JavaScriptCore/lastSuccessfulBuild/artifact/dist/JavaScriptCore-Windows-1433795599.zip]", "updateAuthor": { "name": "gmathews", "key": "gmathews", "displayName": "Gary Mathews", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2015-07-14T21:32:29.000+0000", "updated": "2015-07-14T21:32:29.000+0000" }, { "id": "357706", "author": { "name": "gmathews", "key": "gmathews", "displayName": "Gary Mathews", "active": true, "timeZone": "America/Los_Angeles" }, "body": "PR: https://github.com/appcelerator/titanium_mobile_windows/pull/373", "updateAuthor": { "name": "gmathews", "key": "gmathews", "displayName": "Gary Mathews", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2015-07-14T22:59:50.000+0000", "updated": "2015-07-14T22:59:50.000+0000" }, { "id": "413218", "author": { "name": "lmorris", "key": "lmorris", "displayName": "Lee Morris", "active": false, "timeZone": "America/Los_Angeles" }, "body": "Closing ticket as fixed.", "updateAuthor": { "name": "lmorris", "key": "lmorris", "displayName": "Lee Morris", "active": false, "timeZone": "America/Los_Angeles" }, "created": "2017-03-16T21:55:43.000+0000", "updated": "2017-03-16T21:55:43.000+0000" } ], "maxResults": 11, "total": 11, "startAt": 0 } } }