Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Stepping over await in the Visual Studio debugger crashes the Unity editor #41

Closed
randomPoison opened this issue Oct 7, 2019 · 3 comments

Comments

@randomPoison
Copy link

I'm running into an issue where using Visual Studio in combination with UniTask is causing the Unity editor to crash.

Reproduction Steps

  1. Write an async function that returns a UniTaskVoid, UniTask, or UniTask<T> and awaits at least once.
  2. Using Visual Studio, set a breakpoint on the await statement and attach the debugger to the editor.
  3. Run your game in the editor until Visual Studio hits the breakpoint.
  4. Try to step over the await statement.

Notes

  • I've tested this with Visual Studio 2019 on Windows with Unity 2019.2.4f1.
  • Stepping over await statements appears to work correctly when using async void, async Task, and async Task<T>, so the issue appears to have something to do with UniTask.
  • It's not clear if the issue is with Visual Studio, Unity, or UniTask. To test this, it would be good to try the following things:
    • Create a non-Unity C# project with Visual Studio 2019 and create a custom task-like type, matching what UniTask provides. See if you can use the debugger here.
    • Create a basic task-like type, similar to what UniTask provides but as minimal as possible, and see if that still causes the editor to crash.

I'll try to dig into this issue more, but I wanted to open this ticket in case I don't have time.

@NoxMortem
Copy link

NoxMortem commented Dec 14, 2019

Just wanted to create the same ticket. Also happens with Rider 2019.3 and Unity 2019.3.3f1 so I think we can likely narrow it down to:

  • Unity (very likely)
  • UniTask (less likely)

@neuecc
Copy link
Member

neuecc commented Apr 15, 2020

It certainly happens, but it seems to be difficult to solve here.

@neuecc neuecc added the wontfix This will not be worked on label Apr 15, 2020
@neuecc neuecc removed the wontfix This will not be worked on label Apr 26, 2020
@neuecc
Copy link
Member

neuecc commented Apr 26, 2020

discussed at #66 and fixed in 1.3.1.

@neuecc neuecc closed this as completed Apr 26, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants