ruffle-rs / ruffle

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

Error on https://www.tv-tokyo.co.jp/anime/yugioh-arcv/duel_juku2/index.html #8043

Open SnorlaxMonster opened 1 year ago

SnorlaxMonster commented 1 year ago

Error Info

Error name: Error Error message: panicked at 'called Option::unwrap() on a None value', core/src/display_object/movie_clip.rs:3134:14 Error stack:

Error: panicked at 'called `Option::unwrap()` on a `None` value', core/src/display_object/movie_clip.rs:3134:14
    at s.wbg.__wbg_new_df6e6ab7a65c4c4d (<anonymous>:3:6123)
    at std::sync::once::Once::call_once::{{closure}}::h7141d078b1ea013f (chrome-extension://ngiimfimchfgkmdgodaghdlcpmpjlamm/dist/46f130a0bf0e67be61630875891b8c8a.wasm:wasm-function[1278]:0x25797d)
    at std::sync::once::Once::call_inner::h02eac160d339afc2 (chrome-extension://ngiimfimchfgkmdgodaghdlcpmpjlamm/dist/46f130a0bf0e67be61630875891b8c8a.wasm:wasm-function[1534]:0x28683f)
    at core::ops::function::FnOnce::call_once{{vtable.shim}}::hf48d3d3ee3d10801 (chrome-extension://ngiimfimchfgkmdgodaghdlcpmpjlamm/dist/46f130a0bf0e67be61630875891b8c8a.wasm:wasm-function[4361]:0x35d034)
    at std::panicking::rust_panic_with_hook::h123718ba3bf480af (chrome-extension://ngiimfimchfgkmdgodaghdlcpmpjlamm/dist/46f130a0bf0e67be61630875891b8c8a.wasm:wasm-function[3307]:0x334b7b)
    at std::panicking::begin_panic_handler::{{closure}}::hf393a82e58397bd2 (chrome-extension://ngiimfimchfgkmdgodaghdlcpmpjlamm/dist/46f130a0bf0e67be61630875891b8c8a.wasm:wasm-function[3919]:0x351a0d)
    at std::sys_common::backtrace::__rust_end_short_backtrace::h2ff2cfc953878925 (chrome-extension://ngiimfimchfgkmdgodaghdlcpmpjlamm/dist/46f130a0bf0e67be61630875891b8c8a.wasm:wasm-function[4693]:0x362365)
    at rust_begin_unwind (chrome-extension://ngiimfimchfgkmdgodaghdlcpmpjlamm/dist/46f130a0bf0e67be61630875891b8c8a.wasm:wasm-function[4572]:0x360b37)
    at core::panicking::panic_fmt::h285dc015a87be5a4 (chrome-extension://ngiimfimchfgkmdgodaghdlcpmpjlamm/dist/46f130a0bf0e67be61630875891b8c8a.wasm:wasm-function[4695]:0x3623c9)
    at core::panicking::panic::h0abe4e7a620ae568 (chrome-extension://ngiimfimchfgkmdgodaghdlcpmpjlamm/dist/46f130a0bf0e67be61630875891b8c8a.wasm:wasm-function[4505]:0x35f9c5)

Player Info

Allows script access: true Player type: Object SWF URL: cho_duel_juku.swf Param movie: cho_duel_juku.swf Param quality: high Param bgcolor: #f7f8f3 Param play: true Param loop: false Param scale: showall Param menu: false Param devicefont: false Param allowScriptAccess: sameDomain Attribute 0: undefined Attribute 1: undefined Attribute 2: undefined Attribute 3: undefined Attribute 4: undefined

Page Info

Page URL: https://www.tv-tokyo.co.jp/anime/yugioh-arcv/duel_juku2/index.html SWF URL: https://www.tv-tokyo.co.jp/anime/yugioh-arcv/duel_juku2/cho_duel_juku.swf

Browser Info

Useragent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/105.0.0.0 Safari/537.36 OS: Win32

Ruffle Info

Version: 0.1.0 Name: nightly 2021-01-29 Channel: nightly Built: 2021-01-29T00:34:32.424Z Commit: bb4240ad1f9705b080c9f7861e38b6677a62d76b

SnorlaxMonster commented 1 year ago

I noticed that it seems to be occasionally displaying some garbage text. My assumption is that the text is encoded in Shift-JIS, but is attempted to be rendered as if it were in Unicode. That may have something to do with the crashing I've been experiencing.

For example, if you open the panel numbered 95, then scroll through you'll see garbage text such as "AfjXVNJthVbvJbvccB" and "fjXZfGXgBw@BliAeB[NEMAEJIXEWCAgjxZAq|ijccB". If you keep scrolling, eventually Ruffle crashes (and gives the option to submit the above error report).

n0samu commented 1 year ago

Hi @SnorlaxMonster, it looks like you are using a very old version of Ruffle. Do you have an outdated extension installed? If so, you should install the latest version from the Chrome Web Store instead: https://chrome.google.com/webstore/detail/ruffle/donbcfbmhbcapadipfkeojnmajbakjdc

This crash does not occur in the latest version of Ruffle. But the garbage text remains, so I agree that Ruffle must be misinterpreting the text encoding. Thanks for the report!

SnorlaxMonster commented 1 year ago

@n0samu Ah, it seems like I had to actually uninstall Ruffle and reinstall the latest version from the Chrome Web Store to actually get it to update. Updating Ruffle seems to have resolved the crashing issue, and some other corruption of images that I was also getting.

However, as you noted, the character encoding issue still appears to be present. Should I open a separate issue for the character encoding problems?

n0samu commented 1 year ago

I don't think you need to open a separate issue. Looking into this more, I found that the text is loaded via CSV spreadsheet files that use SHIFT-JIS encoding, for example: https://www.tv-tokyo.co.jp/anime/yugioh-arcv/duel_juku2/data/cnd095.csv And loading this game with real Flash Player (on an English Windows system) results in garbled text, too. So I guess Flash Player's behavior depends on the system locale. Ideally Ruffle should use a text encoding detection library to deal with cases like this automatically in a locale-independent way, I think.

mathewhodson commented 1 year ago

Similar to #8390

SnorlaxMonster commented 1 year ago

The original issue I had was resolved. The remaining issue is a duplicate of #8390

n0samu commented 1 year ago

No, this is not a duplicate issue. This SWF is not version 5, it is version 9. This problem is with loading external text with non-UTF8 encodings, not with SWFv5 internal text fields.