Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 364479 - VML._copyData error in IE8
Summary: VML._copyData error in IE8
Status: RESOLVED FIXED
Alias: None
Product: RAP
Classification: RT
Component: RWT (show other bugs)
Version: 1.5   Edit
Hardware: PC Windows 7
: P1 normal (vote)
Target Milestone: 1.5 M6   Edit
Assignee: Project Inbox CLA
QA Contact:
URL:
Whiteboard: sr142
Keywords:
Depends on: 373765
Blocks:
  Show dependency tree
 
Reported: 2011-11-22 10:32 EST by Austin Riddle CLA
Modified: 2012-03-13 05:41 EDT (History)
4 users (show)

See Also:


Attachments
Patch that solves the problem (3.14 KB, patch)
2011-11-22 10:38 EST, Austin Riddle CLA
no flags Details | Diff
patch for 1.4 branch (1.39 KB, patch)
2012-01-24 05:32 EST, Tim Buschtoens CLA
rsternberg: review+
Details | Diff
Reproduces VML._copyData error (3.28 KB, application/octet-stream)
2012-02-14 15:03 EST, Chris Fairhall CLA
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Austin Riddle CLA 2011-11-22 10:32:52 EST
Some of our clients use IE8 on slow machines that are far away from our server. They have been experiencing the following error in IE8:

Message: Could not copy fill: VML._copyData: source or target missing.

which totall kills their client.

We setup a network throttler in our office and simulated poor network performance (307ms delay, 1256kbit and .01 % packet drop).  
In that environment, we could only reproduce the problem when we cleared the cache in IE8.  It seems like the problem is related to large images being loaded over a poor network since once the images were in cache, the problem didn't resurface. 

We have a patch which seems to solve the problem.
Comment 1 Austin Riddle CLA 2011-11-22 10:38:10 EST
Created attachment 207369 [details]
Patch that solves the problem

