ruffle-rs / ruffle

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

express delivery - can't enter the level #16340

Closed zjk261 closed 1 day ago

zjk261 commented 2 weeks ago

Describe the bug

black screen

https://github.com/ruffle-rs/ruffle/assets/98996990/cfbd77ca-99b8-445f-b2fb-9b6d78f052d9

Expected behavior

https://github.com/ruffle-rs/ruffle/assets/98996990/a7c4cf97-a139-47fe-865c-c8fc7baeb0a2

Content Location

express-delivery.zip

Affected platform

Desktop app

Operating system

Windows 10

Browser

No response

Additional information

No response

Dinnerbone commented 1 week ago
ruffle_core::avm2::events: Error dispatching event EventObject(EventObject { type: "enterFrame", class: flash.events::Event, ptr: 0x22fe957fd70 }) to handler FunctionObject(FunctionObject { ptr: 0x22ff75a4430, name: Ok("net.flashpunk::Engine/onEnterFrame()") }) : TypeError: Error #1104: Attribute was already specified for element.
    at XML/XML::init()
    at XML()
    at com.cactigames.screens::PlayArea/loadLevel()
    at com.cactigames.screens::PlayArea/begin()
    at net.flashpunk::Engine/checkWorld()
    at net.flashpunk::Engine/update()
    at net.flashpunk::Engine/onEnterFrame()

It's reading an XML, then toString()ing it and reading it back once more. We lose namespace info in our toString(), causing it to clash with inkscape:version= and version= on the same element.