An abnormal situation has occurred: the PlayerLoop...

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

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?

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:

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.

1 Like

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.

Thanks for the help, it helped me! I do not know how it all works, but now the error does not come out!!

1 Like