Search Unity

  1. Welcome to the Unity Forums! Please take the time to read our Code of Conduct to familiarize yourself with the forum rules and how to post constructively.
  2. Voting for the Unity Awards are OPEN! We’re looking to celebrate creators across games, industry, film, and many more categories. Cast your vote now for all categories
    Dismiss Notice
  3. Dismiss Notice

2018.1 Beta 9 - (Windows) Runs in editor and builds, Player doesn't start

Discussion in '2018.1 Beta' started by hallidev, Mar 1, 2018.

  1. hallidev

    hallidev

    Joined:
    Jan 21, 2017
    Posts:
    14
    This one is confusing. Apologies ahead of time if it turns into a small book.

    The tl;dr;is that with 2018.1 Beta 9, everything works fine in the editor. When building and running, nothing happens. The executable starts but nothing happens. It has to be killed manually in Task Manager.

    If nothing else, please help me figure out where to get error information. What am I missing? There is no crash information that I can find, but I'm sure something is going wrong.

    More details -

    I have a project that runs without an issue in 2017.x in editor and with builds. I've actually run this setup in 2017.x with multiple projects. No problems so far in editor or with builds.

    In 2018.1 b9, everything runs fine in the editor, but when I build and run, the executable just gets "stuck". No window, no crash (but UnityCrashHandler64.exe launches as well - what is this? Should this launch? There is absolutely nothing that I could find regarding this executable), no info, nowhere to start troubleshooting.

    Even more details -

    The offending Plugin dll is CSCore.dll. It is a C# audio library (https://github.com/filoe/cscore).

    Couple important things about CSCore.dll since I feel like it's a funky situation:
    1. I've built it in Visual Studio 2017 with a very small profile (basically .NET 3.5 Client Profile). It only has references to System, System.Core, System.Xml and System.Xml.Linq
    2. The CSCore project does some very strange / advanced MSIL replacement with a built-in build tool run during post-build in Visual Studio.
    3. Despite using this in many projects and having it work with .NET 2.0 Subset without an issue in the editor, I've always had to use the full .NET 2.0 compatibility level for builds in 2017.x.
    There is a minimal reproduction here:
    https://github.com/hallidev/UnityWASAPILoopbackAudio

    Steps to re-create:
    1. Open this project in 2017.2+
    2. Play some audio...any audio will do.
    3. Hit play in editor - you'll see visuals
    4. Build & Run with .NET 2.0 subset
    5. Player will crash
    6. Build & Run with .NET 2.0 full
    7. Everything should run fine
    8. Open project in 2018.1 b9
    9. Run in editor - no problems
    10. Build & Run with any configuration set - nothing happens, executable is "stuck" and has to be killed manually
    One other thing of note - I actually started this whole thing with 2018.1 b8, and instead of getting "stuck", the Player launched but I didn't get any audio data. No errors or crashes, just nothing. For all I know Unity was swallowing exceptions like mad, but I couldn't find any output. I tried upgrading to 2018.1 b9 as part of my troubleshooting, and it appears I've taken a step backward. Now the player doesn't even launch :)

    I've tried quite a bit more troubleshooting that I haven't really touched on here since it didn't get me anywhere, but I'd be happy to describe more.

    Thanks!
     
  2. LeonhardP

    LeonhardP

    Unity Technologies

    Joined:
    Jul 4, 2016
    Posts:
    3,106
    Hi,
    Could you please submit a bug report for this issue with the minimal reproduction case and possibly a hang dump attached to it and reply in here with the case #? You can find more information about how to report bugs here and here is a link with ways to collect crash dumps.
     
  3. hallidev

    hallidev

    Joined:
    Jan 21, 2017
    Posts:
    14
    The case # is 1008455 and I have attached the minimal repo project. I'm not familiar with the process of collecting a hang dump and it looks pretty involved. If for some reason you aren't able to re-create this I can give it a go.
     
  4. Tautvydas-Zilys

    Tautvydas-Zilys

    Unity Technologies

    Joined:
    Jul 25, 2013
    Posts:
    10,501
    You could attach VS debugger, hit pause and see where it gets stuck if you don't to wait for us to investigate (which will take at least few days for QA to pick up and reproduce). It's likely the plugin is deadlocking somewhere.
     
  5. hallidev

    hallidev

    Joined:
    Jan 21, 2017
    Posts:
    14
    I'm a bit confused - in the editor everything works fine. When you mention the pause button, are you speaking in relation to the standalone executable?

    If it would be simple to attach the debugger, I'm certainly curious how to do it.
     
  6. Tautvydas-Zilys

    Tautvydas-Zilys

    Unity Technologies

    Joined:
    Jul 25, 2013
    Posts:
    10,501
    I meant pause button in Visual Studio. To attach a debugger, open Visual Studio, go to Debug -> Attach to Process, find your built game, click attach, and then hit the pause button. Now, go to Debug -> Windows -> Parallel Stacks, and it should show you the state all the threads are in. You'll need to find Unity's main thread there as that's what drives execution.
     
    LeonhardP likes this.
  7. hallidev

    hallidev

    Joined:
    Jan 21, 2017
    Posts:
    14
    Awesome - thanks for the tip. I will give this a try
     
  8. hallidev

    hallidev

    Joined:
    Jan 21, 2017
    Posts:
    14
    So I'm able to attach to the process and pause, but Parallel Stacks and Call Stack show as completely empty. What's also interesting is that I can't resume. I just have to detach the debugger or terminate the process. There's no information available that I can find.

    This is with "Development Build", "Copy PDB Files" and "Script Debugging" all checked.
     
  9. Tautvydas-Zilys

    Tautvydas-Zilys

    Unity Technologies

    Joined:
    Jul 25, 2013
    Posts:
    10,501
    Can you show a screenshot?
     
  10. hallidev

    hallidev

    Joined:
    Jan 21, 2017
    Posts:
    14
    See attached.

    Notice that the debugger is attached to "Builds.exe" (just a test build name) and it's paused (Pause button greyed out). Continue is also greyed out while paused, and there is no info in the Parallel Stacks or Call Stack.
     

    Attached Files:

  11. Tautvydas-Zilys

    Tautvydas-Zilys

    Unity Technologies

    Joined:
    Jul 25, 2013
    Posts:
    10,501
    What's inside the output window in VS? When you attach the debugger, can you make sure that this is set to Native code?

    upload_2018-3-2_11-56-35.png
     
  12. hallidev

    hallidev

    Joined:
    Jan 21, 2017
    Posts:
    14
    See attachment - Automatic: Native code is set.

    This is the Output:

    'Builds.exe' (Win32): Loaded 'C:\Projects\Unity\UnityWASAPILoopbackAudio\Builds\Builds.exe'. Symbols loaded.
    'Builds.exe' (Win32): Loaded 'C:\Windows\System32\ntdll.dll'. Cannot find or open the PDB file.
    'Builds.exe' (Win32): Loaded 'C:\Windows\System32\kernel32.dll'. Cannot find or open the PDB file.
    'Builds.exe' (Win32): Loaded 'C:\Windows\System32\KernelBase.dll'. Cannot find or open the PDB file.
    'Builds.exe' (Win32): Loaded 'C:\Projects\Unity\UnityWASAPILoopbackAudio\Builds\UnityPlayer.dll'. Symbols loaded.
    'Builds.exe' (Win32): Loaded 'C:\Windows\System32\hid.dll'. Cannot find or open the PDB file.
    'Builds.exe' (Win32): Loaded 'C:\Windows\System32\msvcrt.dll'. Cannot find or open the PDB file.
    'Builds.exe' (Win32): Loaded 'C:\Windows\System32\user32.dll'. Cannot find or open the PDB file.
    'Builds.exe' (Win32): Loaded 'C:\Windows\System32\gdi32.dll'. Cannot find or open the PDB file.
    'Builds.exe' (Win32): Loaded 'C:\Windows\System32\lpk.dll'. Cannot find or open the PDB file.
    'Builds.exe' (Win32): Loaded 'C:\Windows\System32\usp10.dll'. Cannot find or open the PDB file.
    'Builds.exe' (Win32): Loaded 'C:\Windows\System32\version.dll'. Cannot find or open the PDB file.
    'Builds.exe' (Win32): Loaded 'C:\Windows\System32\ole32.dll'. Cannot find or open the PDB file.
    'Builds.exe' (Win32): Loaded 'C:\Windows\System32\rpcrt4.dll'. Cannot find or open the PDB file.
    'Builds.exe' (Win32): Loaded 'C:\Windows\System32\shlwapi.dll'. Cannot find or open the PDB file.
    'Builds.exe' (Win32): Loaded 'C:\Windows\System32\psapi.dll'. Cannot find or open the PDB file.
    'Builds.exe' (Win32): Loaded 'C:\Windows\System32\setupapi.dll'. Cannot find or open the PDB file.
    'Builds.exe' (Win32): Loaded 'C:\Windows\System32\cfgmgr32.dll'. Cannot find or open the PDB file.
    'Builds.exe' (Win32): Loaded 'C:\Windows\System32\advapi32.dll'. Cannot find or open the PDB file.
    'Builds.exe' (Win32): Loaded 'C:\Windows\System32\sechost.dll'. Cannot find or open the PDB file.
    'Builds.exe' (Win32): Loaded 'C:\Windows\System32\oleaut32.dll'. Cannot find or open the PDB file.
    'Builds.exe' (Win32): Loaded 'C:\Windows\System32\devobj.dll'. Cannot find or open the PDB file.
    'Builds.exe' (Win32): Loaded 'C:\Windows\System32\shell32.dll'. Cannot find or open the PDB file.
    'Builds.exe' (Win32): Loaded 'C:\Windows\System32\opengl32.dll'. Cannot find or open the PDB file.
    'Builds.exe' (Win32): Loaded 'C:\Windows\System32\glu32.dll'. Cannot find or open the PDB file.
    'Builds.exe' (Win32): Loaded 'C:\Windows\System32\ddraw.dll'. Cannot find or open the PDB file.
    'Builds.exe' (Win32): Loaded 'C:\Windows\System32\dciman32.dll'. Cannot find or open the PDB file.
    'Builds.exe' (Win32): Loaded 'C:\Windows\System32\dwmapi.dll'. Cannot find or open the PDB file.
    'Builds.exe' (Win32): Loaded 'C:\Windows\System32\winmm.dll'. Cannot find or open the PDB file.
    'Builds.exe' (Win32): Loaded 'C:\Windows\System32\ws2_32.dll'. Cannot find or open the PDB file.
    'Builds.exe' (Win32): Loaded 'C:\Windows\System32\nsi.dll'. Cannot find or open the PDB file.
    'Builds.exe' (Win32): Loaded 'C:\Windows\System32\imm32.dll'. Cannot find or open the PDB file.
    'Builds.exe' (Win32): Loaded 'C:\Windows\System32\msctf.dll'. Cannot find or open the PDB file.
    'Builds.exe' (Win32): Loaded 'C:\Windows\System32\dnsapi.dll'. Cannot find or open the PDB file.
    'Builds.exe' (Win32): Loaded 'C:\Windows\System32\IPHLPAPI.DLL'. Cannot find or open the PDB file.
    'Builds.exe' (Win32): Loaded 'C:\Windows\System32\winnsi.dll'. Cannot find or open the PDB file.
    'Builds.exe' (Win32): Loaded 'C:\Windows\System32\winhttp.dll'. Cannot find or open the PDB file.
    'Builds.exe' (Win32): Loaded 'C:\Windows\System32\webio.dll'. Cannot find or open the PDB file.
    'Builds.exe' (Win32): Loaded 'C:\PROGRA~2\Sophos\SOPHOS~1\SOPHOS~2.DLL'. Cannot find or open the PDB file.
    'Builds.exe' (Win32): Loaded 'C:\Windows\System32\api-ms-win-core-synch-l1-2-0.dll'. Cannot find or open the PDB file.
    'Builds.exe' (Win32): Loaded 'C:\Windows\System32\wintrust.dll'. Cannot find or open the PDB file.
    'Builds.exe' (Win32): Loaded 'C:\Windows\System32\crypt32.dll'. Cannot find or open the PDB file.
    'Builds.exe' (Win32): Loaded 'C:\Windows\System32\msasn1.dll'. Cannot find or open the PDB file.
    'Builds.exe' (Win32): Loaded 'C:\Windows\System32\imagehlp.dll'. Cannot find or open the PDB file.
    'Builds.exe' (Win32): Loaded 'C:\Windows\System32\cryptsp.dll'. Cannot find or open the PDB file.
    'Builds.exe' (Win32): Loaded 'C:\Windows\System32\rsaenh.dll'. Cannot find or open the PDB file.
    'Builds.exe' (Win32): Loaded 'C:\Windows\System32\cryptbase.dll'. Cannot find or open the PDB file.
     

    Attached Files: