Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.

Bug 365149

Summary: IE8 javascript error
Product: [RT] RAP Reporter: Chris Fairhall <chris>
Component: RWTAssignee: Project Inbox <rap-inbox>
Status: RESOLVED FIXED QA Contact:
Severity: normal    
Priority: P1 CC: ivan
Version: 1.5   
Target Milestone: 1.5 M4   
Hardware: PC   
OS: Windows XP   
Whiteboard:
Attachments:
Description Flags
javascript error none

Description Chris Fairhall CLA 2011-11-29 19:00:15 EST
Build Identifier: rap-runtime-1.5.0-N-20111129-0212

I'm not sure what the cause is, but I get this error when viewing certain forms.

Issue exists in Ie8 and not on Chrome or Firefox.

Tried with default and classic theme. tried nightly builds from November 25 and 29.

Some of the application still works. The UIForms that still work contain labels, tables, text, datetime, ScrolledForm, Link, Composite... I'm not aware of any particular control that is causing this issue.


Could not evaluate javascript response:

Error: Operation "call" on target "w1" of type "[object Object]" failed:
Could not get the fontStyle property. Invalid argument.
Properties: 
fonts = 1062029546,!#$%&()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxy,Segoe UI,Corbel,Calibri,Tahoma,Lucida Sans Unicode,sans-serif,11,true,false,1062029545,!#$%&()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxy,Segoe UI,Corbel,Calibri,Tahoma,Lucida Sans Unicode,sans-serif,11,false,true


Full javascript error attached. Its huge.

Reproducible: Always

Steps to Reproduce:
not yet known
Comment 1 Chris Fairhall CLA 2011-11-29 19:00:54 EST
Created attachment 207696 [details]
javascript error
Comment 2 Ivan Furnadjiev CLA 2011-11-30 23:41:15 EST
Chris, could you provide small snippet/project that demonstrate the problem?
Comment 3 Chris Fairhall CLA 2011-12-01 18:28:43 EST
(In reply to comment #2)
> Chris, could you provide small snippet/project that demonstrate the problem?

I will try but the code that has the issue belongs to a project that has no funding currently. It is also not my IP so I can't take it home.

I was just spending a few minutes checking the latest build as we're currently running a nightly 1.5 in production.
Comment 4 Chris Fairhall CLA 2011-12-04 16:50:55 EST
I still haven't had time to create a snippet to reproduce the issue but I think I've found the code causing the issue.

/org.eclipse.rap/runtime.rwt/org.eclipse.rap.rwt/js/org/eclipse/swt/FontSizeCalculation.js 

Version 1.6 of this file is in M2 which I have no issues with, anything using 1.7 has the issue. I went back in hudson as far as I could and the issue exists with November 5 nightly

Looks like its this json call that causes the error
{
"target": "w1",
"action": "call",
"method": "probe",
"properties": {
"fonts": [ [ 1062029546, "!#$%&()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\\]^_`abcdefghijklmnopqrstuvwxy", [ "Segoe UI", "Corbel", "Calibri", "Tahoma", "Lucida Sans Unicode", "sans-serif" ], 11, true, false ], [ 1062029545, "!#$%&()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\\]^_`abcdefghijklmnopqrstuvwxy", [ "Segoe UI", "Corbel", "Calibri", "Tahoma", "Lucida Sans Unicode", "sans-serif" ], 11, false, true ] ]
}


The weird thing is when I use Chrome and follow the same steps I can't find any json message to call probe on w1
Comment 5 Ivan Furnadjiev CLA 2011-12-04 18:02:39 EST
Chris, I can reproduce it with Controls Demo -> Buttons Tab when I click on "Font" button - Windows XP SP3 IE8.
Comment 6 Ivan Furnadjiev CLA 2011-12-04 18:11:07 EST
There was a typo in FontSizeCalculation.js line 46 - "italc" instead of "italic", which cause application to crash in IE8. Fixed in CVS HEAD.