Search Unity

Application build for windows after kept open for more than 30 minutes freeze when tried to close

Discussion in 'Windows' started by paragyogi, Aug 9, 2019.

  1. paragyogi

    paragyogi

    Joined:
    Oct 4, 2018
    Posts:
    15
    When the user tries to close the unity application build for windows after kept open for more than 30 minutes the application hang/freeze
    Can some one please support on this issue
     
  2. timke

    timke

    Unity Technologies

    Joined:
    Nov 30, 2017
    Posts:
    82
    We need some more information:

    What version of Unity are you using?
    When you say "build for windows" what exactly are you doing? Are creating a for Windows Standalone build or are you creating a build on Windows or both?
    Does the Editor hang/freeze after or while your project is building or just whenever you leave the Build Window open? That is, if you open the Build Window but do not build your project (just leave it idle), does the Editor still freeze?

    Please also provide any other information that might be relevant, for example you have two instances of the Editor open at the same time or you have plugins/tools that are used to build your project.
     
  3. paragyogi

    paragyogi

    Joined:
    Oct 4, 2018
    Posts:
    15
    Sorry for not providing complete details while submitting the issue
    Below are details
    1. Unity Version I am Using: 2018.3.0f2
    2. I am creating Windows Standalone Build
    3. My editor is not freezing
    4. My windows standalone build is freezing at user end also on my PC when trying to close the application after kept open for approx 30 minutes
    Screen SHot attached :
    a. I started the application at 11:37 AM
    b. at 11:11 AM I tried to close it and it freezed
    The issue happens only for closing application. If I try to work on it without choosing close it will work
     

    Attached Files:

  4. timke

    timke

    Unity Technologies

    Joined:
    Nov 30, 2017
    Posts:
    82
    Thanks for the extra information and clarifying the problem.

    Basically, the issue is you app is getting stuck in an infinite loop, which prevents the message pump from running causing it to stop responding to Windows. This will require some debugging to determine were the problem is.

    If you'd like to try and debug it yourself, please reference the Window Debugging page from the Unity docs: https://docs.unity3d.com/Manual/WindowsDebugging.html
    Or you can try and debug it using the Unity Debugger plugin for Visual Studio:
    https://docs.microsoft.com/en-us/vi...ng-visual-studio-tools-for-unity?view=vs-2019

    Otherwise, please see if it repros on a 2018 LTS release (Long Term Support); currently this is 2018.4.6f1:
    https://unity3d.com/unity/qa/lts-releases
    Please build and run your project on this 2018 Unity release (be sure to backup your project) and see if it still hangs. If so, then please file a bug using your project.
     
    paragyogi likes this.
  5. paragyogi

    paragyogi

    Joined:
    Oct 4, 2018
    Posts:
    15
    Hi Sorry for the delay in reply (took little time in installing and testing)
    I have downloaded 2018.4 LTS
    Frequency of freezing is reduced drastically but still some times it is freezing
    This is happening only with Windows build from Mac, Android, IOS is having no issue of freezing even with earlier version while close
     
  6. timke

    timke

    Unity Technologies

    Joined:
    Nov 30, 2017
    Posts:
    82
    Thanks for the update

    This probably means there's a race-condition somewhere in your project, which is triggering an infinite loop on the game thread. It could be a Unity bug or maybe a bug in some other plugin or asset. However, without a callstack, crash dump, or some addition debug info I can't say what it could be.

    If you could post a callstack of the "game loop" thread after the app has hung, it might provide a clue to the problem. However, at this point I'd recommend just filing a bug for your project, which will allow QA to perform some basic debugging.
     
  7. paragyogi

    paragyogi

    Joined:
    Oct 4, 2018
    Posts:
    15
    Hi Attached log file
     

    Attached Files:

  8. timke

    timke

    Unity Technologies

    Joined:
    Nov 30, 2017
    Posts:
    82
    A log file isn't enough, we need to see a native stack trace (better yet a crash dump) at the point the app is hung, to see which section of code is stuck.

    If you don't know how to perform native debugging or create a crash dump, then please file a Unity bug for your project. Our QA team can attempt to debug the project and determine if there is a Unity issue or not, or if it's not a Unity bug help identify the actual problem.

    The only comment I can make from the log is that the (new) Input System is being initialized, which is controlled by the "Active Input Handling" setting under Player Settings->Other Settings. By default new Input System is disabled; the "old" InputManager is selected in the drop-down box.

    Are you actually using New Input or using a plugin/asset that requires New Input? It might not have anything to do with this issue, but since New Input is still a preview feature, don't enable it unless you actually need to.
     
  9. JeffDUnity3D

    JeffDUnity3D

    Unity Technologies

    Joined:
    May 2, 2017
    Posts:
    5,526
    Compare to a new/empty project, and go from there.
     
  10. paragyogi

    paragyogi

    Joined:
    Oct 4, 2018
    Posts:
    15
    Hi Team
    I got the root cause
    After installing 2018 LTS I mentioned earlier issue frequency drastically reduced
    Actually it is 0 the issue I am facing of freezing only with an instance where the app is in dropbox shared folder
    Can anyone suggest how to resolve it or it has to be in different folder for each user
     
  11. JeffDUnity3D

    JeffDUnity3D

    Unity Technologies

    Joined:
    May 2, 2017
    Posts:
    5,526
    Generally you should not be running a game over the network or from a remote folder. Does it work when you test with a different folder for each user?
     
  12. paragyogi

    paragyogi

    Joined:
    Oct 4, 2018
    Posts:
    15
    Yes there is no issue in separate folder
     
  13. JeffDUnity3D

    JeffDUnity3D

    Unity Technologies

    Joined:
    May 2, 2017
    Posts:
    5,526
    Glad you figured it out.