Skip to content

Texture load failure in several android smartphones in the latest version of easeljs-NEXT #969

@Nestorferrando

Description

@Nestorferrando

Hi!

we recently noticed that with the latest NEXT build, the atlas texture load fails on certain android devices, showing the following message on the console:
"Invalid image provided as source. Please ensure source is a correct DOM element. <img src=​"public/​chinchon_atlas_.png?1524563253728">​"

The same app works perfectly on other devices and PCs.

Looking for a little bit, when _loadTextureImage executed, for some reason, the comparisons

if (image instanceof Image && image.src)
if (image instanceof HTMLCanvasElement)

are evaluated as "false" on these devices. Adding some console debugging, these outputs:

p._loadTextureImage = function (gl, image) {
	var srcPath, texture, msg;
	console.log(image)
	console.log(image instanceof Image)
	console.log(image instanceof HTMLCanvasElement)
            ...

show this result:
image

Weird behavior. Maybe is some bug on the browser of these devices?

We solved it by just commenting the instanceof Image checking.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions