|
I have a problem with a unity 2.6 application I have been working on for the last month. When I exit the app (With Application.Quit()) the application closes but (sometimes) I get and Exception when I return to windows complaining about crash. I've used BackgroundWorker class for threading in my app and i suspect this to be the problem, but again since the randomness of this exception I doubt that this is the problem? During development I have switched between a trial pro version and a free version of unity3d. When I build with pro I get the standard 'trial version' in the right bottom corner. When switching to the free version of unity 2.6 and building I don't get the unity3d logo popping in which also seems strange to me. I haven't included the pro assets in my project in because of the switching between free and pro versions. Is it me properly missing something while using threading Is this a bug in the unity3d or is it properly me missing something I'm also calling Dispose() on my backgroundworker after it has completed the job. I have tried calling GC.Collect() explicitly to ensure deallocation of the backgroundworker. I also use Itween alot which I don't really now the stability of. Below is the error code from Windows EventViewer which wasn't to much help to me. Hope you can help me!
(comments are locked)
|
|
This is really not a proper answer but it keeps the errors away. Instead of using
... I use this crummy hack
resulting in no errors on exit time. I'm still looking into what is causing the errors on exit time, but this hack will do the job if you are in a hurry. The release of Unity 3 have solved my problem, and I can now use Application.Quit() as normal without any errors. Still curious about what caused the exception though...
Sep 28 '10 at 09:15 PM
Rasmus Schlnsen
This hack to have fixed our problem as well. I know this is an old thread but apparently still relevant. This issue has been around a long time to be so seemingly part of core functionality (exiting the game). Actually this bug seems to be specific to the Windows standalone player. On the Mac it barfs all sorts of nasty stuff to the log after exit is called but it finally does exit with no crash. On Windows it just takes a dump and sometimes freezes the application.
Aug 25 '11 at 02:59 PM
raypendergraph
(comments are locked)
|
|
Be carefull this hack will work ith the Editor, which means, that it will force Unity shutdown at once(save your stuff!)
(comments are locked)
|

I've also observed my standalones crashing on shutdown (Alt-F4) occasionally in Windows XP. However, you've already investigated it further than I have, so I don't have much else to offer. (So far, I haven't been able to figure out how to reproduce the behavior consistently.)
I have found a temporal solution where I use the .Net Process kill() function to shutdown my application (process) in standalone mode. This shuts it down without givin the user error messages after the application is terminated.