ruffle-rs / ruffle

A Flash Player emulator written in Rust
https://ruffle.rs
Other
15.52k stars 805 forks source link

Clicker heroes: White screen issue #18021

Open waspennator opened 1 week ago

waspennator commented 1 week ago

Describe the bug

After pressing play, game gets stuck on a white screen.

Expected behavior

Game should work

Content Location

https://www.newgrounds.com/portal/view/643398?emulate=flash

Affected platform

Browser's extension

Operating system

Android 13

Browser

Chrome 128

Additional information

No response

JL2210 commented 14 hours ago

I bisected the problem to this patch:

edit: nope, that's wrong. Must've had a dirty environment or something.

JL2210 commented 10 hours ago

Here is the actual commit causing the regression, from #14671 (so I guess cc @Aaron1011?):

6c420fa5d509b7428b7d00eebd13a2b0800fd0c0 is the first bad commit
commit 6c420fa5d509b7428b7d00eebd13a2b0800fd0c0 (tag: nightly-2024-01-17)
Author: Aaron Hill <aa1ronham@gmail.com>
Date:   Sat Dec 16 18:03:41 2023 -0500

    avm2: Run most of Loader.loadBytes immediately

    This requires moving `set_root_movie` into `UpdateContext`.

    Now, we preload the entire movieclip immediately - Flash Player
    does this regardless of the size of the SWF.
    The 'Loader::load_complete' is delayed to the end of the frame
    (which is when the root class is constructed for the loaded clip).

...diff omitted for brevity...

Before this it does take a while to load, but afterwards it doesn't load at all (or at least for a very long time). To test, run with 2024-01-17 (hangs) and 2024-01-16 (working after a long while) on https://ruffle-regressions.github.io/ The version I'm using is: https://d1snsxh2hr65cz.cloudfront.net/ClickerHeroes_v20666.swf (from the playsaurus cdn which they used to back their website before converting to unity and html5)

It doesn't revert cleanly on master (not that I'd expect it to after 8 months) so I can't directly test removing it.