Search Unity

Windows Build started to crash

Discussion in 'Editor & General Support' started by Lynxed, May 19, 2020.

  1. Lynxed

    Lynxed

    Joined:
    Dec 9, 2012
    Posts:
    121
    The game works in Editor, but crashes on splashscreen when built. Is was building fine before.

    Code (CSharp):
    1. SETUP - COM already setup - threaded VI might not be possible
    2. (Filename:  Line: 1352)
    3. Initialize engine version: 2019.3.11f1 (ceef2d848e70)
    4. [Subsystems] Discovering subsystems at path C:/!Works/MatterFlow/Build/MatterFlowO/MatterFlow_Data/UnitySubsystems
    5. GfxDevice: creating device client; threaded=1
    6. d3d11: CreateDXGIFactory2(...) not found, fallbacking to CreateDXGIFactory1(...).
    7. d3d11: QueryInterface(IDXGIFactory5) failed (80004002).
    8. Direct3D:
    9.     Version:  Direct3D 11.0 [level 11.0]
    10.     Renderer: NVIDIA GeForce GTX 980 Ti (ID=0x17c8)
    11.     Vendor:  
    12.     VRAM:     5992 MB
    13.     Driver:   26.21.14.4219
    14. D3D11 device created for Microsoft Media Foundation video decoding.
    15. <RI> Initializing input.
    16. <RI> Input initialized.
    17. <RI> Initialized touch support.
    18. Crash!!!
    19. SymInit: Symbol-SearchPath: '.;C:\!Works\MatterFlow\Build\MatterFlowO;C:\!Works\MatterFlow\Build\MatterFlowO;C:\Windows;C:\Windows\system32;SRV*C:\websymbols*http://msdl.microsoft.com/download/symbols;', symOptions: 534, UserName: 'USER'
    20. OS-Version: 6.1.0
    21. C:\!Works\MatterFlow\Build\MatterFlowO\MatterFlow.exe:MatterFlow.exe (000000013F4B0000), size: 667648 (result: 0), SymType: '-deferred-', PDB: '', fileVersion: 2019.3.11.61229
     
  2. Lynxed

    Lynxed

    Joined:
    Dec 9, 2012
    Posts:
    121
    Okay, i found the reason for the crash.
    Apparently, if you have serialized data in a singleton, you can not access it on declaration.

    Having this:

    Code (CSharp):
    1. public static long GlobalRate = SomeSingleton.Instance.GlobalRate;
    2. public static long GlobalHalfRate = GlobalRate / 2;
    will crash your build and tell you absolutely nothing about reasons for the crash.
    And because your Editor has this singleton initialized somehow, this will not crash the editor in runtime.
    This should be caught before the crash somehow.
     
    alex_dossamer likes this.