We have a very nasty bug that only pops up from time to time. Sometimes already after 5 minutes sometimes it takes an hour in play. What happens is that the canvas just stops rendering. Colliders still behave normally but the canvas is just not displayed anymore both in scene and game view.
If I create a new panel during play mode when this issue occurs the panel is not visible despite being in the top hierarchy.
Duplicating the canvas and deleting the old one will “solve” this issue. The canvas behaves normally from that point. We also noticed that if we duplicate the canvas while not in play mode the issue won’t occur for quite some time.
Changing any kind of settings of the canvas will do nothing.
Today I found out there is an error related to this issue buried in the log file:
d3d11: failed to create vertex buffer of size -1920 [0x8007000E]
d3d11: failed to create index buffer of size -96 [0x8007000E]
d3d11: attempt to lock null vertex buffer
d3d11: attempt to lock null index buffer
…
Searching for those errors return a couple of similar issues which seem to be a year old and all the related tickets seem to be fixed.
Hi, @amokk_gw We’re experiencing the same issue on Unity 5.5.0 f3 .
The problem happens after changing a scene, with one of the camera canvases, while others (camera, screeen and world are working fine).
We are unable to report a bug to Unity exactly for the same reason: this bug happens rarely in the PC Editor and pretty often in both Standalone and Facebook Gameroom builds. It can’t be reproduced 100% so far.
Sometimes (strangely) when we get this bug in the Editor, clicking on the Camera in the Hierarchy fixes the problem, but it’s not a solution at all…
I also noticed , that adding a nested Canvas in the hierarchy of the broken one (after encountering this bug in Editor) fixes the problem, but I don’t know how to be totally sure that it will work on release builds.
I think I’m running into the same thing, but it is 100% reproducible in my case.
I have a UI object that disappears when it is attached to a horizontal layout. It animates to that position (assigned to a different parent while animating), so it is visible until it gets there, and then it disappears on arrival. The position on the object is correct, because it will respond when I click on the space where it should be. Our drag implementation also moves it to a different parent during the drag, so it reappears during the drag, and disappears again if you release the drag so that it animates back to the horizontal layout.
I am also able to make the object reappear if I add a nested Canvas component to the GameObject that owns the horizontal layout, but only fixes the objects that are currently parented to that object. Anything that is moved there later by our scripts will not be visible.
My log files shows these errors:
d3d11: failed to create vertex buffer of size -4560 [0x8007000E]
d3d11: failed to create index buffer of size -228 [0x8007000E]
d3d11: attempt to lock null vertex buffer
d3d11: attempt to lock null index buffer
We’ve been using this same system for over a year now, on multiple platforms, without running into anything like this previously. It only started happening last week when we updated from Unity 5.4.3f1 to Unity5.5.1f1.
@Strangiato , it would be great if you could try out Unity 5.5.1 p1.
But anyway, can you file a bug report to Unity? Since you are the only one so far who is constantly getting it. Me and my teammates will vote for it for sure. This bug is a huge headache for us.
This issue is still occurring for me 100% in all versions of Unity 5.5 or newer.
In 5.5 and 5.6, I get a single error message in the log and the UI object stops rendering. In 2017, the game becomes completely unresponsive with repeated “unable to lock vertex buffer” messages in the log file when this issue appears.
I submitted my 100% reproducible case to Unity two weeks ago, referencing the issue tracker link above in my report. Unity QA didn’t even test my submission, claiming that the previous Issue Tracker was already marked as Not Reproducible. I asked them to take another look, but I haven’t heard anything back in over a week.
In 5.5, the error message will only appear once.
In 5.6, it will repeat the error message each frame.
In 2017, the game will lock up completely when it hits the error.
Unity 2017.3.0b11 was released earlier this week and it corrects the problem for us. We’re able to move past out 100% reproducible case without any apparent issues. Hopefully this fix will appear in patches for 5.5 and 5.6 shortly.