2 ms·
And in fact, I don't think they have fixed it. I've seen "Error 5" plenty of times in Chrome. It seemingly occurs whenever I have a lot (100+) of tabs open for
by derefr 3y ago
And in fact, I don't think they have fixed it. I've seen "Error 5" plenty of times in Chrome. It seemingly occurs whenever I have a lot (100+) of tabs open for any site where each page allocates at least one accelerated drawing canvas (a literal <canvas>, or a <video>, or a .gif <img>.) I've seen it happen on Reddit (but only new reddit, not old reddit!) and on a number of other sites.
I hypothesize that Chrome simply has a global (i.e. cross-tab) per-toplevel-origin limit to the number of allocated accelerated drawing canvases it's willing to allow; and that when you go over it, Chrome forcibly de-allocates all the existing drawing canvases used by other tabs that have that toplevel origin loaded, thereby causing them to crash. It's probably a measure designed to prevent a site from from DoSing your computer by just allocating an infinite number of canvases.
- nonethewiser 3y agoThey said it also crashes when they just load the gif. It seems hard to believe they always had tons of tabs open for these tests.
- derefr 3y agoIt doesn't have to be tons of open tabs; it can just as well be one tab that makes tons of accel draw contexts all on its own — maybe temporary hidden <canvas> draw contexts that it never cleans up. But a dev would usually end up hitting that kind of problem during development; whereas, if the problem never arises through "normal use" but instead requires having 100+ open tabs on the site to trigger, that bug might go unnoticed all throughout the QA process. I can also extend my speculation about all the times I've personally seen "Error 5", although this is probably dipping into superstition territory: I think the per-toplevel-origin draw-context limit isn't static, but is influenced by the amount of VRAM available on the computer as a whole. So on an extremely VRAM-constrained system like a Raspberry Pi (or on a system that's running Cyberpunk 2077 on one display and Chrome on another, sharing a GPU) the per-toplevel-origin limit on accel draw contexts might be dropped as low as, say, 5: an amount low enough that just having one extra .gif on the single tab of the site you have open might be enough to make the tab fall over.