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

Bug 282657

Summary: Images not loaded in Safari with UICallbacks
Product: [RT] RAP Reporter: Stefan Röck <stefan.roeck>
Component: RWTAssignee: Project Inbox <rap-inbox>
Status: RESOLVED WONTFIX QA Contact:
Severity: major    
Priority: P3 CC: ivan, vasko
Version: 1.1   
Target Milestone: ---   
Hardware: All   
OS: All   
Whiteboard:
Attachments:
Description Flags
Snippet
none
Updated Snippet with a callback that update the UI. none

Description Stefan Röck CLA 2009-07-07 08:06:55 EDT
Created attachment 140950 [details]
Snippet

It seems as if Safari (on Windows and MAC) has a problem with UICallback-Request if there are other requests to handle, e.g. for loading images. If a request enables a UICallback-Request and additionally triggers loading new images in the browser, some of the images are not loaded and therefore not displayed in the UI.

I suppose that Safari uses some fancy mechanism to distribute requests over multiple TCP connections to load resources in parallel. It seems as if the UICallback-Requests (that potentially doesn't terminate) blocks loading other resources that have been assigned to this TCP connection. However, that is just an assumption.

In the attached snippet one can see, that some images are missing after loading. The UICallback terminates after 5 seconds and after that, the missing images appear. Push any button to repeat this procedure.
Comment 1 Ivan Furnadjiev CLA 2009-07-14 11:39:35 EDT
Created attachment 141539 [details]
Updated Snippet with a callback that update the UI.

Stefan, if you update the UI from this background thread all images are loaded in Safari too. Can you confirm this with the attached project?
Comment 2 Stefan Röck CLA 2009-07-15 03:15:38 EDT
Ivan, you are right, if immediate updates are done (as in your snippet) all images are displayed correctly. I think that is clear because for each update the UICallback-Request terminates and a new request is triggered which allows the initially blocked images to be loaded.

However, I am not sure if this is a good approach to work around this bug because it causes a lot of traffic.
Comment 3 Vasko Tchoumatchenko CLA 2009-07-20 17:56:15 EDT
From the Jetty debug log, it looks like the requests for the missing images are actually not sent by the browser until the long polling response is received.

The following bugs might be related to this problem: 

https://bugs.webkit.org/show_bug.cgi?id=26496
https://bugs.webkit.org/show_bug.cgi?id=27165

It seems that the bug is already fixed in the WebKit trunk. I checked the test case with WebKit r46125 (nightly build) on Win/XP and it works fine.
Comment 4 Stefan Röck CLA 2009-07-21 03:05:32 EDT
Vasko, thanks for your investigations. Good to hear that it works with Webkit TRUNK. However, I wonder why this problem doesn't ocurr in Chrome if its related to Webkit...
Comment 5 Ralf Sternberg CLA 2009-07-21 07:05:54 EDT
Closing as wontfix since this is obviously caused by the webkit bug https://bugs.webkit.org/show_bug.cgi?id=26496 and there is nothing we can do about it.
Since the requests are not sent by Safari, the only workaround is to trigger responses to the UICallback in shorter intervals, e.g. by using a progress indicator.