Bug 201541 - [Win][MiniBrowser][WK1] Crashes in MiniBrowserWebHost::onNotify by closing MainWindow while loading
Summary: [Win][MiniBrowser][WK1] Crashes in MiniBrowserWebHost::onNotify by closing Ma...
Status: RESOLVED DUPLICATE of bug 201600
Alias: None
Product: WebKit
Classification: Unclassified
Component: Tools / Tests (show other bugs)
Version: WebKit Nightly Build
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Nobody
URL:
Keywords:
Depends on: 201600
Blocks:
  Show dependency treegraph
 
Reported: 2019-09-06 02:44 PDT by Fujii Hironori
Modified: 2019-09-09 18:32 PDT (History)
0 users

See Also:


Attachments
WIP patch (940 bytes, patch)
2019-09-08 21:27 PDT, Fujii Hironori
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Fujii Hironori 2019-09-06 02:44:37 PDT
[Win][MiniBrowser][WK1] Crashes in MiniBrowserWebHost::onNotify by closing MainWindow while loading

1. Start MiniBrowser
2. Open some legacy WebView Windows
3. Load some web sites in them
4. Close them while loading

Crash happens.

Callstack:

> MiniBrowserLib.dll!MiniBrowserWebHost::onNotify(IWebNotification * notification) Line 175	C++
> WebKit.dll!WebNotificationCenter::postNotificationInternal(IWebNotification * notification, wchar_t * notificationName, IUnknown * anObject) Line 131	C++
> WebKit.dll!WebNotificationCenter::postNotificationName(wchar_t * notificationName, IUnknown * anObject, IPropertyBag * userInfo) Line 183	C++
> WebKit.dll!WebFrameLoaderClient::progressEstimateChanged(WebCore::Frame &) Line 663	C++
> WebKit.dll!WebCore::ProgressTracker::incrementProgress(unsigned long identifier, unsigned int bytesReceived) Line 262	C++
> WebKit.dll!WebCore::ResourceLoadNotifier::didReceiveData(WebCore::ResourceLoader * loader, const char * data, int dataLength, int encodedDataLength) Line 87	C++
> WebKit.dll!WebCore::ResourceLoader::didReceiveDataOrBuffer(const char * data, unsigned int length, WTF::RefPtr<WebCore::SharedBuffer,WTF::DumbPtrTraits<WebCore::SharedBuffer> > && buffer, __int64 encodedDataLength, WebCore::DataPayloadType dataPayloadType) Line 532	C++
> WebKit.dll!WebCore::SubresourceLoader::didReceiveDataOrBuffer(const char * data, int length, WTF::RefPtr<WebCore::SharedBuffer,WTF::DumbPtrTraits<WebCore::SharedBuffer> > && buffer, __int64 encodedDataLength, WebCore::DataPayloadType dataPayloadType) Line 477	C++
> WebKit.dll!WebCore::SubresourceLoader::didReceiveBuffer(WTF::Ref<WebCore::SharedBuffer,WTF::DumbPtrTraits<WebCore::SharedBuffer> > && buffer, __int64 encodedDataLength, WebCore::DataPayloadType dataPayloadType) Line 461	C++
> WebKit.dll!WebCore::ResourceLoader::didReceiveBuffer(WebCore::ResourceHandle *, WTF::Ref<WebCore::SharedBuffer,WTF::DumbPtrTraits<WebCore::SharedBuffer> > && buffer, int encodedDataLength) Line 695	C++
> WebKit.dll!WebCore::CurlResourceHandleDelegate::curlDidReceiveBuffer(WebCore::CurlRequest &, WTF::Ref<WebCore::SharedBuffer,WTF::DumbPtrTraits<WebCore::SharedBuffer> > && buffer) Line 155	C++
> WebKit.dll!WebCore::CurlRequest::didReceiveData::<unnamed-tag>::operator()(WebCore::CurlRequest & request, WebCore::CurlRequestClient & client) Line 399	C++
> WebKit.dll!WTF::Detail::CallableWrapper<`lambda at ..\..\Source\WebCore\platform\network\curl\CurlRequest.cpp:397:24',void,WebCore::CurlRequest &,WebCore::CurlRequestClient &>::call(WebCore::CurlRequest & in, WebCore::CurlRequestClient & in) Line 52	C++
> WebKit.dll!WTF::Function<void (WebCore::CurlRequest &, WebCore::CurlRequestClient &)>::operator()(WebCore::CurlRequest & in, WebCore::CurlRequestClient & in) Line 79	C++
> WebKit.dll!WebCore::CurlRequest::callClient::<unnamed-tag>::operator()() Line 181	C++
> WebKit.dll!WTF::Detail::CallableWrapper<`lambda at ..\..\Source\WebCore\platform\network\curl\CurlRequest.cpp:179:21',void>::call() Line 52	C++
> WTF.dll!WTF::Function<void ()>::operator()() Line 79	C++
> WTF.dll!WTF::dispatchFunctionsFromMainThread() Line 114	C++
> WTF.dll!WTF::ThreadingWindowWndProc(HWND__ * hWnd, unsigned int message, unsigned __int64 wParam, __int64 lParam) Line 48	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 104	C++
> MiniBrowserLib.dll!dllLauncherEntryPoint(HINSTANCE__ * hInstance, HINSTANCE__ * hPrevInstance, wchar_t * lpstrCmdLine, int nCmdShow) Line 122	C++
> MiniBrowser.exe!wWinMain(HINSTANCE__ * hInstance, HINSTANCE__ * hPrevInstance, wchar_t * lpstrCmdLine, int nCmdShow) Line 232	C++
> [External Code]
Comment 1 Fujii Hironori 2019-09-08 21:27:13 PDT
Created attachment 378347 [details]
WIP patch
Comment 2 Fujii Hironori 2019-09-08 23:23:30 PDT
Notification observers should be unregistered from the default
notification center by using
IWebNotificationCenter::removeObserver. But,
WebKitLegacyBrowserWindow is not freed. I'm going to fix the
issue and this issue in the following bug ticket.

Bug 201600 – [Win][MiniBrowser] WebKitLegacyBrowserWindow is leaked by circular references
Comment 3 Fujii Hironori 2019-09-09 18:32:10 PDT

*** This bug has been marked as a duplicate of bug 201600 ***