WebGL app cause Chrome crash (Unity 5.2.0f3)

I build game and try to run on chrome (Version 45.0.2454.85 m).
Chrome was crash after finish downloading and parsing js files.

I checked the Chrome crash log but there’s no logs!!

Anybody have any clue or known issue about this problem?

I can play in Unity Editor(Unity 5.2.0f3).
And, this game can be built and play with Unity 5.1.3f1 version.

That’s probably Chrome running out of memory while parsing the js. You could compare the size of the js between the two versions of Unity. Maybe 5.2.0f3 generates a bigger js. Is that Chrome 32bit ?

You can check whether Stripping is enabled and exceptions are disabled.

Marco! it is not “out of memory” problem.(chrome warns of it)

It is crash for me too.
In my app, there is 3 texture friends face.
If i connect to Facebook after loading game, all is fine,
but if i already Facebook connected , the chrome crash after loading ended.

My Facebook sdk version: 7.0.2

I will be pleased if you tell me, why loading take so long.

Edit: It’s probably also a problem of memory, it works after enlarged the memory…:slight_smile:

I am working on 5.2.0f3 and chrome crash if I reload the page.
First opening all works fine.

Any idea?

Grazie!
Stefano

Any error in the browser console ? (try in Development mode)
Are you able to reproduce it with an empty project ?

Happened to Me too.
This problem happened before when I used unity 5.2.0f1(beta), and now still exist.
I used 5.2.0f3 to build an empty project and a project just include a login to facebook(with facebook unity sdk 7.0.2), both of them worked very well.

Crash only happen when I build my old project.
And when I use “Build & Run”, it runs much better(only reload will pop a error).
But when I put the package to a server, and open with chrome, the chrome crashes.
By the way, when open the server url with mac & chrome, it work much better(can run, just seems not so stable, and windows & firefox also can run with not a stable status, only windows & chrome crash)

I’m having what appears to be the same trouble here and thought I’d toss in my 2c. My WebGL build was working fine in Unity 5.1, but now crashes in Chrome building with 5.2. I’ve changed nothing other than upgrading from one version of Unity to the other. (Still works fine in Unity Web Player, but that’s beating a dead horse at this point.)

It crashes without showing any specific information in the browser console. I’ve also noticed that the time it takes to crash varies a bit… Sometimes the game will load and run for 10 seconds or so before it crashes, other times it crashes before it finishes loading the first scene. No player interaction is required either, it just sits there for a few seconds, then dies and takes the entire browsing session with it.

I’m experimenting with doubling the allowed memory now, and will also try it with exceptions set to None and stripping turned off to see if I have any further luck. I’ll let ya know if anything good comes of it :slight_smile:

Does Firefox crash as well ?

Anyone who can submit a repro case and post the bug# here ?

Hi Marco,

I just reverted things back to where I’d had them (the above changes did nothing for me) and tried it again in both Firefox and Chrome. The WebGL build seems to work fine in Firefox, but still giving the “Google Chrome has stopped working” crash in Chrome without giving any details as to why in the browser console, or elsewhere for that matter. At least we’ve seemingly narrowed it down to Chrome, although for all I know Win10 is hosing something I’m not catching on to, haha.

I’ll try running a small project and see if I have the same issues. My current project’s a bit cumbersome to be submitting with a bug report & has a lot of backend ties. Testing a clean project may help me narrow it down a bit further & give me something cleaner to submit if I do have the same issues. Whatever happens, I’ll update and let ya know where things stand, along with a bug report number if I get to that point.

Thanks!

  • Ken

Update: Also tested and working fine in MS Edge, for what that’s worth. No luck as yet reproducing the issue in a smaller project. I’ll keep tinkering.

Update the 2nd: I also noticed that the game still seems to be running fine even during the crash event. What’s happening is, the game loads and sits a few seconds (at best), then another window pops open with an Error window in front of it telling me that “Chrome has stopped working”. If I close that window successfully before the original window behind it closes as well, I can see the game itself continuing on unaware of the impending browser crash. I’m not sure if this additional information helps any, but I thought I’d pass it along as well in case it were relevant.

