I just had a web player crash on me when I closed the browser window; the only message printed to the log was “Failed browser download”.
It doesn’t seem to happen consistently with that player, so I’m still trying to track down the source of the crash. Anyone experienced this before, or have an idea what produces this error message?
Odd, that’s not an error I’ve ever heard of (or that I can recall right now), so:
Do you have a URL to share?
Mac? Win? Both?
Some browsers? All browsers? Which browsers?
Web player and Unity authoring versions?
Sorry, in the wake of no real info on my end I’m only left with questions…
Well, it occurred on Firefox 3 under OS X 10.5.6, using Unity 2.1.
When I can narrow down the problem to something regularly reproducible, I’ll post a build; until then, this was just a quick check to see if it was some kind of known issue.
If/when you do I’ve got that same configuration at the ready to help you test so just let me know!
Okay, this turned out to be a lot simpler than I was expecting. It’s something to do with calling the WWW class in OnApplicationQuit (which our player was doing, essentially, by accident, so I can work around it pretty easily).
When I build a scene containing one gameobject with the following script into a web player, it crashes Firefox when the tab is closed.
using UnityEngine;
using System.Collections;
public class Test : MonoBehaviour {
void OnApplicationQuit() {
StartCoroutine(Web());
}
IEnumerator Web() {
WWW test = new WWW("http://www.google.com");
yield return test;
Debug.Log(test.data);
}
}
I’ve attached an example web player, and I’ll submit a bug report shortly.
120349–4556–$fail_213.zip (6.44 KB)
Interesting, have you logged a bug on that yet? If so then thanks, if not I can do it if you don’t have time.
But to be clear, that’s accidental, right? There’s no reason to call the WWW class on app quit. If you’re trying to open a URL in the browser or something like that then the WWW class isn’t the way to go.
I’ve submitted that bug.
Yes, the particular case that brought this to my attention was accidental; we had some cleanup code that was too general-purpose for its own good (it’s also called at various points during the game, when that web request makes sense).