We will be out of office from December 23th to January 7th. During this time we'll check the forums less often, we'll be back at full throttle soon. Take care, Merry Christmas!
11-04-2024, 02:26 PM (This post was last modified: 11-04-2024, 02:48 PM by kodra.)
I tried to Compute backend, and my Unity editor started freezing occasionally when I got into Play mode. When it happens the GPU usage is at 100% and there is no way to unfreeze it except killing the whole process.
Switching back to Burst seems to fix it.
It's quite hard to provide a set of steps to reproduce, since it only happens occasionally, but it's a bad enough to make Compute completely unusable for me.
11-04-2024, 03:40 PM (This post was last modified: 11-04-2024, 04:36 PM by josemendez.)
(11-04-2024, 02:26 PM)kodra Wrote: I tried to Compute backend, and my Unity editor started freezing occasionally when I got into Play mode. When it happens the GPU usage is at 100% and there is no way to unfreeze it except killing the whole process.
Switching back to Burst seems to fix it.
It's quite hard to provide a set of steps to reproduce, since it only happens occasionally, but it's a bad enough to make Compute completely unusable for me.
I’m unable to reproduce this, unfortunately. I’ve tried both Mac and Windows machines to no avail.
Keep in mind that it is typically not possible to hang a GPU. If any “hang” takes more than a couple seconds - or the timeout interval specified in your machine - Unity will crash you’ll see a message similar to this:
“Failed to present D3D11 swapchain due to device
reset/removed.This error can happen if you draw or dispatch
ver expensive workloads to the 6PU. which can cause
Windows to detect a GPU Timeout and reset the device.”
Also note that Unity will sometimes take quite some time to compile compute shaders (often up to a minute) and there’s no feedback during this time, so it may look like the editor has frozen.
Make sure this is not your case. Otherwise, it would be useful if you could share the Editor log with us to see what happened that lead to this issue.
11-04-2024, 11:19 PM (This post was last modified: 12-04-2024, 01:11 AM by kodra.)
(11-04-2024, 03:40 PM)josemendez Wrote: Hi,
I’m unable to reproduce this, unfortunately. I’ve tried both Mac and Windows machines to no avail.
Also note that Unity will sometimes take quite some time to compile compute shaders (often up to a minute) and there’s no feedback during this time, so it may look like the editor has frozen.
Make sure this is not your case. Otherwise, it would be useful if you could share the Editor log with us to see what happened that lead to this issue.
Kind regards,
"Also note that Unity will sometimes take quite some time to compile compute shaders (often up to a minute) and there’s no feedback during this time, so it may look like the editor has frozen."
I'm quite sure it's not the case, cause this simple project runs instantly for me when it doesn't freeze. Also the shader compiler is using 0% of CPU when the editor is freezing (see below).
Quote:Keep in mind that it is typically not possible to hang a GPU. If any “hang” takes more than a couple seconds - or the timeout interval specified in your machine - Unity will crash you’ll see a message similar to this:
Well I guess Obi is truly magically powerful since it does hang my GPU constantly... I just reproduced it with the project attached above. There aren't specific steps: I just keep enter/exit play mode until it happens.
The task manager looks like this:
The log files (right after the hanging happens) are attached.
12-04-2024, 12:32 AM (This post was last modified: 12-04-2024, 01:14 AM by kodra.)
I've upgraded to the latest LTS Unity (2022.3.24f1) and Nvidia driver (552.12). Also rebooted my PC.
Unfortunately neither helps.
This is a video recording of what's happening:
It only happens with Compute backend and never happens with Burst backend. It's quite a bummer... Compute is so performant for fluid, but it's just impossible to develop with it when the editor freezes every several minutes.
12-04-2024, 08:13 AM (This post was last modified: 12-04-2024, 08:15 AM by josemendez.)
(11-04-2024, 11:19 PM)kodra Wrote: Well I guess Obi is truly magically powerful since it does hang my GPU constantly... I just reproduced it with the project attached above. There aren't specific steps: I just keep enter/exit play mode until it happens.
Are you using DX11, or some other API? (DX12, Vulkan?)
(11-04-2024, 11:19 PM)kodra Wrote: The log files (right after the hanging happens) are attached.
These are not the editor log files. Just an empty shader compiler log and a packages update list, neither are of any use. The log I'm interested in should be at %LOCALAPPDATA%\Unity\Editor\Editor.log. See: https://docs.unity3d.com/Manual/LogFiles.html
12-04-2024, 12:11 PM (This post was last modified: 12-04-2024, 01:39 PM by kodra.)
(12-04-2024, 08:13 AM)josemendez Wrote: Are you using DX11, or some other API? (DX12, Vulkan?)
These are not the editor log files. Just an empty shader compiler log and a packages update list, neither are of any use. The log I'm interested in should be at %LOCALAPPDATA%\Unity\Editor\Editor.log. See: https://docs.unity3d.com/Manual/LogFiles.html
Unfortunately, it happens with both DX11 and Vulkan.
I've attached the Editor.log after the hanging happens (with DX11). As crazy as it sounds, it seems to happen with both DX11 and Vulkan, but not with DX12. It might just be luck, but I've entered/exited play mode 50 times with DX12 and the editor didn't hang. With DX11 it always happens in less than 10 times.
Well... never mind. Unfortunately it happens with DX12 as well. Just much less often. It's a bit mysterious tho... cause it works differently with DX11 and DX12. With DX11 it freezes immediately upon entering play mode. With DX12 it seems to only happen after the game is running for a while. Perhaps there are two different bugs? I'm not sure. The only thing I'm sure about is that it hangs very often and constantly with DX11 and Vulkan on my machine.
It also doesn't hang the built game even with DX11 (so far?). Only Unity editor.
(12-04-2024, 12:11 PM)kodra Wrote: Unfortunately, it happens with both DX11 and Vulkan.
I've attached the Editor.log after the hanging happens (with DX11). As crazy as it sounds, it seems to happen with both DX11 and Vulkan, but not with DX12. It might just be luck, but I've entered/exited play mode 50 times with DX12 and the editor didn't hang. With DX11 it always happens in less than 10 times.
Well... never mind. Unfortunately it happens with DX12 as well. Just much less often. It's a bit mysterious tho... cause it works differently with DX11 and DX12. With DX11 it freezes immediately upon entering play mode. With DX12 it seems to only happen after the game is running for a while. Perhaps there are two different bugs? I'm not sure. The only thing I'm sure about is that it hangs very often and constantly with DX11 and Vulkan on my machine.
It also doesn't hang the built game even with DX11 (so far?). Only Unity editor.
Hi,
I could finally reproduce this. I'm working on a fix, will get back to you once I'm reasonably sure it has been fixed.
I'm seeing a similar problem right now. I'm trying to run ObiRobe now on my MacBook (2022, M2) on Unity 2023.3.0b10.
When using GPU backend the game runs about 1 second then the computer freezes completely and I have to restart it. It is the same in any example scene. On burst backend it is fine.
Is this have the same root cause?
The computer freezes completely so unfortunately I can't analyze GPU usage etc.
(25-08-2024, 10:10 AM)goosejordan Wrote: I'm seeing a similar problem right now. I'm trying to run ObiRobe now on my MacBook (2022, M2) on Unity 2023.3.0b10.
When using GPU backend the game runs about 1 second then the computer freezes completely and I have to restart it. It is the same in any example scene. On burst backend it is fine.
Is this have the same root cause?
The computer freezes completely so unfortunately I can't analyze GPU usage etc.
Hi!
Doubt the cause is the same, since this particular issue OP talked about was fixed during the beta.
Been unable to reproduce this: tried on a M2 MacMini, Unity 2023.1.16f1. I'd recommend trying on a non-beta Unity version, since betas are generally unstable (that's why they're betas after all). If the use persists, would it be possible for you to share the editor log so that we can take a look?