For reference, I’m using Unity 5.2.0f3 Personal, Chrome 45.0.2454.85 m, and Windows 10 to create a Facebook Canvas game (SDK 7.0.2b) with GameSparks as a backend. If you’re interested in any WebGL settings on the project, I’m happy to share those as well. In the meantime, I’m off to try first clearing all data from Chrome, and then uninstalling & reinstalling it to see if that has any effect.

Curiouser and curiouser… I’m not sure it’ll help anyone else experiencing issues, but I completely cleared out my Chrome cache/cookies/etc/etc/etc and everything seemed to be working as expected again. “Hurray, I’m back on track at last,” or so I thought…

I tried refreshing the page to make sure it wasn’t just a fluke, and lo and behold, the browser crashed again. sigh I cleared Chrome out squeaky clean again, reloaded the game, and it worked again. So, of course, I tried reloading the game one more time, and as expected, watched it crash again.

I’ve tried it several times this way, and it always plays correctly if everything in Chrome has been wiped, and always crashes if the game has been played previously to being wiped out. Again, I’m not sure if this helps, but I thought it bore mentioning. I should also note that I’ve only had the chance to try it from one copy of Chrome, on a single computer. I’ll be testing it from a couple of other machines this evening & will post another update if I find any other peculiarities or possible solutions.

Actually, that’s interesting. I wonder if that’s related to IndexedDB. Do you use PlayerPrefs ? (which AFAIK should work in Chrome)

Same issues here: what works fine in Firefox crashes in Chrome. And in one instance Chrome doesn’t crash but memory just explodes (from 800 to 3gb+ in 2 seconds after which it crashes. Memory use stays on max 800mb in firefox.)

Sorry: haven’t got a good repro project that I can easily submit

1 Like

I am not using PlayerPrefs in my current project. All data is being stored on GameSparks.

I did some further testing on a couple of different machines with similar results. The game will run fine if Chrome’s data has been flushed, but crashes otherwise. I also kept an eye on system resources while running these tests and saw some odd behavior. If the game is being run for the first time after clearing out Chrome’s stored data, the game tops out at using about 1Gb of memory while loading and then falls back to a comfortable 145Mb. If the game is being run without having cleared out Chrome’s stored data, it uses upwards of 3Gb of RAM and then crashes (I’ve got 10Gb to work with on this machine and 4Gb on the two others I’ve tested with).

I’m not sure what other mad science to try performing, but if there’s anything you can think of for me to test, I’d be happy to give it a whirl. I hope the information is at least somewhat helpful. I’m not sure what you’d get out of it, but if you’re interested in examining the game itself, I’d be happy to add you to the FB beta tester’s list so you can check it out. Send me a PM for the details, if you’d like.

Thanks for all of your hard work on these various WebGL issues, Marco. It’s most certainly very much appreciated!

that’s definitely an odd behavior. random question: does your game uses asset bundles ?

I’ve been considering making use of them, but haven’t as yet, no.
One of these days perhaps I’ll learn to NOT update software just because I can, hahaha. Seems to always create new problems :stuck_out_tongue:

Thank you, Marco.

Yes, it seems to be Chrome running out of memory.
I saw Chrome consume memory more than 3GB!!! And then crash.
(I changed WebGL memory to 512. It can run for a while and then crash.)

As you mentioned about the file size, there are no different that much i think.
Unity 5.1.3f3: 28823 kb for *.js / 43427 kb for *.data
Unity 5.2.0f3: 28171 kb for *.js / 43744 kb for *.data

FYI, Unity 5.2 added some new documentation on memory usage, which may be relevant to this: Unity - Manual: Memory in Unity WebGL

2 Likes

@Marco-Trivellato
Ciao Marco,
sorry for the late answer but I was trying to build a scenario reproducible out of my project.
I found the problem and is related to uGUI canvas and is generated by Vectrosity library (a long story short: we use vectrosity with “screen space camera” instead of “screen space overlay” and this generate the problem).
Removing it all works fine, I will try to further go in deep.
Bye,
Stefano

my build crashes in chrome but works fine in firefox

I confirm that even with the latest 5.2.0p1.
As Krougeau said, I am crashing too with a new chrome window open then got a pop up telling: “Chrome has stopped working”. This bug weirdly gone when you go to factory reset and reset your chrome, but the problem reappear again after few time. My project use AssetBundle and also WWW to grab texture from web. Not sure if it linked with the problem but it is worth to mention.