nocturne: Impossible to create render texture (failed to link the target texture to the frame buffer)

When running examples/create_env.py, I get this error:

Impossible to create render texture (unsupported anti-aliasing level) Requested: 4 Maximum supported: 1. Impossible to create render texture (failed to link the target texture to the frame buffer).

It seems that it might be caused by SFML package. To get SFML>=2.5, I downloaded it from: https://www.sfml-dev.org/download.php (apt-get install libsfml-dev installs version 2.4.2). Has anyone faced this issue?

About this issue

  • Original URL
  • State: open
  • Created 2 years ago
  • Comments: 27 (4 by maintainers)

Most upvoted comments

Oh wait a second.

This line breaks X11 forwarding:

import os
os.environ["DISPLAY"] = ""

But this line doesn’t and also no ‘Impossible…’ error appear:

import os
del os.environ["DISPLAY"]

It works! Thanks!

You can close it now, or later when you find more permanent solution.

Here is a visualized scene: scene_with_peds

My understanding is that the package runs on the cluster, and only visualization through XQuartz/X11 forwarding is done on Mac. If I enable X11 forwarding, sf::RenderTexture::getMaximumAntialiasingLevel() returns 16. If I don’t enable X11 forwarding nothing gets printed and I get:

Failed to open X11 display; make sure the DISPLAY environment variable is set correctly
Aborted (core dumped)

In nocturne:

I don’t need X11 forwarding for tasks without rendering. E.g. imitation learning script works without it.

When I run a script where a scene is rendered (e.g. create_env.py/rendering.py),

  1. without X11 forwarding it will crash:
Failed to open X11 display; make sure the DISPLAY environment variable is set correctly
Aborted (core dumped)
  1. with X11 forwarding but without Eugene’s fix, it will run but no scene is rendered (empty output images). And this is returned: Impossible to create render texture (failed to link the target texture to the frame buffer)

  2. with X11 forwarding and with Eugene’s fix, it will run just fine.

Hope it helps

Thank you for testing this out! @nathanlct should respond in a bit (though he’s in French timezone so I’m not sure when)

I think I have a “hack” that will solve this temporarily while we try to find a permanent solution; I think if you in the code you are running do:

import os
del os.environ["DISPLAY"]

that will put things into headless mode and then everything should render properly using pyvirtualdisplay as the renderer

Then display forwarding breaks:

python nocturne_functions.py 
Failed to open X11 display; make sure the DISPLAY environment variable is set correctly
Aborted (core dumped)

We’ll keep looking into this tomorrow but in the meantime if you pull master we’ve fixed the issues with nocturne_functions.py If there’s any other blocking issues on the repo do let us know!

@eugenevinitsky, running on a cluster with: Tesla T4, Driver Version: 470.82.01, CUDA Version: 11.4. Visualizing on Mac with XQuartz.

@nathanlct, on it