Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Web view gets stuck on one article #3716

Open
danielpunkass opened this issue Oct 12, 2022 · 4 comments
Open

Web view gets stuck on one article #3716

danielpunkass opened this issue Oct 12, 2022 · 4 comments
Assignees
Labels

Comments

@danielpunkass
Copy link
Contributor

Some articles and/or blogs seem to provoke the problem. As reported in the Slack, the https://www.railwayage.com/feed/ feed seems to cause it, and I was able to reproduce it first in the context of a Feedbin subscription and then separately as a local subscription in NetNewsWire Mac.

Attached screencast demonstrates the problem:

  1. Subscribe to https://www.railwayage.com/feed/
  2. Click into the subscription to view only articles from that feed
  3. Press and hold the up arrow and then down arrow so as to flip through the articles very quickly.

Once the freeze occurs it appears the web view cannot even be clicked into.

WebViewFreeze.mov
@danielpunkass danielpunkass self-assigned this Oct 12, 2022
@danielpunkass
Copy link
Contributor Author

When the bug occurs it seems to correlate with a console log message along the lines of:

2022-10-12 20:01:57.817246-0400 NetNewsWire[42410:1644060] [Process] 0x10d068480 - [PID=42412] WebProcessProxy::didBecomeUnresponsive:
2022-10-12 20:01:57.817355-0400 NetNewsWire[42410:1644060] [Process] 0x12f056a18 - [pageProxyID=7, webPageID=8, PID=42412] WebPageProxy::processDidBecomeUnresponsive:

@danielpunkass
Copy link
Contributor Author

danielpunkass commented Oct 13, 2022

It seems to have something to do with the feed in question including PDF resources that are embedded directly in the article content. The "stuck" process associated with the web view is in a state where it appears to be waiting for the PDF plugin to deallocate:

* thread #1, queue = 'com.apple.main-thread', stop reason = signal SIGSTOP
    frame #0: 0x000000019533cba4 libsystem_kernel.dylib`__ulock_wait + 8
    frame #1: 0x00000001004952d8 libsystem_pthread.dylib`_pthread_join + 444
  * frame #2: 0x000000013692d84c JavaScriptCore`WTF::Thread::waitForCompletion(this=0x0000000111470180) at ThreadingPOSIX.cpp:354:22
    frame #3: 0x00000001187cc44c WebKit`WebKit::PDFPlugin::destroy(this=0x0000000111521000) at PDFPlugin.mm:1921:22
    frame #4: 0x00000001172e5c2c WebKit`WebKit::Plugin::destroyPlugin(this=0x0000000111521000) at Plugin.cpp:99:5
    frame #5: 0x00000001172e85d0 WebKit`WebKit::PluginView::destroyPluginAndReset(this=0x00000001110c5760) at PluginView.cpp:321:19
    frame #6: 0x00000001172e83d0 WebKit`WebKit::PluginView::~PluginView(this=0x00000001110c5760) at PluginView.cpp:307:5
    frame #7: 0x00000001172e88d0 WebKit`WebKit::PluginView::~PluginView(this=0x00000001110c5760) at PluginView.cpp:296:1
    frame #8: 0x00000001172e896c WebKit`WebKit::PluginView::~PluginView(this=0x00000001110c5760) at PluginView.cpp:296:1```

@danielpunkass
Copy link
Contributor Author

I filed a bug with the WebKit project to document the underlying deadlock in WebKit's built-in PDF support: https://bugs.webkit.org/show_bug.cgi?id=246454

I'm not sure if we want to work around the issue in NNW but one possibility, if so, might be to see if we can examine the loaded web page, detect that it includes embedded PDF content, and if it impose some kind of timeout in NNW after which we would destroy and reconstruct the web view.

@danielpunkass
Copy link
Contributor Author

A more generalized workaround to consider might be to see if we can detect the scenario of a web view becoming unresponsive, and proactively terminate/reload it.

@brentsimmons brentsimmons added this to the NetNewsWire 6.3 milestone Mar 10, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants