Closed madisonsilver closed 1 year ago
Note that there is an older Seedling issue here: #10082. I haven't seen any further discussion on it, so it may or may not have been resolved. (If the infinite loop still exists, it would happen after this bug.)
Building and running ruffle with debug settings returns the following error:
2023-10-15T17:07:26.322856Z ERROR ruffle_core::avm2::events: Error dispatching event EventObject(EventObject { type: "enterFrame", class: flash.events::Event, ptr: 0x1cef9026ec0 }) to handler FunctionObject(FunctionObject { ptr: 0x1ceecb990c0 }) : ReferenceError: Error #1065: Variable Main is not defined.
at global/flash.utils::getDefinitionByName()
at Preloader/startup()
at Preloader/load()
at Preloader/onEnterFrame()
Which would correspond to this line of code, and point towards a issue with getDefinitionByName. https://github.com/ConnorUllmann/Seedling/blob/826ba77d67a4e6cc826204faa8948ecfaa1c00fa/src/Preloader.as#L217C26-L217C45
This also may be related to #12810 .
This appears to be a regression caused by https://github.com/ruffle-rs/ruffle/commit/ddefac322a03a9cc54268c6674bab51b84021071 . I performed a git bisect (see log below) and tested it manually to confirm.
git bisect start
# status: waiting for both good and bad commits
# bad: [5e3bd488f1cf19f010fd181f2ed8c254511aacf5] web: Make jpegxr optional on web but enabled by default by CI
git bisect bad 5e3bd488f1cf19f010fd181f2ed8c254511aacf5
# status: waiting for good commit(s), bad commit known
# good: [6eeb2de2133d1a52650216080003c311fccf6300] avm2: Stub flash.text.TextFormat.display getter and setter
git bisect good 6eeb2de2133d1a52650216080003c311fccf6300
# good: [4f9cc4e3c4850188916b8191528b175de22e4cbf] core: Clear this on scrollRect, not just ancestors
git bisect good 4f9cc4e3c4850188916b8191528b175de22e4cbf
# good: [495f19f10dc2aedfa5dc89e4168999ed4b40b6dd] tests: Port avmplus ecma3 ObjectObjects tests
git bisect good 495f19f10dc2aedfa5dc89e4168999ed4b40b6dd
# good: [d55cc23f5503f53932c64edf516ca375eaa01764] chore: Update translations from Crowdin
git bisect good d55cc23f5503f53932c64edf516ca375eaa01764
# good: [98cfa60832a67a9aa20a4ea256334fc0fcf1a918] avm2: Namespace improvements
git bisect good 98cfa60832a67a9aa20a4ea256334fc0fcf1a918
# bad: [3dc75f7ab8ff709e03ae4dc03c1c0d4c4278f3eb] chore: Update translations from Crowdin
git bisect bad 3dc75f7ab8ff709e03ae4dc03c1c0d4c4278f3eb
# skip: [673aa78f9a7f0f9a6ce0f2054dc01ad1b22860f7] chore(deps): update actions/checkout action to v4
git bisect skip 673aa78f9a7f0f9a6ce0f2054dc01ad1b22860f7
# skip: [c5abed07c496fef3b85904c27aaf9ec3c30ab00e] Fix BitmapData.clone accidentally re-using GPU texture
git bisect skip c5abed07c496fef3b85904c27aaf9ec3c30ab00e
# bad: [c93020e729d24916c479bb055ee05caf9675270b] wgpu: Correctly set format when rendering to Stage3D texture
git bisect bad c93020e729d24916c479bb055ee05caf9675270b
# skip: [2dcd78326144920bb6f0f39e05757fc1c077faf3] render: Disable wgpu unused shader output check when possible
git bisect skip 2dcd78326144920bb6f0f39e05757fc1c077faf3
# good: [fe8390760af39b12a4a3d1296516a7a557a15459] avm2: Support node namespace in XML.namespace
git bisect good fe8390760af39b12a4a3d1296516a7a557a15459
# skip: [30614bdd2f16c89b8ff06a07d4d078161fa689b0] avm2: QName constructor improvements
git bisect skip 30614bdd2f16c89b8ff06a07d4d078161fa689b0
# skip: [58b18e282b64629139ce64b4d6202f214bb8c72a] chore: Update translations from Crowdin
git bisect skip 58b18e282b64629139ce64b4d6202f214bb8c72a
# skip: [ec7a8ac6453cbc48d12aaffc125dd4de79340f5b] avm2: Add support for Stage3D bytearray/compressed textures (#13180)
git bisect skip ec7a8ac6453cbc48d12aaffc125dd4de79340f5b
# skip: [6d51bc39640b565cad47d7f6d9400e77ddf93d15] avm2: Namespace support for XML.name()
git bisect skip 6d51bc39640b565cad47d7f6d9400e77ddf93d15
# good: [09716b838618e042cb9936952e83b836a8eb53f2] tests: make jpegxr optional
git bisect good 09716b838618e042cb9936952e83b836a8eb53f2
# good: [c5704ed81913f4801c933dbe2ee5dd174b2e8437] Revert "web: As appropriate use embed height mentioned in Mozilla bug 810082 c65"
git bisect good c5704ed81913f4801c933dbe2ee5dd174b2e8437
# good: [6394b29962152804b62a970ea0318872e16841fc] nagal-agal: Fix detection of writing a scalar to a destination
git bisect good 6394b29962152804b62a970ea0318872e16841fc
# bad: [a5b4b63edc37b11aeac9d95f9fe42469f3c96d6d] avm2: Stub Matrix3D.pointAt
git bisect bad a5b4b63edc37b11aeac9d95f9fe42469f3c96d6d
# bad: [ddefac322a03a9cc54268c6674bab51b84021071] avm2: Run DoAbc/DoAbc2/SymbolClass as part of their frame
git bisect bad ddefac322a03a9cc54268c6674bab51b84021071
# first bad commit: [ddefac322a03a9cc54268c6674bab51b84021071] avm2: Run DoAbc/DoAbc2/SymbolClass as part of their frame
My DoAbc/SymbolClass change appears to have exposed a bug in how we handle Sprite
s with frame data. Currently, a movieclip with a class extending Sprite
(and not MovieClip
) will ignore any frames in the SWF, and always stay stopped at the first frame. This is necessary for some SWFs to work - however, this SWF has class Preloader extends Sprite
, but has lots of critical tags in the second frame (including a DoAbc2
that defines Main
).
It seems like there's some kind of special case around Sprite
classes where frames are not ignored. I'll continue to investigate
This will be fixed by https://github.com/ruffle-rs/ruffle/pull/13595
Describe the bug
When attempting to run Seedling, the game will freeze at 95% loaded (see attached image), and output the following error to the console:
ERROR core/src/avm2/events.rs:424 Error dispatching event EventObject(EventObject { type: "enterFrame", class: flash.events::Event, ptr: 0x2968d38 }) to handler FunctionObject(FunctionObject { ptr: 0x806b30 }) : ReferenceError: Error #1065: Variable Main is not defined.
Website: https://connorullmann.com/games/Seedling/Seedling.html .swf: https://connorullmann.com/games/Seedling/Seedling.swf
Website: https://www.kongregate.com/games/TimeBlog/seedling?acomplete=seedling .swf: game150260.konggames.com/gamez/0015/0260/live/Seedling.swf?kongregate_game_version=1343066131
(Note that Kongregate may also show the following error:
ERROR core/src/loader.rs:800 Error during movie loading of "https://game150260.konggames.com/games/TimeBlog/seedling/frame/9a6a7a85-04ef-4abc-8fe4-64b9a7b0e89c/https%3A%2F%2Fchat.kongregate.com%2Fflash%2FAPI_AS3_d43c4b859e74432475c1627346078677.swf": HttpNotOk("HTTP status is not ok, got ", 404, false)
This appears to be a Kongregrate-specific problem.)Expected behavior
The game finishes loading and proceeds to the credits and title screen.
Affected platform
Browser's extension
Operating system
Windows 10
Browser
Google Chrome 117, Firefox 118
Additional information
This was tested on both Google Chrome 117 and Firefox 118.
I also tested the 2023-10-14 nightly build on desktop, but it only showed a black screen.Edit: It turned out that this was a result of Seedling's domain checking. Trying it again with the correct link resulted in the same error as above after loading 0%.