Bug 198286

Summary: [AppleWin] Assertion failure in defaultSupportedImageTypes in UTIRegistry.cpp
Product: WebKit Reporter: Fujii Hironori <Hironori.Fujii>
Component: PlatformAssignee: Fujii Hironori <Hironori.Fujii>
Status: RESOLVED FIXED    
Severity: Normal CC: achristensen, bfulgham, don.olmstead, ews-watchlist, pvollan, ross.kirsling, webkit-bug-importer
Priority: P2 Keywords: InRadar
Version: WebKit Nightly Build   
Hardware: Unspecified   
OS: Unspecified   
Attachments:
Description Flags
Patch
ews-watchlist: commit-queue-
Archive of layout-test-results from ews212 for win-future
none
Patch
none
Patch for landing none

Description Fujii Hironori 2019-05-28 02:12:40 PDT
[AppleWin] Assertion failure in defaultSupportedImageTypes in UTIRegistry.cpp

An assertion fails in AppleWin port Debug builds.

> ASSERT(CFArrayContainsValue(systemImageTypes.get(), CFRangeMake(0, count), string.get()));

Callstack:

> WebKit.dll!abort() Line 77	C++
> WebKit.dll!WTFCrashWithInfo(int __formal, const char * __formal, const char * __formal, int __formal) Line 569	C++
> WebKit.dll!WebCore::defaultSupportedImageTypes::__l2::<lambda>() Line 67	C++
> [External Code]	
> [Frames below may be incorrect and/or missing, no symbols loaded for ntdll.dll]	
> WebKit.dll!WebCore::defaultSupportedImageTypes() Line 62	C++
> WebKit.dll!WebCore::MIMETypeRegistry::supportedImageMIMETypes::__l2::<lambda>() Line 153	C++
> [External Code]	
> WebKit.dll!WebCore::MIMETypeRegistry::supportedImageMIMETypes() Line 152	C++
> WebKit.dll!WebCore::MIMETypeRegistry::isSupportedImageMIMEType(const WTF::String & mimeType) Line 457	C++
> WebKit.dll!WebView::canShowMIMEType(const WTF::String & mimeType) Line 2979	C++
> WebKit.dll!WebView::canShowMIMEType(wchar_t * mimeType, int * canShow) Line 2967	C++
> WebKit.dll!DefaultPolicyDelegate::decidePolicyForMIMEType(IWebView * webView, wchar_t * type, IWebURLRequest * request, IWebFrame * __formal, IWebPolicyDecisionListener * listener) Line 146	C++
> WebKit.dll!WebFrameLoaderClient::dispatchDecidePolicyForResponse(const WebCore::ResourceResponse & response, const WebCore::ResourceRequest & request, WebCore::PolicyCheckIdentifier identifier, const WTF::String & __formal, WTF::Function<void __cdecl(enum WebCore::PolicyAction,WebCore::PolicyCheckIdentifier)> && function) Line 544	C++
> WebKit.dll!WebCore::FrameLoader::checkContentPolicy(const WebCore::ResourceResponse & response, WebCore::PolicyCheckIdentifier identifier, WTF::Function<void __cdecl(enum WebCore::PolicyAction,WebCore::PolicyCheckIdentifier)> && function) Line 376	C++
> WebKit.dll!WebCore::DocumentLoader::responseReceived(const WebCore::ResourceResponse & response, WTF::CompletionHandler<void __cdecl(void)> && completionHandler) Line 848	C++
> WebKit.dll!WebCore::DocumentLoader::responseReceived(WebCore::CachedResource & resource, const WebCore::ResourceResponse & response, WTF::CompletionHandler<void __cdecl(void)> && completionHandler) Line 755	C++
> WebKit.dll!WebCore::CachedRawResource::responseReceived(const WebCore::ResourceResponse & response) Line 225	C++
> WebKit.dll!WebCore::SubresourceLoader::didReceiveResponse(const WebCore::ResourceResponse & response, WTF::CompletionHandler<void __cdecl(void)> && policyCompletionHandler) Line 383	C++
> WebKit.dll!WebCore::ResourceLoader::didReceiveResponseAsync(WebCore::ResourceHandle * __formal, WebCore::ResourceResponse && response, WTF::CompletionHandler<void __cdecl(void)> && completionHandler) Line 681	C++
> WebKit.dll!WebCore::ResourceHandle::didReceiveResponse(WebCore::ResourceResponse && response, WTF::CompletionHandler<void __cdecl(void)> && completionHandler) Line 167	C++
> WebKit.dll!WebCore::ResourceHandleCFURLConnectionDelegateWithOperationQueue::didReceiveResponse::__l2::<lambda>() Line 204	C++
> WebKit.dll!WTF::Detail::CallableWrapper<void <lambda>(void),void>::call() Line 52	C++
> WTF.dll!WTF::Function<void __cdecl(void)>::operator()() Line 79	C++
> WTF.dll!WTF::dispatchFunctionsFromMainThread() Line 116	C++
> WTF.dll!WTF::ThreadingWindowWndProc(HWND__ * hWnd, unsigned int message, unsigned int wParam, long lParam) Line 49	C++
> [External Code]	
> WebKit.dll!WebKitMessageLoop::run(HACCEL__ * hAccelTable) Line 94	C++
> MiniBrowserLib.dll!wWinMain(HINSTANCE__ * hInstance, HINSTANCE__ * hPrevInstance, wchar_t * lpstrCmdLine, int nCmdShow) Line 97	C++
> MiniBrowserLib.dll!dllLauncherEntryPoint(HINSTANCE__ * hInstance, HINSTANCE__ * hPrevInstance, wchar_t * lpstrCmdLine, int nCmdShow) Line 116	C++
> MiniBrowser.exe!wWinMain(HINSTANCE__ * hInstance, HINSTANCE__ * hPrevInstance, wchar_t * lpstrCmdLine, int nCmdShow) Line 232	C++
> [External Code]
Comment 1 Fujii Hironori 2019-05-28 02:16:53 PDT
Created attachment 370719 [details]
Patch
Comment 2 EWS Watchlist 2019-05-28 04:14:37 PDT
Comment on attachment 370719 [details]
Patch

