Closed Bug 1611621 Opened 5 years ago Closed 5 years ago

LEGO® Star Wars Battle Run plays poorly on Firefox Nightly

Categories

(Developer Engagement :: Outreach Request, defect, P1)

x86_64
Windows 10
defect

Tracking

(Not tracked)

RESOLVED WORKSFORME

People

(Reporter: alex_mayorga, Unassigned)

Details

Attachments

(2 files)

¡Hola!

My son tried playing LEGO® Star Wars Battle Run over at https://www.lego.com/assets/franchisesites/starwars/games/battlerungame/v5/index.html

His experience was sub-optimal and there were multiple graphic glitches on Firefox Nightly built from https://hg.mozilla.org/mozilla-central/rev/fb6b61e49217d835b2d6e435560424aab10d5475

¡Gracias!
Alex

Component: Untriaged → Performance
Product: Firefox → Core

Hi Alex,

thanks for reporting it.

Did you use a custom build that you built yourself? Or the official nightly build from that commit?

Can provide a profile or screenrecording for the gliches?

Thanks

Flags: needinfo?(alex_mayorga)

¡Hola Sean!

This happens on the official Firefox Nightly builds from Mozilla.

I just tried again on today's build and captured a profile https://perfht.ml/2HIGaWt

Hope this is useful with the investigation.

¡Gracias!
Alex

Flags: needinfo?(alex_mayorga)

This sounds more like a graphical issue rather than a performance issue, if the main problem are graphical glitches. Or was there sluggishness to the game as well?

Also, alex_mayorga, can you describe these glitches in more detail? Do you have screenshots?

Component: Performance → Graphics
Flags: needinfo?(alex_mayorga)

¡Hola Mike!

Once you allow the page access to the microphone, click the play button and the 1st video sequence completes a 3d model of model #75197 appears try clicking on the red bulls eye dot.

The image does not appear in Firefox Nightly, please see attached.

Interacting with the 3D model as with dragging with the mouse is much less performant on Firefox Nightly than on Edge.

Please find below the contents of the Web Console.

Hope this clarifies.

¡Gracias!
Alex

Navigated to https://www.lego.com/assets/franchisesites/starwars/games/battlerungame/v5/index.html
An AudioContext was prevented from starting automatically. It must be created or resumed after a user gesture on the page. game.min.js:1:1147257
An AudioContext was prevented from starting automatically. It must be created or resumed after a user gesture on the page. game.min.js:1:1257501
Autoplay is only allowed when approved by the user, the site is activated by the user, or media is muted. embed.min.js:1:794270
NotAllowedError: The play method is not allowed by the user agent or the platform in the current context, possibly because the user denied permission.
Error: WebGL warning: drawArraysInstanced: TEXTURE_2D at unit 0 is incomplete: The dimensions of level_base are not all positive. 6 embed.min.js:1:42036
Error: WebGL warning: drawArraysInstanced: TEXTURE_2D at unit 0 is incomplete: The dimensions of level_base are not all positive. 15 embed.min.js:1:42036
Error: WebGL warning: drawArraysInstanced: TEXTURE_2D at unit 0 is incomplete: The dimensions of level_base are not all positive. 11 embed.min.js:1:42036
Error: WebGL: No further warnings will be reported for this WebGL context. (already reported 32 warnings) embed.min.js:1:42036

Flags: needinfo?(alex_mayorga)

¡Hola Mike!

Here's the screen capture in Edge where the thumbnail displays correctly upon clicking on the red dot bulls eye in the 3D model.

Hope this clarifies.

¡Gracias!
Alex

Component: Graphics → Canvas: WebGL
Flags: needinfo?(jgilbert)
Priority: -- → P3
Assignee: nobody → jgilbert
Flags: needinfo?(jgilbert)
Priority: P3 → P1

So first off, I can't repro: It works for me.

"The dimensions of level_base are not all positive" is because there's 0x0 textures. This is probably from texImage2D(image) when image.complete is still false, so my guess is they aren't checking that first. This means that there will be racy behavior between multiple runs, and browser differences can sometimes make this appear to be deterministic. We should warn when uploads fail due to incompletely-loaded resources.

It's just a guess, but it would explain why the image didn't show up, if they expected it to be loaded and it wasn't.

If you try reloading it (f5 not shift-f5), does it still have this issue?

Flags: needinfo?(alex_mayorga)

¡Hola Jeff!

I tried again today and the image loaded fine on https://hg.mozilla.org/mozilla-central/rev/8ab81c8e93adff2d4187aabf1ddcfcae8bfc4e16

These errors and warnings were still appearing in the console though:

