Search Unity

  1. Unity 6 Preview is now available. To find out what's new, have a look at our Unity 6 Preview blog post.
    Dismiss Notice
  2. Unity is excited to announce that we will be collaborating with TheXPlace for a summer game jam from June 13 - June 19. Learn more.
    Dismiss Notice

Bug Segfault when building via cmd line with -nographics parameter

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

  1. unityoracle

    unityoracle

    Joined:
    Jul 3, 2018
    Posts:
    12
    In 2018.1.2f1, I get a segfault when trying to build via the following command. If the -nographics flag is removed, it succeeds (but that causes the gui's splash screen to appear which interferes with automated builds).

    The stack trace is included below. Notice that calls are made into X libs, which shouldn't be happening when -batchmode is provided as a parameter or when -nographics is provided as a parameter. And both are provided in this case.

    $ unity-editor -quit -batchmode -nographics -projectPath $HOME/game -buildLinux64Player /tmp/game/out -logFile /dev/stdout

    #0 0x00007ffff5b872a4 in XAddExtension () from /usr/lib64/libX11.so.6
    #1 0x00007ffff5953211 in _XcursorGetDisplayInfo () from /usr/lib64/libXcursor.so.1
    #2 0x00007ffff5953709 in XcursorSupportsARGB () from /usr/lib64/libXcursor.so.1
    #3 0x00007ffff5951ed4 in XcursorImageLoadCursor () from /usr/lib64/libXcursor.so.1
    #4 0x0000000002b8df64 in GenerateCursor ()
    #5 0x0000000002b8e1f7 in Cursors::InitializeCursors ()
    #6 0x0000000000ab932a in PlayerSettings::InitDefaultCursors ()
    #7 0x0000000000604553 in TypeManager::CallPostInitializeTypes ()
    #8 0x0000000000a78642 in InitializeEngineGraphics ()
    #9 0x00000000019a0a53 in Application::InitializeProject ()
    #10 0x0000000001b50748 in InitializeUnity ()
    #11 0x00000000005381b5 in main ()
     
    Last edited: Jul 16, 2018
  2. Bigpete591

    Bigpete591

    Joined:
    May 7, 2013
    Posts:
    60
    Also getting this error on Ubuntu 18.04 Unity 2018.3.0f2

    Code (CSharp):
    1. ==11500== Process terminating with default action of signal 11 (SIGSEGV)
    2. ==11500==  Access not within mapped region at address 0x968
    3. ==11500==    at 0x9A04FF4: XAddExtension (in /usr/lib/x86_64-linux-gnu/libX11.so.6.3.0)
    4. ==11500==    by 0x9D189D0: _XcursorGetDisplayInfo (in /usr/lib/x86_64-linux-gnu/libXcursor.so.1.0.2)
    5. ==11500==    by 0x9D18F28: XcursorSupportsARGB (in /usr/lib/x86_64-linux-gnu/libXcursor.so.1.0.2)
    6. ==11500==    by 0x9D17723: XcursorImageLoadCursor (in /usr/lib/x86_64-linux-gnu/libXcursor.so.1.0.2)
    7. ==11500==    by 0x2D88C75: Cursors::GenerateCursor(Texture2D*, Vector2f, CursorMode) (in /opt/Unity-2018.3.0f2/Editor/Unity)
    8. ==11500==    by 0x2D88E06: Cursors::InitializeCursors(Texture2D*, Vector2f) (in /opt/Unity-2018.3.0f2/Editor/Unity)
    9. ==11500==    by 0xA62E0F: PlayerSettings::InitDefaultCursors() (in /opt/Unity-2018.3.0f2/Editor/Unity)
    10. ==11500==    by 0xA62EEE: PlayerSettings::PostInitializeClass() (in /opt/Unity-2018.3.0f2/Editor/Unity)
    11. ==11500==    by 0x6168C2: TypeManager::CallPostInitializeTypes() (in /opt/Unity-2018.3.0f2/Editor/Unity)
    12. ==11500==    by 0xAEAD0C: InitializeEngineGraphics(bool) (in /opt/Unity-2018.3.0f2/Editor/Unity)
    13. ==11500==    by 0x1911EE3: Application::InitializeProject() (in /opt/Unity-2018.3.0f2/Editor/Unity)
    14. ==11500==    by 0x1A8C3AB: InitializeUnity(void*) (in /opt/Unity-2018.3.0f2/Editor/Unity)
    15.  
     
  3. Rakiah_BK

    Rakiah_BK

    Joined:
    Oct 30, 2016
    Posts:
    8
    also receiving a segfault

    Initialize engine version: 2018.3.0f2 (6e9a27477296)
    Forcing GfxDevice: Null
    NullGfxDevice:
    Version: NULL 1.0 [1.0]
    Renderer: Null Device
    Vendor: Unity Technologies
    [EnlightenBakeManager] m_Clear = false;
    WARNING: Shader Unsupported: 'Hidden/FrameDebuggerRenderTargetDisplay' - Pass '' has no vertex shader
    Initialize mono
    Mono path[0] = '/opt/Unity/Editor/Data/Managed'
    Mono path[1] = '/opt/Unity/Editor/Data/MonoBleedingEdge/lib/mono/unityjit'
    Mono config path = '/opt/Unity/Editor/Data/MonoBleedingEdge/etc'
    Using monoOptions --debugger-agent=transport=dt_socket,embedding=1,server=y,suspend=n,address=0.0.0.0:56032
    Begin MonoManager ReloadAssembly
    Initializing Unity.PackageManager (PackageManager) v2018.3.0 for Unity v2018.3.0f2
    Registering precompiled unity dll's ...
    Register platform support module: /opt/Unity/Editor/Data/PlaybackEngines/LinuxStandaloneSupport/UnityEditor.LinuxStandalone.Extensions.dll
    Registered in 0.001604 seconds.
    Registering platform support modules:
    Registered platform support modules in: 0.16079s.
    Native extension for LinuxStandalone target not found
    Refreshing native plugins compatible for Editor in 1.73 ms, found 1 plugins.
    Preloading 1 native plugins for Editor in 14.48 ms.
    Mono: successfully reloaded assembly
    - Completed reload, in 2.869 seconds
    Registering precompiled user dll's ...
    Registered in 0.149299 seconds.
    Platform modules already initialized, skipping
    Assertion failed on expression: 'klass != NULL'
    (Filename: /home/builduser/buildslave/unity/build/Editor/Src/ScriptCompilation/ScriptCompilationPipeline.cpp Line: 1292)
    Receiving unhandled NULL exception
    Segmentation fault (core dumped)
     
  4. PixelJ

    PixelJ

    Unity Technologies

    Joined:
    Nov 1, 2018
    Posts:
    216
    If you have a repro project, please submit a bug with it.
    https://unity3d.com/unity/qa/bug-reporting
     
  5. ReeeZ

    ReeeZ

    Joined:
    Feb 21, 2021
    Posts:
    11
    Is there any news on this issue? I can still reproduce this on two different machines with Unity 2021.1.11f ......
     
  6. Daerst

    Daerst

    Joined:
    Jun 16, 2016
    Posts:
    275
    Currently preventing
    --nographics
    builds for our project after adding a custom mouse cursor via Player Settings, Unity 2021.1.12f1.
     
    Last edited: Aug 25, 2021
  7. C_So

    C_So

    Joined:
    Oct 7, 2019
    Posts:
    2
    In a
    I'm waiting for a Unity dev to come and tell us that this is "by design".
     
  8. Daerst

    Daerst

    Joined:
    Jun 16, 2016
    Posts:
    275
    Hey, don't be snappy :p

    From the logs it looks like it breaks at the point where, after removing the cursor again, it displays the progress bar (
    DisplayProgressbar: Building Player
    ), probably because it would at this point initialize the cursor, which it can't without the GPU. @PixelJ I can't spare the time to set up a repro project right now, but still poking you because maybe those details are helpful.
     
    Last edited: Aug 26, 2021
  9. zh99998

    zh99998

    Joined:
    Mar 2, 2020
    Posts:
    18
    five years passed, It still happends in 2022.2.
     
  10. Coblit01

    Coblit01

    Joined:
    Sep 20, 2023
    Posts:
    1
    Yep, having the same issue in 2023.1.12f1.
     
  11. tylerinthezoo

    tylerinthezoo

    Unity Technologies

    Joined:
    Jun 15, 2022
    Posts:
    97
    would you mind to help filing a bug here? thanks!