Tim can you have a look to see if this makes sense?
Comment 2 Tim Buschtoens CLA 2011-11-23 05:29:24 EST
(In reply to comment #1)
> Created attachment 207369 [details]
> Patch that solves the problem
> 
> Tim can you have a look to see if this makes sense?

Hm, not really. 

The problem you describe typically appears if a onCanvasAppear is called while the VML-canvas is not actually in DOM. But it has to be called every time it IS inserted into the DOM (otherwise we get glitches in the UI), thats why i introduced the domInsert event. You seem to be using the appear event instead, which will probably not work since its not called everytime the canvs is inserted.

It would be good to know what the connection to the big images is. Are you perhaps able to get a stacktrace from IE devtools? (It might now work due to the try-catch of the RAP error handling.) Which widgets displays these images?

Also, we recently changed RAP to silently ignore some js-errors in non-debug variant. Are you using debug-variant?
Comment 3 Markus Tiede CLA 2011-11-30 04:26:44 EST
We, the Jubula team, also experience this issue with one of our RAP applications. It happens while opening an editor which makes use of a progress bar. This completely blocks our RAP application being usable in IE 8. 

Are there any further information which could help to trace down the problem? Maybe this part of the error message is helpful:

name: Error
  description: Could not apply border to child [object
org.eclipse.swt.widgets.Composite] VML._copyData: source or target missing!
  message: Could not apply border to child [object
org.eclipse.swt.widgets.Composite] VML._copyData: source or target missing!
  Debug: off
  Request:
w1.cursorLocation.x=179&w1.cursorLocation.y=772&uiRoot=w1&requestCounter=5
  Phase: 5
Comment 4 Tim Buschtoens CLA 2011-11-30 04:57:20 EST
(In reply to comment #3)

Which version are you using? We fixed one error that sounds similar (Bug 359665) in 1.5M3.
Comment 5 Markus Tiede CLA 2011-11-30 05:05:02 EST
We are using RAP 1.4.0.20110614-2335. Are there any plans to also fix this for RAP 1.4.2 (SR2) or even earlier? Though bug 359665 initially did not seem to apply for RAP 1.4.
Comment 6 Tim Buschtoens CLA 2011-11-30 05:15:37 EST
(In reply to comment #5)
> We are using RAP 1.4.0.20110614-2335. Are there any plans to also fix this for
> RAP 1.4.2 (SR2) or even earlier? Though bug 359665 initially did not seem to
> apply for RAP 1.4.

As i said in my comments on the bug, i'm not sure it applies to 1.4 or not, but its possible. If you could try with 1.5M3 or produce a snippet that reliably reproduce the issue in 1.4 we could find out and would definitly fix it in the 1.4 branch. In any case i will need a way to reproduce this to fix it.
Comment 7 Tim Buschtoens CLA 2012-01-24 05:32:10 EST
Created attachment 209958 [details]
patch for 1.4 branch

Does not fix the actual problem (since this is still unidentified), but supresses the error message so the application can continue to run. Worst case scenario would be some visual glitches in the UI.
Comment 8 Ralf Sternberg CLA 2012-01-25 04:31:57 EST
Comment on attachment 209958 [details]
patch for 1.4 branch

I agree with this patch for the service release to prevent crashes that have been reported with 1.4.
Comment 9 Ivan Furnadjiev CLA 2012-01-25 06:43:29 EST
Applied patch ( attachment# 209958 [details] ) to v14_Maintenance branch.
Comment 10 Austin Riddle CLA 2012-01-26 11:41:02 EST
Update: I have tried to reproduce our error in a sample project, but have had little success.  After some rigorous testing with the patch I provided there have been no side-affects in our system and the application runs smoothly in the crippled environment.  I don't know why using the _appear_ event works but my testing shows that onCanvasAppear() is being called before something is fully initialized when using the _insertDom_ event.
Comment 11 Tim Buschtoens CLA 2012-01-26 11:53:57 EST
So can we assume the issue is no longer valid for 1.5 aswell?
Comment 12 Austin Riddle CLA 2012-01-26 12:05:22 EST
I suppose until it becomes more reproducible by others it can be marked as invalid. But we will have to retain our patch to the target platform since it breaks otherwise.
Comment 13 Chris Fairhall CLA 2012-02-14 15:03:43 EST
Created attachment 211006 [details]
Reproduces VML._copyData error

1. Click the "Click" button.
2. Click the "Click again" button. 
3. Observe the Javascript error
Comment 14 Tim Buschtoens CLA 2012-03-07 06:26:01 EST
Fixed (once again) in CVS HEAD.

Its... complicated. Basically, Parent.js#_computeVisibleChildren gets confused when a certain combination of display and visibility properties are used, which leads to a incorrect appear event, which leads to this error. See WidgetTest.js#testFalseApeparBug for details. Fixed by checking "vChild._isCreated" when computing visible children.
Comment 15 Tim Buschtoens CLA 2012-03-07 10:21:56 EST
Argh. The fix broke the label (atom) somehow. Reverted changes.
Comment 16 Tim Buschtoens CLA 2012-03-07 11:26:25 EST
Okay, the reason why this breaks label is insanely complicated, the summary would be that the way Label and LabelUtil work with (or rather, against) each other, they rely on this bug to be there to work. It has to do with the text being set within an appear of the atom while the label is not actually yet created, and much more. Its really, really crazy.

Now, removing the LabelUtil from this process and just setting the text directly seems to work fine... but i dont know why LabelUtil was needed for this in the first place, so it could break something somewhere else. We have almost no tests for Label either. I would recommand to do it that way, if we refactor/re-implement Label before M6 anyway to support markup.
Comment 17 Tim Buschtoens CLA 2012-03-12 13:09:03 EDT
Fixed once again in CVS HEAD. Actually found a much less invasive fix than modifying Parent.js to change behavior in ambigous situations: GraphicsMixin.js checks for _isInDom instead of isSeeable in _appendCanvas.