Wayback Machinekoobas.hobune.stream
May JUN Jul
Previous capture 13 Next capture
2021 2022 2023
1 capture
13 Jun 22 - 13 Jun 22
sparklines
Close Help
  • Products
  • Solutions
  • Made with Unity
  • Learning
  • Support & Services
  • Community
  • Asset Store
  • Get Unity

UNITY ACCOUNT

You need a Unity Account to shop in the Online and Asset Stores, participate in the Unity Community and manage your license portfolio. Login Create account
  • Blog
  • Forums
  • Answers
  • Evangelists
  • User Groups
  • Beta Program
  • Advisory Panel

Navigation

  • Home
  • Products
  • Solutions
  • Made with Unity
  • Learning
  • Support & Services
  • Community
    • Blog
    • Forums
    • Answers
    • Evangelists
    • User Groups
    • Beta Program
    • Advisory Panel

Unity account

You need a Unity Account to shop in the Online and Asset Stores, participate in the Unity Community and manage your license portfolio. Login Create account

Language

  • Chinese
  • Spanish
  • Japanese
  • Korean
  • Portuguese
  • Ask a question
  • Spaces
    • Default
    • Help Room
    • META
    • Moderators
    • Topics
    • Questions
    • Users
    • Badges
  • Home /
avatar image
1
Question by Rasmus Schlnsen · Sep 23, 2010 at 09:25 AM · bugcrashthreading

Crash on Application.Quit() in standalone mode after closing window

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!

Version=1

EventType=APPCRASH

EventTime=129297066013216220

ReportType=2

Consent=1

UploadTime=129297066013746250

ReportIdentifier=57dfad64-c6f2-11df-b1c1-002564d4f6ee

IntegratorReportIdentifier=57dfad63-c6f2-11df-b1c1-002564d4f6ee

WOW64=1

Response.type=4

Sig[0].Name=Programnavn

Sig[0].Value=ValveStandAlone.exe

Sig[1].Name=Programversion

Sig[1].Value=2.6.1.31223

Sig[2].Name=Tidsstempel for program

Sig[2].Value=4b13e2cb

Sig[3].Name=Fejlmodulnavn

Sig[3].Value=ntdll.dll

Sig[4].Name=Fejlmodulversion

Sig[4].Value=6.1.7600.16559

Sig[5].Name=Tidsstempel for fejlmodul

Sig[5].Value=4ba9b29c

Sig[6].Name=Undtagelseskode

Sig[6].Value=c0000005

Sig[7].Name=Undtagelsesforskydning

Sig[7].Value=00038c19

DynamicSig[1].Name=OS-version

DynamicSig[1].Value=6.1.7600.2.0.0.768.3

DynamicSig[2].Name=Landestandard-id

DynamicSig[2].Value=1030

UI[2]=C:\Program Files (x86)\3dValve\ValveStandAlone.exe

UI[3]=ValveStandAlone.exe er holdt op med at fungere

UI[4]=Windows kan sge online efter en lsning p problemet.

UI[5]=Sg efter en lsning p internettet, og luk programmet

UI[6]=Sg online efter en lsning senere, og luk programmet

UI[7]=Luk programmet

LoadedModule[0]=C:\Program Files (x86)\3dValve\ValveStandAlone.exe

LoadedModule[1]=C:\Windows\SysWOW64\ntdll.dll

LoadedModule[2]=C:\Windows\syswow64\kernel32.dll

LoadedModule[3]=C:\Windows\syswow64\KERNELBASE.dll

LoadedModule[4]=C:\Windows\syswow64\USER32.dll

LoadedModule[5]=C:\Windows\syswow64\GDI32.dll

LoadedModule[6]=C:\Windows\syswow64\LPK.dll

LoadedModule[7]=C:\Windows\syswow64\USP10.dll

LoadedModule[8]=C:\Windows\syswow64\msvcrt.dll

LoadedModule[9]=C:\Windows\syswow64\ADVAPI32.dll

LoadedModule[10]=C:\Windows\SysWOW64\sechost.dll

LoadedModule[11]=C:\Windows\syswow64\RPCRT4.dll

LoadedModule[12]=C:\Windows\syswow64\SspiCli.dll

LoadedModule[13]=C:\Windows\syswow64\CRYPTBASE.dll

LoadedModule[14]=C:\Windows\syswow64\SHELL32.dll

LoadedModule[15]=C:\Windows\syswow64\SHLWAPI.dll

LoadedModule[16]=C:\Windows\syswow64\ole32.dll

LoadedModule[17]=C:\Windows\system32\VERSION.dll

LoadedModule[18]=C:\Windows\system32\OPENGL32.dll

LoadedModule[19]=C:\Windows\system32\GLU32.dll

LoadedModule[20]=C:\Windows\system32\DDRAW.dll

LoadedModule[21]=C:\Windows\system32\DCIMAN32.dll

LoadedModule[22]=C:\Windows\syswow64\SETUPAPI.dll

LoadedModule[23]=C:\Windows\syswow64\CFGMGR32.dll

LoadedModule[24]=C:\Windows\syswow64\OLEAUT32.dll

LoadedModule[25]=C:\Windows\syswow64\DEVOBJ.dll

LoadedModule[26]=C:\Windows\system32\dwmapi.dll

LoadedModule[27]=C:\Windows\system32\WINMM.dll

LoadedModule[28]=C:\Windows\syswow64\WS2_32.dll

LoadedModule[29]=C:\Windows\syswow64\NSI.dll

LoadedModule[30]=C:\Windows\system32\DINPUT.dll

LoadedModule[31]=C:\Windows\system32\MSACM32.dll

LoadedModule[32]=C:\Windows\system32\apphelp.dll

LoadedModule[33]=C:\Windows\AppPatch\AcXtrnal.DLL

LoadedModule[34]=C:\Windows\system32\IMM32.DLL

LoadedModule[35]=C:\Windows\syswow64\MSCTF.dll

LoadedModule[36]=C:\Windows\system32\uxtheme.dll

LoadedModule[37]=C:\Windows\syswow64\CLBCatQ.DLL

LoadedModule[38]=C:\Windows\system32\wbem\wbemprox.dll

LoadedModule[39]=C:\Windows\system32\wbemcomn.dll

LoadedModule[40]=C:\Windows\system32\CRYPTSP.dll

LoadedModule[41]=C:\Windows\system32\rsaenh.dll

LoadedModule[42]=C:\Windows\system32\RpcRtRemote.dll

LoadedModule[43]=C:\Windows\system32\wbem\wbemsvc.dll

LoadedModule[44]=C:\Windows\system32\wbem\fastprox.dll

LoadedModule[45]=C:\Windows\system32\NTDSAPI.dll

LoadedModule[46]=C:\Windows\WinSxS\x86_microsoft.windows.common-controls_6595b64144ccf1df_6.0.7600.16385_none_421189da2b7fabfc\comctl32.dll

LoadedModule[47]=C:\Windows\syswow64\WINTRUST.dll

LoadedModule[48]=C:\Windows\syswow64\CRYPT32.dll

LoadedModule[49]=C:\Windows\syswow64\MSASN1.dll

LoadedModule[50]=C:\Windows\System32\MMDevApi.dll

LoadedModule[51]=C:\Windows\System32\PROPSYS.dll

LoadedModule[52]=C:\Windows\system32\wdmaud.drv

LoadedModule[53]=C:\Windows\system32\ksuser.dll

LoadedModule[54]=C:\Windows\system32\AVRT.dll

LoadedModule[55]=C:\Windows\system32\AUDIOSES.DLL

LoadedModule[56]=C:\Windows\system32\msacm32.drv

LoadedModule[57]=C:\Windows\system32\midimap.dll

FriendlyEventName=Handlingen blev afbrudt

ConsentKey=APPCRASH

AppName=ValveStandAlone.exe

AppPath=C:\Program Files (x86)\3dValve\ValveStandAlone.exe

Comment
Add comment · Show 2
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users
avatar image Jesse Anders · Sep 23, 2010 at 10:03 AM 0
Share

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.)

avatar image Rasmus Schlnsen · Sep 23, 2010 at 02:38 PM 0
Share

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 ter$$anonymous$$ated.

1 Reply

· Add your reply
  • Sort: 
avatar image
3
Best Answer

Answer by Rasmus Schlnsen · Sep 25, 2010 at 03:17 PM

This is really not a proper answer but it keeps the errors away.

Instead of using

Application.Quit();

... I use this crummy hack

System.Diagnostics.Process.GetCurrentProcess().Kill();

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.

Comment
Add comment · Show 4 · Share
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users
avatar image Rasmus Schlnsen · Sep 28, 2010 at 09:15 PM 0
Share

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...

avatar image Ray-Pendergraph · Aug 25, 2011 at 02:59 PM 0
Share

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 see$$anonymous$$gly part of core functionality (exiting the game). Actually this bug seems to be specific to the Windows standalone player. On the $$anonymous$$ac 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.

avatar image FiveFingers · May 18, 2013 at 05:29 PM 1
Share

Be carefull this hack will work ith the Editor, which means, that it will force Unity shutdown at once(save your stuff!)

avatar image Tanoshimi2000 · Jul 14, 2014 at 08:51 PM 3
Share

if (!Application.isEditor) System.Diagnostics.Process.GetCurrentProcess().$$anonymous$$ill();

Your answer

Hint: You can notify a user about this post by typing @username

Up to 2 attachments (including images) can be used with a maximum of 524.3 kB each and 1.0 MB total.

Follow this Question

Answers Answers and Comments

4 People are following this question.

avatar image avatar image avatar image avatar image

Related Questions

Hunting for gamecrashing bug, does disabling game objects and scripts mean they don't affect the game anymore? 1 Answer

Are coroutines freezing my game? 0 Answers

How do I report a bug in Unity? 2 Answers

Unity freezes up completely without explanation 1 Answer

Unable to open existing project after crash 0 Answers


Enterprise
Social Q&A

Social
Subscribe on YouTube social-youtube Follow on LinkedIn social-linkedin Follow on Twitter social-twitter Follow on Facebook social-facebook Follow on Instagram social-instagram

Footer

  • Purchase
    • Products
    • Subscription
    • Asset Store
    • Unity Gear
    • Resellers
  • Education
    • Students
    • Educators
    • Certification
    • Learn
    • Center of Excellence
  • Download
    • Unity
    • Beta Program
  • Unity Labs
    • Labs
    • Publications
  • Resources
    • Learn platform
    • Community
    • Documentation
    • Unity QA
    • FAQ
    • Services Status
    • Connect
  • About Unity
    • About Us
    • Blog
    • Events
    • Careers
    • Contact
    • Press
    • Partners
    • Affiliates
    • Security
Copyright © 2020 Unity Technologies
  • Legal
  • Privacy Policy
  • Cookies
  • Do Not Sell My Personal Information
  • Cookies Settings
"Unity", Unity logos, and other Unity trademarks are trademarks or registered trademarks of Unity Technologies or its affiliates in the U.S. and elsewhere (more info here). Other names or brands are trademarks of their respective owners.
  • Anonymous
  • Sign in
  • Create
  • Ask a question
  • Spaces
  • Default
  • Help Room
  • META
  • Moderators
  • Explore
  • Topics
  • Questions
  • Users
  • Badges