Framebuffer/Draw framebuffer is incomplete

Hi there,

We’re trying to figure out why our BabylonJS app is fine on my Linux machine, fine on my coworker’s Mac laptop, fine on a Windows laptop too, but not rendering the scene on 2 others “clients”.

One was a Windows laptop, the other one a Windows desktop machine.

No error at all in the console.
Only clues we’ve got are 2 warnings:

GL_INVALID_FRAMEBUFFER_OPERATION: Framebuffer is incomplete.

[.WebGL-000001F24A9566D0] GL_INVALID_FRAMEBUFFER_OPERATION: Draw framebuffer is incomplete

We’re running the latest version of babylon apparently:

@babylonjs/post-processes”: “4.0.3”,
@babylonjs/core”: “4.0.3”,
@babylonjs/materials”: “4.0.3”,

Any help would be very welcome as without any errors we don’t have any idea about what’s going on.

One thing to note: The app wasn’t working on the desktop of someone who’s working a lot with 3D environments. So we suspected that the graphic card might be used by something else and not having enough resources to render our app. BUT, we asked that person to save and close everything he had but our app, and it was the same thing.

Thanks again for your help!

Hello and welcome!

Can you describe the computers where it does not work? OS, browser version, etc…

Hi Deltakosh!

Sure thing.

Windows 10 64 bit
Chrome 76.0.3809.132 64 bit


We noticed that we can interact with Babylon and the app in general BUT as soon as the user clicks out of the browser and the app looses focus, the rendering dies (?) at least is not displaying anything.

when you say APP, do you mean something like electron or is it a pure website?

You can try to make sure that engine.renderEvenInBackground is set to true

Thank you very much.

I’ve applied that as a hot fix and will test once the pipeline is done and we can deploy to review environment for him to access.

I’ll keep you posted tonight or tomorrow.

Thanks a lot!

1 Like

Ok fix has been deployed on a review environment and the person with the issue has been able to try out the fix. Unfortunately, the issue is still around and as soon as he looses focus the rendering is gone :man_shrugging:

I guess this does not happen in the browser ??? What environment is it deployed to ?

It is a web app, nothing wrapped into electron or anything else.

Unfortunately the part with the 3D scene is not opened to the public so there’s no point sharing the URL

Could you reproduce this behavior in the playground ???

I gave it a go with a simple color and it worked on the computer where our app is not working.
Our app is fairly large and not sure what to target for a repro. Also, the only 2 computers where that’s not working are to a customer so I have no way of testing a fix quickly as everything works fine on my machine (and on 20 others dev machine) but not those 2 in particular. We checked the user’s extensions and he’s got mc affee. Next time we get a chance to remotely connect to his computer we’ll try turning that chrome app off and see if it makes a diff.

1 Like

Yep I think something outside of the browser is killing the video driver and the browser cannot find it anymore

Update: we gave it a go with Firefox and it’s working just fine.

We also tried running chrome with the - -user-data-dir flag to have a brand new instance without any extension or weird settings. Same issue on chrome.

New element:

On our machines we’ve got the following message when we load babylon:

Babylon.js v4.0.3 - WebGL2

On the machines were it’s not working we’ve got

Babylon.js v4.0.3 - WebGL2 - Parallel shader compilation

Not sure if that’s a huge difference or not but sharing in case

You should have parallele shader compilation even on your PC. Are you sure you are on the same Chrome version / OS?

Another thing we tried: running babylon 4.1.0 alpha 24, didn’t work.

About your previous message: No the current/working one without that message was done on a mac, chrome v77.0.3865.90

ok so it is expected as Chrome on mac has no parallel shader compilation…
This is then something on the user computer that breaks chrome rendering

I’ve got access for the machine in the next 7 hours. If you’ve got things you want me to try let me know.

Another clue we just found out:
Once the rendering is broken (after we focused another element), if we refresh it won’t work, if we open the url in another tab it won’t work, if we reopen the whole browser it works again (until we click somewhere else and loose the focus).

Holy cow. Finally found out where it’s coming from (not why…).

We try to register a gamepad. Commenting that out: everything works fine :man_shrugging:.

I’ll keep digging.

OK so the issue is that on the machine where the 3D scene was working until loosing focus, there was a 3D mouse (which we suspected) but even though it wasn’t connected, because the driver was installed (I assume) it was getting inside the onGamepadConnectedObservable and the registerBeforeRender.

So when someone was focusing in or out OR using that mouse, it was setting the alpha and/or beta or the camera to NaN. Which was silently breaking down the scene :man_shrugging:.

I think it’d be nice to get an error when the camera beta or alpha are set to something that’s not a number.