Fix WinForms stackTrace E_NOINTERFACE by tolerating non-IL managed frames#216
Open
govert wants to merge 1 commit into
Open
Fix WinForms stackTrace E_NOINTERFACE by tolerating non-IL managed frames#216govert wants to merge 1 commit into
govert wants to merge 1 commit into
Conversation
This was referenced Feb 11, 2026
Member
|
Thanks! I just check this fix manually, changes in debugger's code looks good for me. Will move this PR into our internal CI for testing. |
|
Hi, can I politely ask if is there any update on this? I am finding myself coming back here daily to see if this has been added to the latest version of netcoredbg Thanks |
Member
|
@21Beagle this looks good. We've moved this to internal repo, will be part of next release here (probably in May). For now, as a workaround you can build from source code. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes #215
AHub link
N/A
Summary
This change prevents
stackTracefrom failing with0x80004002when a managed frame does not exposeICorDebugILFrame(observed in WinForms load-event call paths).Root cause
WalkFrames()treated a failedIID_ICorDebugILFrameQI as fatal for managed frames. In the failing WinForms path, that QI fails for some frames, and the whole stack walk aborted.Fix
In
src/debugger/frames.cpp:IID_ICorDebugILFrameQI fails, do not return failure.IID_ICorDebugInternalFrameand emitFrameCLRInternalwhen available.FrameUnknown.This keeps
stackTracesuccessful while preserving frame visibility.Tests
Added a targeted regression test:
test-suite/VSCodeTestStackTraceWinFormstest-suite/TestAppWinFormsStackTraceThe test:
Form1), assertsstackTracesuccess.Form1_Load, assertsstackTracesuccess on the previously failing path.Registered in:
test-suite/run_tests.ps1test-suite/run_tests.shtest-suite/sdb_run_tests.ps1test-suite/sdb_run_tests.shLocal verification
Ran:
Result:
Success: Test case "VSCodeTestStackTraceWinForms" is passed!!!Posted by Codex on behalf of @govert.