Search Issue Tracker
Fixed in 4.6.4
Votes
1
Found in
3.5.7f6
Issue ID
647488
Regression
Yes
plugin crash on initialization at 0 width
-e: Unity Web Player is initialized in a div that has 0 width. In IE, Firefox, and Chrome, this results in a "Couldn't switch to requested monitor" (see attached "Error.png")
In the Web Player logs, the key line (I think) regarding the error is:
"D3D device reset failed [E_INVALIDARG]
(Filename: Line: 357)
Switching to resolution 0x0 failed, trying lower one
All resolution switches have failed
Screen: could not switch resolution (0x0 fs=0 hz=59)"
Some passing and failing logs are in the "Logs" directory.
If the application is started with a non-zero width, and then subsequently changed to zero (via JavaScript), Unity does NOT crash. Only if it's initially initialized in a 0 width container does it crash.
2) How can we reproduce it using the example you attached
Open the "zero.html" file in the attached project. (make sure the Unity plugin is not blocked by the browser)
I've boiled it down to a minimum reproduceable example. It appears that using the old UnityObject.js (that gets used with the normal Unity 3.5.7 build) has it fail siliently. (it just shows the "Install Unity" button as though you don't have it installed) Using UnityObject2.js will cause the failure.
"ten.html" is the same file, but instead of a 0 pixel container, it has a 10 pixel container.
All about bugs
View bugs we have successfully reproduced, and vote for the bugs you want to see fixed most urgently.
Latest issues
- "SupportsRandomWriteOnRenderTextureFormat()" shows "False" when executed on 2023.2 and 6000.0 streams
- Size of ShadowCaster2D with Casting Source set to a Collider increases when RigidBody2D is attached to the GameObject
- GameObjects with a material derived from a Custom Lighting Surface Shader are displayed as skewed on quads when the Camera's Width and Height properties of the Viewport Rect are lower than 1
- Warning 'Unable to find player assmebly' is thrown when building some Project Templates
- ArgumentOutOfRangeException when manipulating the Project Settings search bar
Add comment