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

mono debugger remove some asserts and fixing an error for async debug of a generic (fixes case 1241280) #1292

Merged
merged 2 commits into from
May 19, 2020

Conversation

UnityAlex
Copy link
Collaborator

No description provided.

* When we try to call a method to get the async_id to do an async debug and we are trying to do this in a generic method like this:

async Task<T> ExecuteAsync_Broken<T>()
 {
            await Task.Delay(2);
            return default;
  }

We need to inflate the generic type before call the method or we will get the error:  Could not execute the method because the containing type 'System.Runtime.CompilerServices.AsyncTaskMethodBuilder1[T_REF]’, is not fully instantiated.

Fixes mono#17549
Fixes mono#17569

Cherry-picked by Alex Thibodeau -- some light massaging required
* Removing some asserts and returning err_invalid_argument with an error message when it's possible.

* if we don't find method get_ObjectIdForDebugger we try to find the property Task to continue async debug.

Cherry-picked by Alex Thibodeau with some moderate changes
@UnityAlex UnityAlex requested a review from joncham May 14, 2020 17:28
@unity-cla-assistant
Copy link
Collaborator

CLA assistant check
Thank you for your submission! We really appreciate it. Like many open source projects, we ask that you sign our Contributor License Agreement before we can accept your contribution.
You have signed the CLA already but the status is still pending? Let us recheck it.

@joshpeterson
Copy link

We probably don't need this in the IL2CPP debugger, as it does not support async/await debugging at all.

@UnityAlex UnityAlex merged commit 4f6f6c8 into unity-master May 19, 2020
@UnityAlex UnityAlex deleted the unity-master-fix-1241280 branch June 29, 2020 18:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
5 participants