Navigated to https://www.lego.com/assets/franchisesites/starwars/games/battlerungame/v5/index.html
An AudioContext was prevented from starting automatically. It must be created or resumed after a user gesture on the page. game.min.js:1:1147257
An AudioContext was prevented from starting automatically. It must be created or resumed after a user gesture on the page. game.min.js:1:1257501
Autoplay is only allowed when approved by the user, the site is activated by the user, or media is muted. embed.min.js:1:794270
NotAllowedError: The play method is not allowed by the user agent or the platform in the current context, possibly because the user denied permission.
An AudioContext was prevented from starting automatically. It must be created or resumed after a user gesture on the page. 5 game.min.js:1:1144044
WebGL warning: drawArraysInstanced: TEXTURE_2D at unit 0 is incomplete: The dimensions of level_base are not all positive. 4 embed.min.js:1:42036

Is this a WebCompat bug then perhaps?

¡Gracias!
Alex

Flags: needinfo?(alex_mayorga)

I believe all those warnings are relatively innocuous. I think this is WebCombat, but we can also add a warning for this footgun.

¡Hola Jeff!

My son tried playing this again yesterday and the game got stuck at 100% loaded but play did not start.

Here's what the Web Console had when he called me and I started Edge for him to play.

I tried again later and it loaded with no issue.

Hope this is useful.

¡Gracias!
Alex

An AudioContext was prevented from starting automatically. It must be created or resumed after a user gesture on the page. game.min.js:1:1147257
TypeError: can't access property "setVolume", this.vrView is undefined game.min.js:1:1255469
An AudioContext was prevented from starting automatically. It must be created or resumed after a user gesture on the page. game.min.js:1:1257501
The buffer passed to decodeAudioData contains invalid content which cannot be decoded successfully. index.html
EncodingError: The given encoding is not supported.
The buffer passed to decodeAudioData contains invalid content which cannot be decoded successfully. 2 index.html
EncodingError: The given encoding is not supported. 2
The buffer passed to decodeAudioData contains invalid content which cannot be decoded successfully. 4 index.html
EncodingError: The given encoding is not supported. 4
The buffer passed to decodeAudioData contains invalid content which cannot be decoded successfully. index.html
EncodingError: The given encoding is not supported.
The buffer passed to decodeAudioData contains invalid content which cannot be decoded successfully. index.html
EncodingError: The given encoding is not supported.
The buffer passed to decodeAudioData contains invalid content which cannot be decoded successfully. 2 index.html
EncodingError: The given encoding is not supported. 2
TypeError: can't access property "name", starDestroyerScene is undefined game.min.js:1:1291230

I'm betting WebCompat, but let's check with padenot for decodeAudioData.

Flags: needinfo?(padenot)

Things all seem to work well here. I'm on OSX, I did see all the images (especially the one that seemed missing in alex's screenshot). Additionally, the sound effects play appropriately. I don't have decoding errors in the console.

All this smells like a racy asset loader or something, if images and audio assets are affected, and maybe also meshes.

Graphics performances is a separate issue I assume. It was ok-ish here on my recent mbp with the integrated chipset, but clearly solid 60fps when forcing the discrete GPU.

The animation with webrender weren't 60fps howevcer.

Flags: needinfo?(padenot)

We think there's a racy asset loader which races less in Chrome, but makes Firefox seem broken.

Component: Canvas: WebGL → Outreach Request
Product: Core → Developer Engagement
Version: 74 Branch → unspecified
Assignee: jgilbert → nobody

¡Hola Mike!

So we tried again today and the game seems to play alright and we did not see the missing images on Firefox Nightly built from https://hg.mozilla.org/mozilla-central/rev/e803948bb3cd52dae5566bfc517e3d04f06252e7

The only warning in the Web Console is now:

Navigated to https://www.lego.com/assets/franchisesites/starwars/games/battlerungame/v5/index.html
WebGL warning: drawArraysInstanced: TEXTURE_2D at unit 0 is incomplete: The dimensions of level_base are not all positive. 5 embed.min.js:1:42036

Is this a bug on the page or on Firefox Nightly?

¡Gracias!
Alex

Flags: needinfo?(miket)

That's what I call a "true warning": It's indicative that the page is getting things slightly wrong, or at least cutting corners. If it's running normally/successfully, we may be done here. With these bugs, it can be hard to tell if the website is actually fixed besides closing this bug and seeing if it pops up as a problem again!

Please report back if the bad behavior (the warning is ok behavior) returns!

Status: NEW → RESOLVED
Closed: 5 years ago
Resolution: --- → WORKSFORME
Flags: needinfo?(miket)
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: