ID:2959842
 
Resolved
Too many winsets/wingets done via JavaScript could cause the browser to throttle them and stop responding.
BYOND Version:516.1650
Operating System:Windows 11 Pro
Web Browser:Chrome 117.0.0.0
Applies to:Dream Seeker
Status: Resolved (516.1651)

This issue has been resolved.
Descriptive Problem Summary:
WebView2 throttles BYOND.winget() and BYOND.winset(), and all other navigation.

It outputs, in the console:
Throttling navigation to prevent the browser from hanging. See https://crbug.com/1038223. Command line switch --disable-ipc-flooding-protection can be used to bypass the protection

Numbered Steps to Reproduce Problem:
1. Do a *lot* of winsetting, like if you use your own fancy navigation bar within a window.
2. It will eventually be throttled, preventing future navigation.

Code Snippet (if applicable) to Reproduce Problem:
var/html = @{"
<!DOCTYPE html>
<html>
<head>
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta charset="utf-8">

<script>
    let pos = [[0, 0], [10, 10], [20, 20], [30, 30], [40, 40], [50, 50], [40, 40], [30, 30], [20, 20], [10, 10], [0, 0]]
    let current = 0;

    function updatePos() {
        current++

        if(current === pos.length - 1) {
            current = 0;
        }

        window.BYOND.winset("test", {"pos": (pos[current][0]) + ',' + (pos[current][1])})
        document.getElementById("current-pos").innerText = "pos: " + (pos[current][0]) + ',' + (pos[current][1])

        setTimeout(updatePos, 10)
    }

    setTimeout(updatePos, 1000)

</script>

</head>

<body>
<div id="current-pos"></div>
</body>
"}

client/New()
. = ..()

winset(src, null, "browser-options=devtools")

src << browse(html, "window=test")


Expected Results:
I can do excessive amounts of navigation.

Actual Results:
I cannot.

Does the problem occur:
Every time? Or how often? Yes
In other games? Yes
In other user accounts? Yes
On other computers? Yes

When does the problem NOT occur? Sadly, using Trident.

Did the problem NOT occur in any earlier versions? If so, what was the last version that worked? (Visit http://www.byond.com/download/build to download old versions for testing.) On... 515... with that thing (IE11).

Workarounds:
None, I can't bring myself to use IE11.
The command line switch applies to Chrome, not to WebView2, even though they both run on Chromium. I'm looking for an option in WebView2 but so far I can't find it.
I have a potential fix for this in the next build but it'll need retesting in 516.1651. I don't have a test case that's complete unto itself so I didn't try this one out.
Lummox JR changed status to 'Please retest'
Can confirm, test case is fixed in 516.1651.
Lummox JR resolved issue with message:
Too many winsets/wingets done via JavaScript could cause the browser to throttle them and stop responding.

Login to reply.