For years now, we’ve had a system where we launch a Unity Web Player at a 0 width to essentially be “hidden” and serve 3D imagery via JavaScript calls.
Last week, I installed the latest Web Player and it started crashing on startup with a “Couldn’t switch to requested monitor resolution.” Imgur: The magic of the Internet
(by the way, in the image, the GUI visible is not Unity; it’s a separate application on the same web page. The Unity Web Player instance is beside it on the right side but at 0 width, so you can’t see it.)
This results in a fatal crash of the web browser itself. This is reproduced on IE, Firefox, and Chrome. IE restarts itself, Firefox and Chrome report that the Unity Plugin became unresponsive and lets me stop it.
The key error in the Web Player log appears to be:
I’ve reproduced the issue on:
Windows 8.1 Update 1 64 bit (“Computer A”)
- IE 11.0.9600.17351 (Update Versions: 11.0.13)
- Firefox 33.1
- Chrome 38.0.2125.11 and 38.0.2125.122
Windows 7 Service Pack 1 64 bit (“Computer B”)
- IE 11.0.9600.17126 (Update Versions: 11.0.9)
- Firefox 29
On both computers, I had an older, working version of the Unity Web Player (I wish I had recorded the version, but I did not) which was working fine. I then uninstalled the web player, and installed the latest 4.5.5f1 which then exhibited the failure.
Two other computers here (both running Windows 7 64bit), one running 4.3.5f1 and the other running 4.5.0f6 are both functioning fine.
On the failing computers, if I launch the Web Player at a non-zero width (so 1 pixel wide or more), it works fine. After initialized, I can then collapse the player to 0 width without any errors. It only happens during initialization/loading.
I have also reproduced this error by creating a new, blank Unity3D project (in Unity 3.5.7f6) and using it in my system instead so it’s not any of the code in my normal Unity project.
On Failing Computer A running Web Player 4.5.5f1:
- Fail at 0 width: Failing Test (Computer A) at 0 width - Pastebin.com
- Pass at non-zero width: Passing Test (Computer A) at non-zero width - Pastebin.com
On Failing Computer B running Web Player 4.5.5f1:
- Fail at 0 width: Failing Test (Computer B) at 0 width - Pastebin.com
- Pass at non-zero width: Passing Test (Computer B) at non-zero width - Pastebin.com
On Passing Computer C running Web Player 4.3.5f1:
-
Pass at 0 width: Passing Test (Computer C) at 0 width - Pastebin.com
-
Pass at non-zero width: Passing Test (Computer C) at non-zero width - Pastebin.com
On Passing Computer D running Web Player 4.5.0.f6:
- Pass at 0 width: Passing Test (Computer D) at 0 width - Pastebin.com
- Pass at non-zero width: Passing Test (Computer D) at non-zero width - Pastebin.com
One major difference I can pick up on is that the passing computers (running Web Player versions 4.3.5f1 and 4.5.0.f6) are both using engine version 4.3.7f1. The failing computers are both using engine 4.5.5f1.
I’ve also updated the drivers on failing “Computer A” to the latest and am still producing the same fatal error.
I’d like to do tests on different engines and web players between these versions, but I can’t find links to download old versions of the web player. Does anyone know where I can get these slightly older versions to test with? Thanks.
Unity team, I appreciate your time looking into this. I hope you can provide a response that you’re investigating it soon (so I can pass that notice onto my managers). Please let me know if there is any additional information or diagnostic information you would like and I’ll be happy to get it for you. Thanks!