{ "id": "79416", "key": "TIMOB-5820", "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": [], "resolution": { "id": "7", "description": "", "name": "Invalid" }, "resolutiondate": "2017-07-12T22:16:29.000+0000", "created": "2011-08-18T10:42:39.000+0000", "priority": { "name": "Low", "id": "4" }, "labels": [], "versions": [ { "id": "11570", "description": "", "name": "Release 1.7.2", "archived": true, "released": true, "releaseDate": "2011-07-21" } ], "issuelinks": [], "assignee": { "name": "ingo", "key": "ingo", "displayName": "Ingo Muschenetz", "active": true, "timeZone": "America/Los_Angeles" }, "updated": "2017-07-12T22:20:20.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": "10202", "name": "Android", "description": "Android Platform" } ], "description": "Using the repaint method of a webview causes exception\r\n\r\nh2. Testcase\r\n\r\n{code:javascript|title=app.js}\r\nvar win = Ti.UI.createWindow({\r\n backgroundColor:'#fff',\r\n layout:'vertical',\r\n exitOnClose:true\r\n});\r\n\r\nvar webview = Ti.UI.createWebView({url:'http://www.google.com'});\r\n\r\nwin.add(webview);\r\n\r\nwin.open();\r\n\r\nwebview.addEventListener('load', function(e){\r\n Ti.API.info('*** webview for '+ e.url +' has loaded - repainting now... ***');\r\n Ti.UI.WebView.repaint();\r\n});\r\n{code}\r\n\r\nh2. Result\r\n\r\nThe webview is rendered, but repaint then causes the following exception:\r\n{code}\r\n519 TiAPI I (kroll$1: app://app.js) [7538,9013] *** webview for http://www.google.co.uk/ has loaded - repainting now\r\n ... ***\r\n519 KrollCallback E (kroll$1: app://app.js) [391,9404] ECMA Error evaluating source, invocation: [callMethod UI.WebView.UI.W\r\n ebView:event:load null], message: TypeError: Cannot call method \"repaint\" of undefined (file:///android_\r\n asset/Resources/app.js#87)\r\n519 KrollCallback E org.mozilla.javascript.EcmaError: TypeError: Cannot call method \"repaint\" of undefined (file:///android_\r\n asset/Resources/app.js#87)\r\n519 KrollCallback E \tat org.mozilla.javascript.ScriptRuntime.constructError(ScriptRuntime.java:3784)\r\n519 KrollCallback E \tat org.mozilla.javascript.ScriptRuntime.constructError(ScriptRuntime.java:3762)\r\n519 KrollCallback E \tat org.mozilla.javascript.ScriptRuntime.typeError(ScriptRuntime.java:3790)\r\n519 KrollCallback E \tat org.mozilla.javascript.ScriptRuntime.typeError2(ScriptRuntime.java:3809)\r\n519 KrollCallback E \tat org.mozilla.javascript.ScriptRuntime.undefCallError(ScriptRuntime.java:3828)\r\n519 KrollCallback E \tat org.mozilla.javascript.ScriptRuntime.getPropFunctionAndThisHelper(ScriptRuntime.java:2333)\r\n519 KrollCallback E \tat org.mozilla.javascript.ScriptRuntime.getPropFunctionAndThis(ScriptRuntime.java:2326)\r\n519 KrollCallback E \tat org.mozilla.javascript.Interpreter.interpretLoop(Interpreter.java:1514)\r\n519 KrollCallback E \tat script(file:///android_asset/Resources/app.js:87)\r\n519 KrollCallback E \tat org.mozilla.javascript.Interpreter.interpret(Interpreter.java:854)\r\n519 KrollCallback E \tat org.mozilla.javascript.InterpretedFunction.call(InterpretedFunction.java:164)\r\n519 KrollCallback E \tat org.mozilla.javascript.ContextFactory.doTopCall(ContextFactory.java:426)\r\n519 KrollCallback E \tat org.mozilla.javascript.ScriptRuntime.doTopCall(ScriptRuntime.java:3177)\r\n519 KrollCallback E \tat org.mozilla.javascript.InterpretedFunction.call(InterpretedFunction.java:162)\r\n519 KrollCallback E \tat org.appcelerator.titanium.kroll.KrollCallback.callSync(KrollCallback.java:139)\r\n519 KrollCallback E \tat org.appcelerator.titanium.kroll.KrollCallback$1.run(KrollCallback.java:164)\r\n519 KrollCallback E \tat android.os.Handler.handleCallback(Handler.java:587)\r\n519 KrollCallback E \tat android.os.Handler.dispatchMessage(Handler.java:92)\r\n519 KrollCallback E \tat android.os.Looper.loop(Looper.java:123)\r\n519 KrollCallback E \tat org.appcelerator.titanium.kroll.KrollHandlerThread.run(KrollHandlerThread.java:86)\r\n519 TiJSError E (kroll$1: app://app.js) [41,9445] ----- Titanium Javascript Runtime Error -----\r\n519 TiJSError E (kroll$1: app://app.js) [4,9449] - In file:///android_asset/Resources/app.js:87,0\r\n519 TiJSError E (kroll$1: app://app.js) [2,9451] - Message: TypeError: Cannot call method \"repaint\" of undefined (file:/\r\n //android_asset/Resources/app.js#87)\r\n519 TiJSError E (kroll$1: app://app.js) [1,9452] - Source: null\r\n{code}\r\n\r\nh2. Possible Cause\r\n\r\nWhile there are references to repaint in the ios source, none exist in Android. Is this platform-specific function, that requires an APIDoc rather than an Android ticket?\r\n", "attachment": [ { "id": "23784", "filename": "app.js", "author": { "name": "sheshmantha", "key": "sheshmantha", "displayName": "Sheshadri Mantha", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2011-10-20T14:25:39.000+0000", "size": 2106, "mimeType": "application/x-javascript" } ], "flagged": false, "summary": "Titanium.UI.WebView.repaint() method causes exception", "creator": { "name": "sheshmantha", "key": "sheshmantha", "displayName": "Sheshadri Mantha", "active": true, "timeZone": "America/Los_Angeles" }, "subtasks": [], "reporter": { "name": "sheshmantha", "key": "sheshmantha", "displayName": "Sheshadri Mantha", "active": true, "timeZone": "America/Los_Angeles" }, "environment": "* Android 2.2\r\n* Emulator Google API's\r\n* Titanium 1.7.2 (2011/07/21 09:36 97c3689)\r\n* Windows 7\r\n* Titanium Studio, build: 1.0.4.201108101535 10 August 2011, 15:39:05", "comment": { "comments": [ { "id": "163557", "author": { "name": "pdowsett", "key": "pdowsett", "displayName": "Paul Dowsett", "active": true, "timeZone": "Europe/London" }, "body": "Sheshadri\r\n\r\nRather than post comments to your own ticket, please edit the body and include all the information requested in the [Jira Ticket Checklist|http://wiki.appcelerator.org/display/guides/Contributing+to+Titanium#ContributingtoTitanium-Summary%3AJiraTicketChecklist]. Once this ticket is in the correct format, I can move it to the relevant project.\r\n\r\nThank you for your help", "updateAuthor": { "name": "pdowsett", "key": "pdowsett", "displayName": "Paul Dowsett", "active": true, "timeZone": "Europe/London" }, "created": "2011-08-20T12:58:47.000+0000", "updated": "2011-08-20T12:58:47.000+0000" }, { "id": "164701", "author": { "name": "pdowsett", "key": "pdowsett", "displayName": "Paul Dowsett", "active": true, "timeZone": "Europe/London" }, "body": "Sheshadri\r\n\r\nPlease see the cloned ticket for the information that must be provided here in order for us to progress it.\r\n\r\nThank you", "updateAuthor": { "name": "pdowsett", "key": "pdowsett", "displayName": "Paul Dowsett", "active": true, "timeZone": "Europe/London" }, "created": "2011-08-31T17:32:49.000+0000", "updated": "2011-08-31T17:32:49.000+0000" }, { "id": "164899", "author": { "name": "pdowsett", "key": "pdowsett", "displayName": "Paul Dowsett", "active": true, "timeZone": "Europe/London" }, "body": "Sheshadri\r\n\r\nPlease would you add the code that will reproduce this problem. Read [Creating Good Use-cases|http://wiki.appcelerator.org/display/guides/Contributing+to+Titanium#ContributingtoTitanium-CreatingGoodUsecases] for information.\r\n\r\nAlso, please use the markup syntax to better format the body of this ticket. See the question mark icon at the bottom of the comments box for help. In particular, add a \\{code\\} block around the stack trace.\r\n\r\nThen I can move this ticket across.\r\n\r\nThank you", "updateAuthor": { "name": "pdowsett", "key": "pdowsett", "displayName": "Paul Dowsett", "active": true, "timeZone": "Europe/London" }, "created": "2011-09-02T06:08:05.000+0000", "updated": "2011-09-02T06:08:05.000+0000" }, { "id": "164924", "author": { "name": "sheshmantha", "key": "sheshmantha", "displayName": "Sheshadri Mantha", "active": true, "timeZone": "America/Los_Angeles" }, "body": "?? REALLY ??\r\n\r\nThe code is described in the use case -- i'm sure your developers can figure it out. I don't know if you are a developer... but a good developer can easily figure this out. Besides it a clone of an already reported issue -- have you guys actually tried to duplicate this issue ??\r\n\r\nWhy are you making me jump through hoops? I understand that you / your developers need the appropriate info and I have provided sufficient information from which any good developer can reproduce this issue!\r\n\r\nAs this issue was blocking my app, i've used other methods to complete my work... so what you see here is salvaged from old code... i would personally follow the use-case.\r\n\r\n{code}\r\nfunction doLogin() {\r\n\tvar client = Titanium.Network.createHTTPClient();\r\n\t\r\n\tclient.onload = function() {\r\n\t\tTi.API.info('RAW ='+this.responseText);\r\n\t\tvar loading = false;\r\n\t\tif(this.status == '200') {\r\n\t\t\tTi.API.info('got my response, http status code ' + this.status);\r\n\t\t\tif(this.readyState == 4) {\r\n\t\t\t\tTi.API.info('headers:' + this.getResponseHeader('Set-Cookie'));\r\n\t\t\t\twebview = Titanium.UI.createWebView();\r\n\t\t\t\t\r\n\t\t\t\twebview.html = this.responseText;\r\n\t\t\t\twin.add(webview);\r\n\t\t\t\twin.modal = true;\r\n\t\t\t\twebview.repaint();\r\n\r\n\t\t\t\tvar response=JSON.parse(this.responseText);\r\n\t\t\t\tTi.API.info('Response = '+response);\r\n\t\t\t} else {\r\n\t\t\t\talert('HTTP Ready State != 4');\r\n\t\t\t}\r\n\t\t} else {\r\n\t\t\talert('HTTp Error Response Status Code = '+this.status);\r\n\t\t\tTi.API.error(\"Error =>\"+this.response);\r\n\t\t}\r\n\t};\r\n\tvar param = \"username=\"+username.value+\"&password=\"+password.value;\r\n\tTi.API.info('param={' + param + '}');\r\n\tclient.open('POST', url);\r\n\tclient.send(param);\r\n}\r\n{code}\r\n\r\nOh! and assume that doLogin is called on click of button or some event handler and all other variables are properly defined.", "updateAuthor": { "name": "sheshmantha", "key": "sheshmantha", "displayName": "Sheshadri Mantha", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2011-09-02T08:38:02.000+0000", "updated": "2011-09-02T08:44:09.000+0000" }, { "id": "165029", "author": { "name": "pdowsett", "key": "pdowsett", "displayName": "Paul Dowsett", "active": true, "timeZone": "Europe/London" }, "body": "Sheshadri\r\n\r\nI am sorry that this review process is inconvenient for you, but I hope you can understand that it is used reluctantly, out of necessity, in order to make the best use of our very limited resources.\r\n\r\nWith an open ticketing system like this, we can be overwhelmed by reports of very differing levels of quality. I have lost count of the number of supposed bugs that I have personally tested, containing code that on first inspection looked \"ok\", only to discover that the user was at fault. As you will imagine, they are extremely time-consuming, and can easily get overwhelming.\r\n\r\nAlso bear in mind that the faster that our core team can get an example of your issue running in their environment, the sooner they can start coding a fix. This insures the fastest turnaround for your issue, especially when competing with other equally-important tickets that contain fully-working code.\r\n\r\nOur guidelines are published in [Submitting Bug Reports|http://wiki.appcelerator.org/display/guides/Contributing+to+Titanium#ContributingtoTitanium-SubmittingBugReports], and are, I'm afraid, a prerequisite to raising tickets.\r\n\r\nIf this issue is still important to you, then I would be happy to move it across to the main project when the code is complete.\r\n\r\nThank you.", "updateAuthor": { "name": "pdowsett", "key": "pdowsett", "displayName": "Paul Dowsett", "active": true, "timeZone": "Europe/London" }, "created": "2011-09-05T08:32:50.000+0000", "updated": "2011-09-05T08:32:50.000+0000" }, { "id": "165070", "author": { "name": "sheshmantha", "key": "sheshmantha", "displayName": "Sheshadri Mantha", "active": true, "timeZone": "America/Los_Angeles" }, "body": "Paul;\r\nAs i've said before, i *do* appreciate the need for guidelines in submitting bugs... my original report was a duplicate, and i did provide all the details albeit not in form you were satisfied with. And while i did \"complain\", i *did make all the changes* that you've requested. Do you *still* believe this report to be unsatisfactory for submittal to developers?\r\n\r\nIf not, could you please forward this to your developer?\r\n\r\nWhile i personally have no need for a fix for this in my current project, i imagine that it will enhance adoptability of your platform -- after all it is a crash!\r\n\r\nI am happy to engage in any dialog that they need to reproduce this.\r\n\r\nThanks.", "updateAuthor": { "name": "sheshmantha", "key": "sheshmantha", "displayName": "Sheshadri Mantha", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2011-09-06T10:20:47.000+0000", "updated": "2011-09-06T10:22:20.000+0000" }, { "id": "169870", "author": { "name": "mapperson", "key": "mapperson", "displayName": "Matthew Apperson", "active": true, "timeZone": "America/Los_Angeles" }, "body": "Sheshadri,\r\n\r\nI am sorry to make another request of you, but our guidelines for creating a ticket state the following about use-cases:\r\n* use a sequential set of Titanium API calls rather than namespaces and custom functions. Don't worry about polluting the global scope; a usecase should be too small for this to be relevant\r\n* rely on default values where possible; remove any properties that are not absolutely necessary\r\n* insure your code runs without any modification when copied into a blank app.js file. You would normally create one windows at the very least, to make it clear when the app has started \r\n\r\nThank you for working so hard to get this ticket in.\r\n\r\nBest regards,\r\nMatt", "updateAuthor": { "name": "mapperson", "key": "mapperson", "displayName": "Matthew Apperson", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2011-10-20T11:34:31.000+0000", "updated": "2011-10-20T11:34:31.000+0000" }, { "id": "169914", "author": { "name": "sheshmantha", "key": "sheshmantha", "displayName": "Sheshadri Mantha", "active": true, "timeZone": "America/Los_Angeles" }, "body": "WOW!\r\n\r\nI can't think of *ANYTHING* POSITIVE to say about your open-source bug fixing process.\r\n\r\nI am only trying to help you and you make me jump through hoops ?\r\n\r\n1) you don't tell me whats wrong with the use case but repeatedly point to your guidelines -- what?\r\n2) have you tried copying the use case code and testing it?\r\n\r\nHave you tried to repaint a webview widget? AND *please* don't ask me to tell your developers how to create a webview! \r\n\r\nIt's your app and it crashes. Be thankful for my time!", "updateAuthor": { "name": "sheshmantha", "key": "sheshmantha", "displayName": "Sheshadri Mantha", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2011-10-20T13:35:25.000+0000", "updated": "2011-10-20T13:35:25.000+0000" }, { "id": "169915", "author": { "name": "mapperson", "key": "mapperson", "displayName": "Matthew Apperson", "active": true, "timeZone": "America/Los_Angeles" }, "body": "Sheshadri,\r\n\r\nWe have a small team, and hundreds of bug reports and feature request to filter through, some are valid and some are not.\r\n\r\nI have not yet run your code as I would have to recreate a small app around it, as aposed to the instructions in the guidelines to \"insure your code runs without any modification when copied into a blank app.js file. You would normally create one windows at the very least, to make it clear when the app has started\" \r\n\r\nIt is not that we dont know how to do this, or even that we dont want to, but it is no posible to re-create every issue, we just dont have the man power as Paul already stated.\r\n\r\nBest regards,\r\nMatt", "updateAuthor": { "name": "mapperson", "key": "mapperson", "displayName": "Matthew Apperson", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2011-10-20T13:40:58.000+0000", "updated": "2011-10-20T13:40:58.000+0000" }, { "id": "169918", "author": { "name": "mapperson", "key": "mapperson", "displayName": "Matthew Apperson", "active": true, "timeZone": "America/Los_Angeles" }, "body": "Also to note is that we do request that the code goes in the ticket, due to the fact that the comments will no longer exist once we accept the ticket into the core project.", "updateAuthor": { "name": "mapperson", "key": "mapperson", "displayName": "Matthew Apperson", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2011-10-20T13:42:35.000+0000", "updated": "2011-10-20T13:42:35.000+0000" }, { "id": "169930", "author": { "name": "sheshmantha", "key": "sheshmantha", "displayName": "Sheshadri Mantha", "active": true, "timeZone": "America/Los_Angeles" }, "body": "*FINE*\r\n\r\nHere is an app.js which reproduces it completely. \r\n\r\nWhat is it?\r\na) The default app.js with the 2 tabs \r\nb) added the code to invoke webview.repaint()\r\n\r\nBTW: it still crashes!", "updateAuthor": { "name": "sheshmantha", "key": "sheshmantha", "displayName": "Sheshadri Mantha", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2011-10-20T14:25:39.000+0000", "updated": "2011-10-20T14:25:39.000+0000" }, { "id": "169946", "author": { "name": "pdowsett", "key": "pdowsett", "displayName": "Paul Dowsett", "active": true, "timeZone": "Europe/London" }, "body": "Please see the revised code - the most minimal, least-complex, code that is possible in order to reproduce the bug.", "updateAuthor": { "name": "pdowsett", "key": "pdowsett", "displayName": "Paul Dowsett", "active": true, "timeZone": "Europe/London" }, "created": "2011-10-20T15:19:34.000+0000", "updated": "2011-10-20T15:19:34.000+0000" }, { "id": "169950", "author": { "name": "sheshmantha", "key": "sheshmantha", "displayName": "Sheshadri Mantha", "active": true, "timeZone": "America/Los_Angeles" }, "body": "OK - I understand now.\r\n\r\nThanks for your triage.\r\n\r\nHope this report serves your platform well.", "updateAuthor": { "name": "sheshmantha", "key": "sheshmantha", "displayName": "Sheshadri Mantha", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2011-10-20T15:26:05.000+0000", "updated": "2011-10-20T15:26:05.000+0000" }, { "id": "169956", "author": { "name": "pdowsett", "key": "pdowsett", "displayName": "Paul Dowsett", "active": true, "timeZone": "Europe/London" }, "body": "Sheshadri - thank you for persisting with us to get it to this point! This was well-spotted, and very useful to get either fixed or documented as platform-specific.\r\n\r\nCheers", "updateAuthor": { "name": "pdowsett", "key": "pdowsett", "displayName": "Paul Dowsett", "active": true, "timeZone": "Europe/London" }, "created": "2011-10-20T15:34:09.000+0000", "updated": "2011-10-20T15:34:09.000+0000" }, { "id": "424037", "author": { "name": "lmorris", "key": "lmorris", "displayName": "Lee Morris", "active": false, "timeZone": "America/Los_Angeles" }, "body": "Closing ticket due to time passed and lack of progress for a number of years. Please open a new ticket if there are any problems.", "updateAuthor": { "name": "lmorris", "key": "lmorris", "displayName": "Lee Morris", "active": false, "timeZone": "America/Los_Angeles" }, "created": "2017-07-12T22:16:29.000+0000", "updated": "2017-07-12T22:16:29.000+0000" } ], "maxResults": 15, "total": 15, "startAt": 0 } } }