OnApplicationQuit randomly???? Crash please help. :(

EDIT: My code is not open source, I fixed this so you will not be able to access my code from now on. (Sorry for bad english)
If you have a similar error just:

  1. Press Ctrl + F on your project.
  2. Search “OnApplicationQuit();”
  3. If you called that function, delete that line and test the proyect.
  4. If project works, well you already know where the error came from. If it don’t works… I would open a new thread as you.

------------------------------------------------------------------------------------------------------------------------
I have a server, and it runs very well, but when somebody Log In in the server and the client log in sucessful, appears the Setting up 6 worker threads for Enlighten. thing and it crash…
(The server works with a MySQL database)

I have tried everything, I have the error for several days and I cannot continue with my project. I have looked to the code several times, but i don’t found anything :frowning:
I don’t like to put my code on unity but i must do it, if not, you won’t be able to resolve or anything.

The code is on attached Files.
You can build it on a new project. When I start it and a client connects and Log in, this is the result (I ran the server with a .bat):

Thanks for reading, and sorry for bad english. The debug logs and those things are on spanish, sorry.

I can’t download the MySQLScript because Avast antivirus…
Here is the code:

Sorry but my code is not open source.

OnApplicationQuit isn’t being called “randomly”. You’re calling Application.Quit() on line 543.

I’m sorry for taking so long to respond.

… Im very idiot because I created that function to know about internal errors, but for some reason it don’t work very well, because it dont logs the things it should log.

So now the server don’t close because I removed that. I need to fix some things of the code.

A lot of thanks :slight_smile: