.NET Framework 4.8 CLR fatal error 0x80131506 during WPF UI Automation — debugger dependency?

Emanuel 0 Reputation points
2026-12-05T01:48:49.4266667+00:00

I am investigating a single fatal CLR crash involving a third-party Windows desktop application.

Environment

  • Application: NinjaTrader Desktop 8.1.9.0

Runtime: .NET Framework CLR 4.8.10009.0

Fatal error: 0x80131506

Faulting module: clr.dll

Fault offset: +0x39C0E0

Incident date: November 28, 2026

Incident

The application terminated during an external debugger-assisted diagnostic session.

Immediately before termination, the affected thread reported:

System.Windows.Automation.ElementNotAvailableException

The retained dump includes:

MS.Internal.Automation.ElementProxy.GetRuntimeId()

The native stack also includes WPF, COM/UI Automation and CLR frames.

Windows recorded a fatal CLR failure, and the retained dump identifies System.ExecutionEngineException.

The matching CLR image shows two compatible incoming control-flow routes to the fatal-reporting block.

One route follows a return from RaiseException, while another enters through a separate branch.

The dump does not identify which route executed.

The application was running a custom .NET indicator, but no corresponding indicator frame was identified on the recovered fault stack.

Questions

Can this CLR fatal-reporting path be reached during ordinary execution without an attached debugger?

Does either compatible route require debugger-controlled exception continuation?

Are there known .NET Framework 4.8, WPF or UI Automation issues consistent with this signature?

Is there a documented way to distinguish the two routes using an existing dump and matching runtime binaries?

Are there recommended mitigations or specific Windows/.NET updates associated with this failure mechanism?

The incident has not been reproduced.

I am seeking guidance on identifying the necessary failure condition, rather than general application troubleshooting.

I can provide sanitized event excerpts and stack information if required.

Thank you.

Emanuel GonskyI am investigating a single fatal CLR crash involving a third-party Windows desktop application.

Environment

Application: NinjaTrader Desktop 8.1.9.0

Runtime: .NET Framework CLR 4.8.10009.0

Fatal error: 0x80131506

Faulting module: clr.dll

Fault offset: +0x39C0E0

Incident date: November 28, 2026

Incident

The application terminated during an external debugger-assisted diagnostic session.

Immediately before termination, the affected thread reported:

System.Windows.Automation.ElementNotAvailableException

The retained dump includes:

MS.Internal.Automation.ElementProxy.GetRuntimeId()

The native stack also includes WPF, COM/UI Automation and CLR frames.

Windows recorded a fatal CLR failure, and the retained dump identifies System.ExecutionEngineException.

The matching CLR image shows two compatible incoming control-flow routes to the fatal-reporting block.

One route follows a return from RaiseException, while another enters through a separate branch.

The dump does not identify which route executed.

The application was running a custom .NET indicator, but no corresponding indicator frame was identified on the recovered fault stack.

Questions

Can this CLR fatal-reporting path be reached during ordinary execution without an attached debugger?

Does either compatible route require debugger-controlled exception continuation?

Are there known .NET Framework 4.8, WPF or UI Automation issues consistent with this signature?

Is there a documented way to distinguish the two routes using an existing dump and matching runtime binaries?

Are there recommended mitigations or specific Windows/.NET updates associated with this failure mechanism?

The incident has not been reproduced.

I am seeking guidance on identifying the necessary failure condition, rather than general application troubleshooting.

I can provide sanitized event excerpts and stack information if required.

Thank you.

Emanuel

Developer technologies | .NET | .NET Runtime
0 comments No comments

2 answers

