Search Unity

Bug Segfault when run without X server and without -nographics parameter

Discussion in 'Linux' started by unityoracle, Jul 14, 2018.

  1. unityoracle

    unityoracle

    Joined:
    Jul 3, 2018
    Posts:
    12
    This segfault occurs in unity-editor-2018.1.2f1 when -nographics is not provided on the cmd line and there is no X display running on the machine for the user. Notice that main() is calling InitializeX11() and calling into libX11, which shouldn't occur when -batchmode is provided as a parameter.

    $ unity-editor -quit -batchmode -projectPath . -buildLinux64Player ./out
    No protocol specified
    Segmentation fault


    $ cat /home/user/.config/unity3d/Editor.log

    Error opening default X display
    (Filename: /home/builduser/buildslave/unity/build/Editor/Platform/Linux/X11Quarantine.cpp Line: 33)


    $ gdb
    (gdb) bt
    #0 0x00007ffff5bc6ca8 in _XimDefaultFg () from /usr/lib64/libX11.so.6
    #1 0x00007ffff5bc7e78 in _XimSetICDefaults () from /usr/lib64/libX11.so.6
    #2 0x00007ffff5bc7ee7 in _XimSetICDefaults () from /usr/lib64/libX11.so.6
    #3 0x00007ffff5bc4060 in _XimLocalCreateIC () from /usr/lib64/libX11.so.6
    #4 0x00007ffff5baa259 in XCreateIC () from /usr/lib64/libX11.so.6
    #5 0x0000000001b3d58e in InitializeX11 ()
    #6 0x0000000000537fef in main ()
     
    Last edited: Jul 16, 2018
  2. Tak

    Tak

    Joined:
    Mar 8, 2010
    Posts:
    1,001
    Yes, the Unity editor on Linux currently requires a usable X display, even in batch mode.