Wayback Machinekoobas.hobune.stream
May JUN Jul
Previous capture 12 Next capture
2021 2022 2023
1 capture
12 Jun 22 - 12 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 jeff_unity101 · May 31, 2018 at 11:38 PM · webglscene-loadingmemory

Webgl crashes after Unity scene load memory cleanup

Unity: 2018.0.1f2
Browser: Happens in Chrome and Firefox, probably edge and safari but not tested yet.

When a new Unity scene loads in WebGL, Unity does some memory clean up. Most of my scenes load perfectly, pulled into the project using assetbundles.
The scene, avatars, seems to trigger a crash most of the time but I've seen the crash on other scenes as well.

Error code usually 160 but I've also had 163. I've tried verbose exceptions and nothing comes up. Makes me feel the error is internal to Unity after doing the memory clean up.

I do notice the scene shows a success load log
alt text
then several frames later shows the log for cleaning up the memory
alt text
After this log is alway were the crash happens.
I've tried:
loading scenes built into the project.

rebuilding the scene from a new scene.

adding more assets to the scene because most of these scenes are pretty light with controllers that load in additional assets after the scene loads.

re-written a bunch of code and inserted tons of logs to track this down. It always happens right after the memory clean up method no matter what is going on in between the scene load log and the Total: --ms log. I've also added a yield and waited for seconds after the scene loads to allow the memory to clear before continuing...

still can't crack it.

Any thoughts?

screen-shot-2018-05-31-at-84700-pm.png (65.1 kB)
screen-shot-2018-05-31-at-65112-pm.png (61.5 kB)
Comment
Add comment · Show 1
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 jeff_unity101 · Jun 01, 2018 at 12:02 AM 0
Share

Also, the crash happens less when the dev console is open in chrome. I really don't know why this would be the case...

and I don't believe the game actually crashes. I see other debug logs when focus is returned to the game. So code must be executing.

1 Reply

· Add your reply
  • Sort: 
avatar image
1

Answer by Bodin · Jul 30, 2020 at 08:46 AM

Hi, sorry for add reply in this old post. I just found similar problem and google lead me here. I can't find the solution any where. but at least, I managed to solved it. so I want to make a reply here.

in my case, DOTWEEN ( plug in for making tween animation : https://assetstore.unity.com/packages/tools/animation/dotween-hotween-v2-27676 ) is the problem.

normally it should kill itself after animation finish. but I noticed that, the crash will happen if I run dotween before changing the scene. eventhough the animation already finished before loading new scene, it crash in WebGL. (run normally in Editor)

I have to force kill all Dotween instance in scene with command DOTween.KillAll(); before changing scene. and the problem gone.

just want to chare some idea. may be some of your component cause the same problem.

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

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

92 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

Related Questions

How to optimize memory usage in webgl applications 0 Answers

Addressables & loading remote Scenes w WebGL 0 Answers

Deling with Loading Scenes [WebGL] 0 Answers

WebGL memory size in Player Settings? 2 Answers

WebGL Build Out of Memory Github Pages Not on Local Host 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