Sort by: Most helpful
  1. Emanuel 0 Reputation points
    2026-12-05T02:00:57.44+00:00

    Thank you for the detailed analysis.

    We have preserved the original November 28 crash dump, debugger execution journal, and matching CLR binary. We want to avoid reproducing this potentially fatal condition.

    I would appreciate clarification from a .NET Framework CLR specialist on three remaining questions:

    Can the existing dump's exception context, registers, and stack establish whether debugger-controlled exception continuation contributed to this specific failure?

    If the two control-flow routes have already converged and no predecessor state survives, is there any other evidence in the existing debugger journal or Windows crash records that could distinguish them without reproducing the crash?

    If the route cannot be established, is there any supported method for determining whether ordinary application execution is exposed to this specific fatal condition, rather than merely confirming that such CLR failures are theoretically possible?

    We can provide sanitized exception records, debugger command history, and relevant stack excerpts for review.

    Our objective is to determine whether the incident was diagnostic-specific or whether it represents a potential ordinary-use stability risk.

    Thank you.

    Emanuel

    Was this answer helpful?

    0 comments No comments

  2. AI answer

    2026-12-05T01:50:41.8533333+00:00

    A fatal CLR 0x80131506 path can occur without a debugger; the existing dump proves that the CLR detected an unrecoverable condition, but it does not by itself prove debugger-controlled continuation, identify the preceding converged route, or make the preceding UI Automation exception causal.

    What the evidence establishes

    • For .NET Framework, fatalExecutionEngineError means that the CLR detected fatal corruption and will terminate the process. Microsoft lists malformed P/Invoke, invalid interop data, unmanaged callbacks, COM-wrapper cleanup races, and similar corruption mechanisms as possible causes—not as findings for this incident.^1^
    • Therefore, neither the fatal-reporting block nor the route returning from RaiseException inherently requires a debugger.
    • A debugger receives first-chance and, if unhandled, last-chance notifications. It may continue an exception as handled or unhandled, and may modify thread state. WinDbg’s gh explicitly marks an exception handled; the normal/default disposition is unhandled.^2^ ^3^
    • Consequently, a compatible route could have been affected by debugger disposition, but its presence in clr.dll does not establish that it was. The debugger transcript or automation script is needed to show whether gh, -h, register modification, or equivalent behavior occurred.

    ElementNotAvailableException means that the referenced UI Automation element no longer exists—for example, because its dialog or application closed.^4^ It is ordinarily a recoverable UIA race/staleness condition. Its proximity to ElementProxy.GetRuntimeId() is relevant chronology, but does not establish that it corrupted the CLR.

    Can the existing dump distinguish the routes?

    Since the CLR image is already matched, concentrate on whether the dump retained the pre-convergence context, not only the final fatal-reporting context:

    !analyze -v
    .exr -1
    .ecxr
    r
    kv
    u @rip-40 @rip+40    ; x64
    u @eip-40 @eip+40    ; x86
    

    Use only the disassembly command matching the dump architecture. .exr -1 displays the latest exception record; .ecxr selects its saved register context and stack.^5^ ^6^

    Route attribution is possible only if:

    1. that exception context corresponds to the relevant transfer;
    2. registers, flags, return addresses, or stack memory still encode the predecessor; and
    3. the decisive state was not overwritten after both routes converged.

    If those artifacts are absent, the fault offset and matching binary cannot reconstruct branch history. Public symbols may also be insufficient to name private CLR routines or explain both branches semantically. A debugger transcript or execution trace is then required.

    Useful sanitized follow-up output would be:

    • dump type and capture method;
    • !analyze -v;
    • .exr -1;
    • .ecxr; r; kv;
    • architecture and module/version output;
    • disassembly around the convergence point and both predecessors;
    • debugger exception filters and the commands used to continue execution.

    Known issues and servicing

    The reviewed public documentation does not identify a .NET Framework 4.8 update for this exact combination of ExecutionEngineException, UI Automation, WPF, and ElementNotAvailableException. Similar UIA exceptions have been reported in WPF, but that report does not establish this fatal signature.^7^

    Two older 4.8 fixes are adjacent but not exact matches:

    • concurrent queries against the same managed ITypeInfo could crash;
    • WPF applications could crash around GetWindowText/GetWindowTextLength.^8^

    The November 2026 preview lists no corresponding 4.8 CLR/WPF fix.^9^ Install the latest cumulative Windows/.NET Framework update applicable to the exact Windows version, but there is no documented signature-specific mitigation in these release notes.^10^

    If it recurs

    Capture a full postmortem dump without simultaneously attaching another debugger:

    mkdir C:\Dumps
    procdump.exe -accepteula -ma -i C:\Dumps
    

    ProcDump supports postmortem installation and -ma full dumps.^11^ If debugger interaction itself must be studied, use WinDbg Time Travel Debugging; unlike a dump, it records executed control flow and can be replayed backward.^12^

    For a controlled reproduction, relevant diagnostic MDAs include:

    <mdaConfig>
      <assistants>
        <fatalExecutionEngineError />
        <callbackOnCollectedDelegate />
        <invalidIUnknown />
        <invalidVariant />
        <raceOnRCWCleanup />
      </assistants>
    </mdaConfig>
    

    These are diagnostic probes for possible callback/COM corruption, not evidence that any such mechanism occurred here.^1^

    If no route-discriminating state remains, escalate first to NinjaTrader with the full dump, exact clr.dll and matching DAC, Windows build and installed KB inventory, Event Viewer records, application configuration, debugger transcript/disposition, custom-indicator package, and reproduction details. NinjaTrader can supply private symbols and escalate a suspected CLR/WPF defect to Microsoft. An eligible Microsoft support agreement is the alternative escalation route. Without predecessor state, a debugger transcript, or a reproduction trace, support cannot reliably infer which converged route ran from the final offset alone.


    References

    1. fatalExecutionEngineError MDA
    2. Debugger Exception Handling
    3. Controlling Exceptions and Events
    4. ElementNotAvailableException Class (System.Windows.Automation) | Microsoft Learn
    5. .exr (Display Exception Record)
    6. .ecxr (Display Exception Context Record)
    7. Error: Element does not exist or it is virtualized; use VirtualizedItem Pattern · Issue #648 · dotnet/wpf
    8. .NET Framework May 2024 security and quality rollup
    9. .NET Framework November 2026 cumulative update preview
    10. .NET Framework release notes
    11. ProcDump v12.02
    12. Time Travel Debugging - Overview
    AI-generated content may be incorrect. Read our transparency notes for more information.

    Was this answer helpful?

Your answer

Answers can be marked as 'Accepted' by the question author and 'Recommended' by moderators, which helps users know the answer solved the author's problem.