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

Consider hiding stack frames when using Invoke #68923

Open
steveharter opened this issue May 5, 2022 · 4 comments
Open

Consider hiding stack frames when using Invoke #68923

steveharter opened this issue May 5, 2022 · 4 comments
Assignees
Milestone

Comments

@steveharter
Copy link
Member

Per comment and reply from #67917 (comment) we should consider hiding the 2 extra outer (actual exception, not the inner) frames that we now have when an invoked method throws an exception which is subsequently wrapped with a TargetInvocationException.

@ghost
Copy link

ghost commented May 5, 2022

Tagging subscribers to this area: @dotnet/area-system-reflection
See info in area-owners.md if you want to be subscribed.

Issue Details

Per comment and reply from #67917 (comment) we should consider hiding the 2 extra outer (actual exception, not the inner) frames that we now have when an invoked method throws an exception which is subsequently wrapped with a TargetInvocationException.

Author: steveharter
Assignees: steveharter
Labels:

area-System.Reflection, discussion

Milestone: 7.0.0

@steveharter
Copy link
Member Author

It is generally agreed that we should be hiding the extra stack frames that were added due to Emit-based invoke. We either need reconcile why native code in SystemDomain::IsReflectionInvocationMethod isn't being called to skip stack frames in this case and\or add [StackTraceHidden] to the managed methods. Pending tests, we may also need to create a Mono issue associated with it.

@MarcoRossignoli
Copy link
Member

MarcoRossignoli commented May 18, 2022

Hi @steveharter I've noticed the same today during testing:

image

It wasn't here in past.

@steveharter
Copy link
Member Author

Moving to v8 to consider. Not considered high priority.

I believe the last stack frame is always preserved with [StackTraceHidden], so we may need a different way to determine how to hide these frames.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants