Wayback Machinekoobas.hobune.stream
May JUN Jul
Previous capture 14 Next capture
2021 2022 2023
2 captures
13 Jun 22 - 14 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
0
Question by DeeCeptor · Apr 20 at 12:56 AM · crashmemorystandalonecrashingwindows 10

Windows Standalone crashing silently during scene switching

Hi. I've made a StandaloneWindows64 build of the game. It works completely fine in the editor, and the windows standalone build works with 99% of players, however a few are reporting it crashes when switching scenes.

Attached is the Player.log. Windows 10 Pro 64-bit The application just silently crashes/quits when going from my Splashscreen scene (which is a loading screen) to my main menu scene. It may happen during of an LoadSceneAsync operation or during an UnloadSceneAsync, but I'm not completely sure. I've since added some more Debug statements in a newer build to find out. Scene switching code below:

 IEnumerator Async_Load_Level()
     {
         UIManager.ui_manager.loading_icon.SetActive(true);
         UIManager.ui_manager.loading_text.gameObject.SetActive(true);
         string active_scene = UnityEngine.SceneManagement.SceneManager.GetActiveScene().name;
         DestroyImmediate(UnityEngine.EventSystems.EventSystem.current.gameObject);
 
         AsyncOperation AO = UnityEngine.SceneManagement.SceneManager.LoadSceneAsync(level_to_load);
         AO.allowSceneActivation = false;
         int progress = (int)(AO.progress * 100f);
         while (AO.progress < 0.9f)
         {
             progress = Mathf.Max(progress, (int)(AO.progress * 100f));
             UIManager.ui_manager.loading_text.text = progress + "%";
             yield return null;
         }
         AO.allowSceneActivation = true;
         while (AO.progress < 1f)
         {
             progress = Mathf.Max(progress, (int)(AO.progress * 100f));
             UIManager.ui_manager.loading_text.text = progress + "%";
             yield return null;
         }
         UIManager.ui_manager.loading_text.text = "100%";
         yield return 0;
         UIManager.ui_manager.loading_icon.SetActive(false);
         UIManager.ui_manager.loading_text.gameObject.SetActive(false);
 
         UnityEngine.SceneManagement.SceneManager.UnloadSceneAsync(active_scene);

}

link text I noticed the VRAM for this player is very low - 480mb. Could it be unable to allocate enough memory? This could explain why for most players it works, but for a few it doesn't.

EDIT: Solution has been found. After much trial and error, the game no longer crashes during our loading screen, even with steam running. The issue with the graphics driver DOES NOT OCCUR if the graphics API being used is OpenGL. Adding that as an graphics API option to the build, and adding this launch parameter: -force-glcore32 fixed the issue (though for this player's driver, it still didn't like some of the Standard Assets shaders for post-processing).

[1]: /storage/temp/195303-crash-2022-04-18-130509375.zip

crash-2022-04-18-130509375.zip (76.6 kB)
Comment
Add comment
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

2 Replies

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

Answer by DeeCeptor · Apr 22 at 11:47 PM

EDIT: Solution has been found. After much trial and error, the game no longer crashes during our loading screen, even with steam running. The issue with the graphics driver DOES NOT OCCUR if the graphics API being used is OpenGL. Adding that as an graphics API option to the build, and adding this launch parameter: -force-glcore32 fixed the issue (though for this player's driver, it still didn't like some of the Standard Assets shaders for post-processing).

Comment
Add comment · 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
0

Answer by rh_galaxy · Apr 20 at 11:12 PM

Since it works on some computers it might be as you say, that the memory is low, but here are two potential problems with your code.

Try

 while (!AO.isDone)

instead of

 while (AO.progress < 1f)

Try deleting

 UnityEngine.SceneManagement.SceneManager.UnloadSceneAsync(active_scene);

It shouldn't be necessary since LoadSceneAsync(level_to_load) makes the old scene unload automatically.

Comment
Add comment · Show 1 · 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 DeeCeptor · Apr 22 at 11:46 PM 0
Share

Thanks for the suggestion - that weird part of the code was actually to get around the issue in an earlier version where the progress never went higher than 0.9: https://forum.unity.com/threads/asyncoperation-always-returns-0-or-0-9-coroutine-only-resumes-at-0-9.538258/

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

152 People are following this question.

avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image

Related Questions

Mobil App crashes with Windows 10 0 Answers

Crashes inside playloop 0 Answers

CRASH when building for web 0 Answers

Editor Crashes when spawning 1k objects 2 Answers

Every time I try and put a stage I imported from Blender onto the workspace, Unity crashes. How can I fix this? 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