Page MenuHome

Blender crashes when rendering from the command line without display or remote display
Closed, DuplicatePublic

Description

System Information
Operating system:

  • Ubuntu 20.04 x64 with NVIDIA Card 960m
  • Ubuntu 16.04 x64 with intel grafics.

However, i run blender from snap, so libs should be the same on both installs

Graphics card:

Blender Version
Blender 2.91.2 (hash 5be9ef417703 built 2021-01-19 16:16:34) as delivered via snap install

Short description of error
Blender crashes when trying to render an eevee scene from the command line
when either DISPLAY is not set or when trying to launch via an remote X11 connection (ssh -C -X).

Exact steps for others to reproduce the error

This run is with DISPLAY set (ssh -C -X):

hcw@mediasrv:~/work/Priv/FocusRail/HW/blend$ LIBGL_DEBUG=verbose blender  --background ./focusrail-pack.blend --background --render-anim
Blender 2.91.2 (hash 5be9ef417703 built 2021-01-19 16:16:34)
Blender 2.91.2 (hash 5be9ef417703 built 2021-01-19 16:16:34)
/run/user/1000/gvfs/ non-existent directory
found bundled python: /snap/blender/65/2.91/python
Read blend: /home/hcw/work/Priv/FocusRail/HW/blend/./focusrail-pack.blend
Info: Read library:  '/home/hcw/work/Priv/FocusRail/HW/blend/makerbean-parts.blend', '//makerbean-parts.blend', parent '<direct>'
Info: Read library:  '/home/hcw/work/Priv/FocusRail/HW/blend/nema-17.blend', '//nema-17.blend', parent '<direct>'
libGL: screen 0 does not appear to be DRI2 capable
libGL: OpenDriver: trying /usr/lib/x86_64-linux-gnu/dri/tls/swrast_dri.so
libGL: OpenDriver: trying /usr/lib/x86_64-linux-gnu/dri/swrast_dri.so
libGL: Can't open configuration file /home/hcw/.drirc: No such file or directory.
libGL: Can't open configuration file /home/hcw/.drirc: No such file or directory.
libGL error: No matching fbConfigs or visuals found
libGL error: failed to load driver: swrast
function is no-op
function is no-op
function is no-op
Writing: /tmp/focusrail-pack.crash.txt
Segmentation fault (core dumped)
hcw@mediasrv:~/work/Priv/FocusRail/HW/blend$ echo $DISPLAY
localhost:10.0

hcw@mediasrv:~/work/Priv/FocusRail/HW/blend$ cat /tmp/focusrail-pack.crash.txt
# Blender 2.91.2, Commit date: 2021-01-19 16:15, Hash 5be9ef417703

# backtrace
/snap/blender/65/blender(BLI_system_backtrace+0x20) [0x84bbb90]
/snap/blender/65/blender() [0xe529bd]
/lib/x86_64-linux-gnu/libc.so.6(+0x354c0) [0x7f533550d4c0]
/lib/x86_64-linux-gnu/libc.so.6(+0x8e0ee) [0x7f53355660ee]
/snap/blender/65/blender(_ZN7blender3gpu9GLBackend13platform_initEv+0x53) [0x70af813]
/snap/blender/65/blender(GPU_backend_init+0x7a) [0x709edba]
/snap/blender/65/blender(GPU_context_create+0x82) [0x709ef12]
/snap/blender/65/blender(DRW_opengl_context_create+0x2f) [0x1313bcf]
/snap/blender/65/blender(WM_init_opengl+0x19) [0x11d2129]
/snap/blender/65/blender(DRW_render_context_enable+0x75) [0x1314575]
/snap/blender/65/blender() [0x6b00fd9]
/snap/blender/65/blender(RE_engine_render+0x24e) [0x6b01a1e]
/snap/blender/65/blender() [0x6b0b461]
/snap/blender/65/blender() [0x6b0e460]
/snap/blender/65/blender(RE_RenderAnim+0x29c) [0x6b0ef8c]
/snap/blender/65/blender() [0xe4f5d0]
/snap/blender/65/blender(BLI_argsParse+0xc7) [0x841b167]
/snap/blender/65/blender(main+0x2c4) [0xd8d164]
/lib/x86_64-linux-gnu/libc.so.6(__libc_start_main+0xf0) [0x7f53354f8840]
/snap/blender/65/blender() [0xe4f133]

# Python backtrace
hcw@mediasrv:~/work/Priv/FocusRail/HW/blend$

This run is without display:

hcw@mediasrv:~/work/Priv/FocusRail/HW/blend$ LIBGL_DEBUG=verbose blender  --background ./focusrail-pack.blend --background --render-anim
Blender 2.91.2 (hash 5be9ef417703 built 2021-01-19 16:16:34)
Blender 2.91.2 (hash 5be9ef417703 built 2021-01-19 16:16:34)
/run/user/1000/gvfs/ non-existent directory
found bundled python: /snap/blender/65/2.91/python
Read blend: /home/hcw/work/Priv/FocusRail/HW/blend/./focusrail-pack.blend
Info: Read library:  '/home/hcw/work/Priv/FocusRail/HW/blend/makerbean-parts.blend', '//makerbean-parts.blend', parent '<direct>'
Info: Read library:  '/home/hcw/work/Priv/FocusRail/HW/blend/nema-17.blend', '//nema-17.blend', parent '<direct>'
Unable to open a display
Aborted (core dumped)
hcw@mediasrv:~/work/Priv/FocusRail/HW/blend$

Event Timeline

Hauke Wintjen (hcw70) renamed this task from Blender crashes when rendering from the command line without display to Blender crashes when rendering from the command line without display or remote display.Feb 3 2021, 1:50 PM
Hauke Wintjen (hcw70) created this task.

This is a side effect of the same problem described in T84675: Batch Rendering Crashes if EEVEE set in scene,
The difference is that there, the GPU is not supported.
And here the GPU cannot create a context without a display.

I don't know if it's possible to create an OpenGL context without a display (@Jeroen Bakker (jbakker) or @Clément Foucault (fclem) can give you more information on that).
If it is not possible, I would say that it is a duplicate of the other report.

IMHO rendering EEVEE should also be possible on the command line. If there is no display to connect to then blender should revert back to non-GPU rendering....

Maybe see https://community.khronos.org/t/opengl-rendering-without-display/58289 for hints.

Hmm. Had a closer look at T84675. That one talks about Windows, mine talks about Linux, which is quite a large difference regarding display handling IMHO.....

So should this one be re-opened since it is not a duplicate?