Bug 101811 - Multi-frame CUR file test hangs on mac port
Summary: Multi-frame CUR file test hangs on mac port
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: Images (show other bugs)
Version: 528+ (Nightly build)
Hardware: Mac OS X 10.7
: P2 Normal
Assignee: Rick Byers
URL:
Keywords:
Depends on: 100059
Blocks:
  Show dependency treegraph
 
Reported: 2012-11-09 16:17 PST by Rick Byers
Modified: 2012-11-21 15:31 PST (History)
4 users (show)

See Also:


Attachments
Patch (5.98 KB, patch)
2012-11-16 21:39 PST, Rick Byers
no flags Details | Formatted Diff | Diff
Patch (6.88 KB, patch)
2012-11-18 17:55 PST, Rick Byers
no flags Details | Formatted Diff | Diff
Patch (6.88 KB, patch)
2012-11-18 18:10 PST, Rick Byers
no flags Details | Formatted Diff | Diff
Patch for landing (6.92 KB, patch)
2012-11-21 15:10 PST, Rick Byers
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Rick Byers 2012-11-09 16:17:45 PST
In bug 100059 I'm adding some tests for handling of CUR format cursor files.  

One unusual case that I'm testing is a CUR file that contains multiple frames of images (each encoded using PNG).  The Mac port (which uses Core Graphics for ICO/CUR image decoding instead of the ICOImageDecoder all other ports use) appears to hang sometimes when loading this file, causing my test to timeout.  When I run the safari I built directly I also see it hang the first time it tries to load this file (but if I stop loading and reload, then it fails quickly).

I've never done any mac development, and don't know anything about Core Graphics, so I'm just going to disable this one weird test on Mac.  I still want to get the coverage of ICOImageDecoder used on other ports though.  I haven't been able to reproduce this hang using the build of safari that comes with the OS, but it did repro in both Debug and Release builds I built today from WebKit ToT.  This is on MacOS X 10.7.5 on a Retina macbook pro.
Comment 1 Alexey Proskuryakov 2012-11-12 15:08:53 PST
Can you please provide steps to reproduce this issue? Which test should I open to make Safari hang?
Comment 2 Rick Byers 2012-11-15 07:07:42 PST
The test in question hasn't quite landed yet (hence blocked in bug 100059).  But in that patch it's test 'fast/events/mouse-cursor-multiframecur.html' that hangs on safari.
Comment 3 Alexey Proskuryakov 2012-11-16 10:34:41 PST
This test has been landed. When I try to open it in Safari 6.0.2 on OS X 10.8.2, I get some error output:

FAIL This test requires DumpRenderTree
PASS successfullyParsed is true

TEST COMPLETE
FAIL Got unexpected 'error' event for image: file:///Users/ap/Safari/OpenSource/LayoutTests/fast/events/resources/greenbox-3frames.cur

Please do provide steps to reproduce this issue.
Comment 4 Alexey Proskuryakov 2012-11-16 10:41:08 PST
I also cannot reproduce on 10.7.5.

Please also attach a sample of a hung WebProcess (you can take one from Activity Monitor, or with command line "sample" tool).
Comment 5 Rick Byers 2012-11-16 21:36:01 PST
Since I reported this I've updated my Mac to 10.8.2.  The hang in safari no longer reproduces for me.  I'm not sure if that means there was really an OS issue in 10.7, or (seemingly more likely) there was some unrelated issue in WebKit ToT at the time that's been fixed now.

Regardless, there was ALSO a bug in the test that would cause the test to hang when the last image failed to load.  So the hang I saw running safari loading this test could have been completely unrelated to the test hang.  Sorry for the confusion!

I'll submit a patch that fixes the test hang and re-enables it.
Comment 6 Rick Byers 2012-11-16 21:39:44 PST
Created attachment 174803 [details]
Patch
Comment 7 Alexey Proskuryakov 2012-11-16 22:04:17 PST
Comment on attachment 174803 [details]
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=174803&action=review

> LayoutTests/platform/mac/fast/events/mouse-cursor-multiframecur-expected.txt:9
> +FAIL Got unexpected 'error' event for image: file:///Users/rbyers/code/chromium/src/third_party/WebKit/LayoutTests/fast/events/resources/greenbox-3frames.cur

What causes this failure? Is there a bug tracking it?
Comment 8 Alexey Proskuryakov 2012-11-16 22:05:02 PST
Comment on attachment 174803 [details]
Patch

Of course, this expected result cannot be matched on anyone else's machine, because it contains a local path.
Comment 9 Build Bot 2012-11-17 06:32:07 PST
Comment on attachment 174803 [details]
Patch

Attachment 174803 [details] did not pass mac-ews (mac):
Output: http://queues.webkit.org/results/14879196

New failing tests:
fast/events/mouse-cursor-multiframecur.html
inspector-protocol/nmi-webaudio.html
Comment 10 Rick Byers 2012-11-18 08:40:30 PST
(In reply to comment #7)
> (From update of attachment 174803 [details])
> View in context: https://bugs.webkit.org/attachment.cgi?id=174803&action=review
> 
> > LayoutTests/platform/mac/fast/events/mouse-cursor-multiframecur-expected.txt:9
> > +FAIL Got unexpected 'error' event for image: file:///Users/rbyers/code/chromium/src/third_party/WebKit/LayoutTests/fast/events/resources/greenbox-3frames.cur
> 
> What causes this failure? Is there a bug tracking it?

I assume the CoreGraphics CUR file support doesn't support multi-frame CUR files.  That's probably not unreasonable - it's not precisely clear what the right behavior is for them.  The code used by other ports does the same thing it does with multi-frame ICO files when no specific frame is requested: use the frame with the highest quality (specifically pixel count, then color depth).

(In reply to comment #8)
> (From update of attachment 174803 [details])
> Of course, this expected result cannot be matched on anyone else's machine, because it contains a local path.

Yes, of course - duh.  I'll change the error-handling to strip the path.  Sorry.
Comment 11 Rick Byers 2012-11-18 17:55:24 PST
Created attachment 174869 [details]
Patch
Comment 12 Rick Byers 2012-11-18 18:10:24 PST
Created attachment 174871 [details]
Patch
Comment 13 Alexey Proskuryakov 2012-11-21 13:43:42 PST
Comment on attachment 174871 [details]
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=174871&action=review

> LayoutTests/fast/events/mouse-cursor-multiframecur.html:30
> +        // appear to support multi-frame CUR files, so the load will fal in this case.

s/fal/fail/
Comment 14 Rick Byers 2012-11-21 15:10:11 PST
Created attachment 175531 [details]
Patch for landing
Comment 15 Rick Byers 2012-11-21 15:10:46 PST
(In reply to comment #13)
> (From update of attachment 174871 [details])
> View in context: https://bugs.webkit.org/attachment.cgi?id=174871&action=review
> 
> > LayoutTests/fast/events/mouse-cursor-multiframecur.html:30
> > +        // appear to support multi-frame CUR files, so the load will fal in this case.
> 
> s/fal/fail/

Done, thanks!
Comment 16 WebKit Review Bot 2012-11-21 15:31:15 PST
Comment on attachment 175531 [details]
Patch for landing

Clearing flags on attachment: 175531

Committed r135444: <http://trac.webkit.org/changeset/135444>
Comment 17 WebKit Review Bot 2012-11-21 15:31:20 PST
All reviewed patches have been landed.  Closing bug.