Failed to switch resolution

Hi everybody,

we’re experiencing the following errors when switching scenes in a Windows Store app:

ResizeBuffers failed with error 0x887a0005
(Filename:  Line: 340)

Failed to switch resolution to 1600 x 900
(Filename:  Line: 38)

s_SwapChain->GetBuffer failed with error 0x887a0001
(Filename:  Line: 345)

Failed to switch resolution to 1600 x 900
(Filename:  Line: 38)

s_SwapChain->GetBuffer failed with error 0x887a0001
(Filename:  Line: 345)

Failed to switch resolution to 1600 x 900
(Filename:  Line: 38)

Changing the scene is done by starting the following co-routine:

        private IEnumerator ChangeSceneWithLoadingScreen(string scene)
        {
            GameObject loadingScreen = null;

            if (this.LoadingScreenPrefab != null)
            {
                // Show loading screen.
                loadingScreen = (GameObject)Instantiate(this.LoadingScreenPrefab);
                yield return new WaitForEndOfFrame();
            }
            else
            {
                Debug.LogWarning("No loading screen set, user might experience non-reactive UI.");
            }

            // Load level.
            Application.LoadLevel(scene);

            if (loadingScreen != null)
            {
                // Hide loading screen.
                Destroy(loadingScreen);
            }
        }

Everything runs fine from within the editor. However, building the Windows Store player, opening the generated solution in Visual Studio, deploying the app (Master/x86) and starting the app causes the following symptoms:

  1. Loading screen is properly being shown.
  2. Loading screen is hidden after scene is loaded.
  3. Log indicates that the scene has been successfully loaded (e.g. enemies are spawned, health values are properly initialized etc.)
  4. The screen remains black after the scene is loaded.

We are running Unity 4.3.2f1, as more recent Unity versions showed errors when building the player due to missing methods in the updated Metro dlls.

Dxdiag attached. Does anyone experience similar issues?

1593657–95798–$DxDiag.zip (16.6 KB)

Looks like a bug. Before reporting it, acouple things to check:

Do you have independent input source of low latency presentation API enabled? Tried disabling them?

Can you be more specific on this? I don’t remember anything being removed after 4.3.2.

Unfortunately, that didn’t resolve the issue.

Unity has introduced new implementations for some .NET classes in Unity 4.3.3, in the course breaking some of the existing reflections functionality:

http://unity3d.com/unity/whats-new/unity-4.3.3
http://forum.unity3d.com/threads/223065-Unity-4-3-3-Type-GetMembers(BindingFlags)-crash

Concerning the original problem: We’re suspecting some newly introduced shaders (which are working fine on Android). I’ll keep you posted.

These problem seem to affect only Windows Phone. Are you woking on both?

Actually, no. That bug’s affecting Windows Store as well. But that’s not the original point.

We finally isolated the issue and tracked it down to a single

Screen.fullScreen = true;

I filed at bug report at http://fogbugz.unity3d.com/default.asp?602651_6irgadrg5356jm6d

Changing resolution to full screen is not supported in 4.3. It will be supported in 4.5.