Search Unity

An abnormal situation has occurred: the PlayerLoop...

Discussion in 'Editor & General Support' started by andyz, Aug 5, 2019.

  1. andyz

    andyz

    Joined:
    Jan 5, 2010
    Posts:
    2,269
    Getting an issue with a Unity windows app often throwing an error after an external (file browser) has been run and control returns to the Unity app.
    The error sometimes comes up: "An abnormal situation has occurred: the PlayerLoop internal function has been called recursively. Please contact Customer Support..." It is in 2017 LTS
     
  2. andyz

    andyz

    Joined:
    Jan 5, 2010
    Posts:
    2,269
    This seems to be a Unity bug as happens with more than one asset store plugin that uses native windows dialogues. I do not have a minimal recreation yet though.
    I would like to know what could possibly cause such an internal error though?
     
  3. CanisLupus

    CanisLupus

    Joined:
    Jul 29, 2013
    Posts:
    427
    We are getting this exact same problem but on macOS builds, in Unity 2018.4 and Unity 2019.2.

    We are using StandaloneFileBrowser, which calls a native macOS file browser dialog. Either confirming or canceling the dialog causes the error:
     
    Last edited: Dec 11, 2019
  4. CanisLupus

    CanisLupus

    Joined:
    Jul 29, 2013
    Posts:
    427
    For the record, a possible workaround is to use the Async versions of the StandaloneFileBrowser calls, like StandaloneFileBrowser.SaveFilePanelAsync. This doesn't block Unity and seems to avoid the bug.

    EDIT: I also posted here about this bug in more detail.
     
    Last edited: Dec 11, 2019
    andyz likes this.
  5. ReneSchleese

    ReneSchleese

    Joined:
    Jul 11, 2017
    Posts:
    9
    This error just appeared in our application, built with Unity 2018.4.7f1 (development build)

    We could reproduce the issue consistently with these (odd) steps:
    1.) Use Debug.LogError() to log an error to the built-in development build console
    2.) Resize the app window
    3.) Press the "Open log file" button of the built-in development build console

    Tested only in our application. Did not test whether these steps are enough to cause the error in a minimalistic Unity project.
     
  6. serg7630

    serg7630

    Joined:
    Sep 10, 2021
    Posts:
    1
    Thanks for the help, it helped me! I do not know how it all works, but now the error does not come out!!
     
    CanisLupus likes this.