Attachment 370719 [details] did not pass win-ews (win):
Output: https://webkit-queues.webkit.org/results/12306929

New failing tests:
fast/events/mouse-cursor-image-set.html
fast/events/mouse-cursor.html
fast/images/favicon-as-image.html
http/tests/security/canvas-remote-read-remote-video-allowed-with-credentials.html
fast/images/icon-0colors.html
fast/images/icon-decoding.html
http/tests/misc/favicon-as-image.html
Comment 3 EWS Watchlist 2019-05-28 04:14:40 PDT
Created attachment 370725 [details]
Archive of layout-test-results from ews212 for win-future

The attached test failures were seen while running run-webkit-tests on the win-ews.
Bot: ews212  Port: win-future  Platform: CYGWIN_NT-10.0-17763-3.0.5-338.x86_64-x86_64-64bit
Comment 4 Per Arne Vollan 2019-05-28 07:27:41 PDT
(In reply to Build Bot from comment #2)
> Comment on attachment 370719 [details]
> Patch
> 
> Attachment 370719 [details] did not pass win-ews (win):
> Output: https://webkit-queues.webkit.org/results/12306929
> 
> New failing tests:
> fast/events/mouse-cursor-image-set.html
> fast/events/mouse-cursor.html
> fast/images/favicon-as-image.html
> http/tests/security/canvas-remote-read-remote-video-allowed-with-credentials.
> html
> fast/images/icon-0colors.html
> fast/images/icon-decoding.html
> http/tests/misc/favicon-as-image.html

I am not sure why these tests are failing. Maybe the bots support these image types?
Comment 5 Fujii Hironori 2019-09-11 22:30:24 PDT
Created attachment 378623 [details]
Patch
Comment 6 Fujii Hironori 2019-09-11 23:43:24 PDT
Comment on attachment 378623 [details]
Patch

Win EWS tests passed!
Comment 7 Fujii Hironori 2019-09-12 14:35:16 PDT
Per, do you have a chance to review this patch?
Comment 8 Brent Fulgham 2019-09-16 11:42:45 PDT
Comment on attachment 378623 [details]
Patch

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

This seems reasonable.

> Source/WebCore/platform/graphics/cg/ImageSourceCGWin.cpp:-41
> -    // public.xbitmap-image, com.apple.quicktime-image, and others.

Do we really need to remove this comment?
Comment 9 Fujii Hironori 2019-09-16 19:55:55 PDT
Comment on attachment 378623 [details]
Patch

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

>> Source/WebCore/platform/graphics/cg/ImageSourceCGWin.cpp:-41
>> -    // public.xbitmap-image, com.apple.quicktime-image, and others.
> 
> Do we really need to remove this comment?

Ok, will restore.
Comment 10 Fujii Hironori 2019-09-16 20:03:05 PDT
Created attachment 378931 [details]
Patch for landing
Comment 11 Fujii Hironori 2019-09-16 20:07:00 PDT
Committed r249938: <https://trac.webkit.org/changeset/249938>
Comment 12 Radar WebKit Bug Importer 2019-09-16 20:07:24 PDT
<rdar://problem/55425626>
Comment 13 Fujii Hironori 2019-09-17 06:26:37 PDT
After this change, AppleWin Debug buildbot completed running layout tests!

https://build.webkit.org/builders/Apple%20Win%2010%20Debug%20%28Tests%29/builds/2866
> 32 failures 388 new passes 7 flakes