Skip to content

Easel 1.0 is unable to clone preloaded bmp in recursive clone of a container #949

Open
@adrian-gray

Description

@adrian-gray

Tested with Easel 1.0 on OSX 10.13.4, Chrome 66.0.3359.106, and Safari 11.1

When an image is loaded via a LoadQueue, then placed into a container, attempting to recursively clone the container results in an async GET error. The error happens within Bitmap's clone method when it attempts to run cloneNode(). Specific line reads:

image = image.cloneNode();

This worked fine on Easel 0.6. We are currently updating a heap of games to run on Easel 1.0 and this issue has shown up. Our current workaround is to cache the container in instead of cloning it.

I have made a Codepen at: https://codepen.io/adrian-gray/pen/wmLVJw

The display should show two bananas, the second being a clone of the first – offset by 200 on X.

Note that the error displayed on CodePen is different to a simple local server – but they are closely related.

With Chrome on a local server it shows an async error when it runs image.cloneNode() within Bitmap, on Codepen the same line of code shows a file not found error when trying to load the blob.

Safari shows the error as:
Failed to load resource: The operation couldn’t be completed. (WebKitBlobResource error 1.)

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions