ruffle-rs / ruffle

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

Upgrade Complete 2, assertion failed panic #8753

Open CUB3D opened 1 year ago

CUB3D commented 1 year ago

Describe the bug

Purchasing some upgrades in Upgrade Complete 2, such as "User Interface" level 4 cause the player to panic with the following error:

thread 'main' panicked at 'assertion failed: `(left == right)`
  left: `Some(18)`,
 right: `Some(16)`: [FG] Gotos must start from the correct tag position for frame 1', core/src/display_object/movie_clip.rs:1547:9
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
AVM2 stack trace: 
        at flash.display::MovieClip/gotoAndStop()
        at UPGRADECOMPLETERNEWGROUNDSKONG_fla::UPGRADESCREEN_115/onEnterFrame()

Expected behavior

Game doesn't panic

Affected platform

Desktop app

Operating system

Linux

Browser

No response

Additional information

Removing this assert stops the panic and the button seems to behave as intended

adrian17 commented 1 year ago

@kmeisthax

(Also... does this mean that newgrounds enabled timeline_debug feature for their builds...?)

CUB3D commented 1 year ago

Just to clarify, this was running in the desktop player with the following:

cargo run --release --features=avm_debug --bin ruffle_desktop  -- --dont-warn-on-unsupported-content UGC2.swf
waspennator commented 1 year ago

Trying it out on my end, not only does the upgrade menu look weird on my end (shows all upgrades as available when only a few should be initially), trying to buy required upgrades to play the game like the play button or the button to exit the upgrade menu essentially softlocks the game on ruffle

waspennator commented 1 year ago

As of the latest build of ruffle on my end, i'm not seeing any assertion failed panic errors on the current NG, desktop, or the web build when buying upgrades. The upgrade menu seems to show up normally now. (Only a few upgrades initially, can purchase upgrades and they appear as purchased) I was able to fully upgrade user interface and I didn't see any assertion failed comments in the console log, plus I was able to click on the continue button without it softlocking. I believe it was fixed as of the 2023-01-05 nightly build.

2023-01-04 Nightly Upgrade Complete 2 1

2023-01-05 Nightly Upgrade Complete 2 2