Search Unity

Building in headless mode with -quite does not shutdown unity after build

Discussion in 'Linux' started by Krstn, Sep 17, 2018.

  1. Krstn

    Krstn

    Joined:
    Dec 30, 2012
    Posts:
    27
    I have this command line to build my app:

    Code (CSharp):
    1. /opt/Unity-2018.2.7f1/Editor/Unity -quit -batchmode -nographics -logFile /root/stdout.log  -buildTarget WebGL -projectPath /root/projects/dw_bo_unity_positioning -executeMethod WebGLBuilder.buildDev
    My WebGLBuilder.buildDev method looks like:

    Code (CSharp):
    1.         string[] scenes = {"Assets/Scenes/Scene.unity"};
    2.  
    3.         string pathToDeploy = "webglbuild-dev/unity";
    4.  
    5.         PlayerSettings.WebGL.compressionFormat = WebGLCompressionFormat.Gzip;
    6.         PlayerSettings.WebGL.linkerTarget = WebGLLinkerTarget.Asm;
    7.         PlayerSettings.WebGL.memorySize = 256;
    8.         PlayerSettings.WebGL.dataCaching = true;
    9.         PlayerSettings.WebGL.exceptionSupport = WebGLExceptionSupport.FullWithStacktrace;
    10.         PlayerSettings.WebGL.useEmbeddedResources = true;
    11.         PlayerSettings.WebGL.emscriptenArgs = "-s ALLOW_MEMORY_GROWTH=1";
    12.      
    13.         BuildPipeline.BuildPlayer(scenes, pathToDeploy, BuildTarget.WebGL, BuildOptions.None);
    And as stated in the title, in most of the cases, the build finishes and is "hanging", while after I kill Unity and some nodejs Unity related process the next build will pass ok.

    If someone could shed some light, I would be grateful. This is happening with versions 2018.2.2 -> 2018.2.7


    When the Unity does not shut down, in logs, I DON"T have this line:

    [Package Manager] Server::Kill -- Server was shutdown
     
    Last edited: Sep 17, 2018
  2. george_vasilchenko

    george_vasilchenko

    Joined:
    Sep 20, 2014
    Posts:
    14
    Got the same here while building Android project. Version 2018.2.10
    Output:
    Refresh: detecting if any assets need to be imported or removed ...
    Refresh: elapses 0.054368 seconds (Nothing changed)
    Refresh completed in 0.054442 seconds.
    [Package Manager] Server::Kill -- Server was shutdown
    Cleanup mono
    Checking for leaked weakptr:
    Found no leaked weakptrs.
    ##utp:{"type":"MemoryLeaks","allocatedMemory":431182,"memoryLabels":[{"Default":1292},{"NewDelete":262521},{"Thread":8},{"Manager":296},{"VertexData":96},{"GfxDevice":528},{"FMOD":640},{"Physics":1},{"Serialization":40},{"String":55004},{"DynamicArray":23298},{"Curl":1336},{"PoolAlloc":120},{"Sprites":8},{"GI":480},{"VR":1516},{"EditorGui":40},{"EditorUtility":416},{"AssetImporter":32},{"RestService":64},{"UnityConnect":17000},{"Collab":696},{"Upm":65750}]}