D3D9: attempt to lock null vertex buffer error

Hi, since updating to version 5.2 of unity from 5.1.1 I cant seem to change the games resolution mid game.

When it loads up it I had written in it to change the resolution to the last preference however this all of a sudden is breaking the game with the UI failing to load and the full screen game to appear all strange in the window and stretched.

All the error logs and say is this:

  • Completed reload, in 0.038 seconds
    desktop: 1920x1080 60Hz; virtual: 1920x1080 at 0,0
    Initializing input.

Input initialized.

Initialized touch support.

Platform assembly: C:\Users\Public\Videos\gamebuild\executiveassault_Data\Managed\System.dll (this message is harmless)
Platform assembly: C:\Users\Public\Videos\gamebuild\executiveassault_Data\Managed\UnityScript.Lang.dll (this message is harmless)
Platform assembly: C:\Users\Public\Videos\gamebuild\executiveassault_Data\Managed\Boo.Lang.dll (this message is harmless)
Setting up 2 worker threads for Enlighten.
Thread → id: 1248 → priority: 1
Thread → id: 1dcc → priority: 1
D3D9: attempt to lock null vertex buffer
D3D9: attempt to lock null vertex buffer
D3D9: attempt to lock null vertex buffer
D3D9: attempt to lock null vertex buffer
D3D9: attempt to lock null vertex buffer
etc

I took out of the script the resolution change at the beginning and now it works, however if anyone tries to change midgame it goes all strange again.

Just to repeat, this has started happening since updating from 5.1.1 to 5.2
Can anyone suggest a fix? I have already submitted this as an error to Unity.

Cheers
Rob

Just a quick note I’m getting the same error every frame. The game works perfect in the editor and worked perfect in 5.1. Now in 5.2 every frame I see the D3D9: attempt to lock null vertex buffer. I’m trying to hunt down whats causing this, I think it has something to do with a UI mouse, but its hard to say at this point. Any one else have any hints?

I’m having the same error. I think it could be related to this issue, so I think I will wait until 5.2.1 is out. The temporal workaround for me is to avoid calling Screen.SetResolution if it isn’t necessary.
Cheers.

Also having this problem in builds after switching from 5.1 to 5.2. In addition to a bunch of
D3D9: attempt to lock null vertex buffer error
messages in my output_log.txt, my uGUI HUD canvas stops rendering all together.

This is affecting us as well. We call Screen.SetResolution at launch.

Yeah, we’ve been getting multiple bug submits about this issue. You can track its progress in here: Unity Issue Tracker - [DX11] Full screen with low resolutions renders incorrectly

Hm, yeah, that issue was mentioned elsewhere. However, the issue is occurring for me on a Mac (not DX11), at high resolutions (2560x1600) and in windowed mode. That issue is currently marked as fixed, but almost every item in it is different from my experience. Not sure what to make of it! But thank you! :slight_smile:

This issue unfortunately still exists with p1. :frowning:

we’re running into this with 5.2.1f1, standalone 32-bit Windows 7

Is everyone seeing this error also seeing their UI disappear?

I still have the problem with 5.2.1p1 and status in the issue (722107) changed from Fixed to Active. I’m afraid we’ll have to wait…

Yeah, my UI also disappears as soon as I change resolutions or quality levels, sometimes reappearing most times not; should be noted it is for Unity 5.x related UI stuff, while the old UI runtime technique is still working. (I’m in the midst of a transition).

Nearly drop-kicked my machine thinking that I had messed something up in a script…

Hi @David_Kamunyu , I think it will be fixed in 5.2.2, check this issue:

Eagerly looking forward for that version :slight_smile:

1 Like

Its also fixed in 5.2.1p3

1 Like

You and me both!

Doesn’t seem to work with the 5.2.1 I have :frowning:

5.2.1p3 is the next patch release, out later this week.

1 Like

Oh yeah, “p” not “f”.

I really do miss the simple details :sweat_smile:

Well, here is looking forward to the patch :smile:

1 Like

I can confirm this has been fixed in the latest patch (works for me on 5.2.2p4)

2 Likes

We just got it in 5.3 for DX9 (see attach), and have same problems with DX11 (see bug report: https://fogbugz.unity3d.com/default.asp?775219_et0kdi42hu1lepev).

Found that unity saves resolutions to registry as 0x0 (see screenshot from our tester).

2534339–175953–crash.zip (91.9 KB)

Still happening in 5.6.3p3 (found this at the top of Google). Regression?

3244111–249484–log.txt (27.3 KB)