Bug 437665 - When switching to HTML, QtWebkit ASSERTION FAILED: resource->url() == url.string()
Summary: When switching to HTML, QtWebkit ASSERTION FAILED: resource->url() == url.str...
Status: RESOLVED UPSTREAM
Alias: None
Product: trojita
Classification: Applications
Component: Core (other bugs)
Version First Reported In: git
Platform: Other Linux
: NOR normal
Target Milestone: ---
Assignee: Trojita default assignee
URL: https://bugreports.qt.io/browse/QTBUG...
Keywords:
Depends on:
Blocks:
 
Reported: 2021-05-25 14:10 UTC by Stefan de Konink
Modified: 2021-05-25 21:09 UTC (History)
0 users

See Also:
Latest Commit:
Version Fixed/Implemented In:
Sentry Crash Report:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Stefan de Konink 2021-05-25 14:10:26 UTC
SUMMARY

When switching to HTML for a specific message I end up with a crash in QtWebkit.

Forbidden per policy: QUrl("trojita-imap://ssl.gstatic.com/ui/v1/icons/mail/icons2.png")
ASSERTION FAILED: resource->url() == url.string()
/var/tmp/portage/dev-qt/qtwebkit-5.212.0_pre20200309-r1/work/qtwebkit-5.212.0-alpha4/Source/WebCore/loader/cache/CachedResourceLoader.cpp(625) : WebCore::CachedResourceHandle<WebCore::CachedResource> WebCore::CachedResourceLoader::requestResource(WebCore::CachedResource::Type, WebCore::CachedResourceRequest&)
Comment 1 Jan Kundrát 2021-05-25 14:17:55 UTC
Since you're on Gentoo, a rebuild should be possible. Can you patch https://github.com/qtwebkit/qtwebkit/blob/qtwebkit-5.212.0-alpha4/Source/WebCore/loader/cache/CachedResourceLoader.cpp#L625 so that it prints out both resource->url() and url.string()? This could be a new webkit disliking our `data:` URL scheme, but that part of Trojita has not been modified for years...
Comment 2 Stefan de Konink 2021-05-25 14:26:48 UTC
Sure but Webkit takes a while to recompile ;) I'm on it.
Comment 3 Jan Kundrát 2021-05-25 14:50:03 UTC
If you've got debug symbols (and if these variables have not been optimized away), setting up a breakpoint and printing them via the debugger (perhaps via something insane like foo.url().string().data()) might do the trick as well, but it usually won't do that for me.
Comment 5 Jan Kundrát 2021-05-25 19:42:26 UTC
That looks like a bug in webkit, then. I was afraid that perhaps there was something on our part, passing back a QNetworkReply with a different URL or something, but this probably is straight from a QNetworkAccessManager, I think. Anyway, I just don't think this is a bug in Trojita. Thanks for the quick turnaround with details, and feel free to Cc me on a bugreport upstream in case they need help carving out a reproducer basd on Trojita's code -- but you can probably just as well save the HTML message, load that via a QtWebkit widget thingy, and watch it crash. Or if that URL is in a non-HTML part, perhaps in a stylesheet in another MIME part, that might be harder to debug.
Comment 6 Stefan de Konink 2021-05-25 21:09:08 UTC
Thanks Jan, added the upstream URL.