[OpenGL] failed to create X11 Window

I am trying to get object detection running on my Xavier NX but somehow I can’t get the output on my display (HDMI monitor). When I supply a file for output it works fine.

Output:

    [OpenGL] glDisplay -- X screen 0 resolution:  2560x1440
    [OpenGL] glDisplay -- X window resolution:    2560x1440
    [OpenGL] failed to create X11 Window.
    jetson.utils -- no output streams, creating fake null output

After which it will render to a fake output.

The code is mainly copied from this:

I have found similar topics but none of them contain a conclusive solution… I have tried
$ export DISPLAY=:0
with no result. How can I try to troubleshoot this?

Not sure for your case, but I’ve faced the same once when using a RTSP video source.
I can’t tell what was the root cause, but the workaround was to create the GL sink before the video source.

Jep! That worked. Who would’ve thought… Such a simpel solution. I’ve declared output first, then input, now it works. Thanks!