Skip to content

Unknown win32 error specifically in wpf #8480

@DerekGooding

Description

@DerekGooding

Description

This is going to be difficult to explain. I'm using a DLL that's manipulating a specific field of a software proprietary file type. I can manipulate most of the properties but one of them causes a strange, unhandlable crash. Try/catch doesn't work and debugger can't pick it up. But I've identified the line that errors by putting breaks before and after.

If I create a brand new Console app in .Net7 and just run the command from the DLL, I'm fine. Console .Net8 is also fine.

Then I try in WPF. Create an empty project and add this command to the initialization of the MainWindow. .Net7 has no issue. Works as intended. But specifically in .NET8 in WPF, the error occurs.

Just-In-Time Debugger catches it and gives me this small line:
An unhandled win32 exception occurred in [24084] MyProgram.exe

When I debug further, I get:

A breakpoint instruction (__debugbreak() statement or a similar call) was executed in MyProgram.exe.

ntdll.dll!RtlReportCriticalFailure() Unknown
ntdll.dll!RtlpHeapHandleError() Unknown
ntdll.dll!RtlpHpHeapHandleError() Unknown
ntdll.dll!RtlpLogHeapFailure() Unknown
ntdll.dll!RtlSizeHeap() Unknown
AcLayers.dll!00007ffca5b5af0a() Unknown
oleaut32.dll!00007ffcdf582ea3() Unknown
oleaut32.dll!00007ffcdf6050cd() Unknown
PropAuto.dll!0000000180006918() Unknown
00007ffbbb98db19() Unknown
00007ffbbb98c7aa() Unknown
00007ffbbb98bf9e() Unknown
00007ffbbb98beb1() Unknown
PresentationFramework.dll!00007ffc16d1b11d() Unknown
PresentationFramework.dll!00007ffc16e216b6() Unknown
PresentationCore.dll!00007ffc15f34b20() Unknown
00007ffbbb9765a1() Unknown
PresentationCore.dll!00007ffc15f1661c() Unknown
PresentationCore.dll!00007ffc15f34b20() Unknown
00007ffbbb9765a1() Unknown
00007ffbbb975952() Unknown
PresentationCore.dll!00007ffc15f07eb8() Unknown
PresentationCore.dll!00007ffc15f40cc5() Unknown
PresentationCore.dll!00007ffc15f44a86() Unknown
PresentationCore.dll!00007ffc15fa5ef2() Unknown
PresentationCore.dll!00007ffc15fa4bfa() Unknown
PresentationCore.dll!00007ffc15faa888() Unknown
00007ffbbb97ba50() Unknown
00007ffbbb97b91d() Unknown
00007ffbbb97ac47() Unknown
00007ffbbb97a964() Unknown
00007ffbbb97b579() Unknown
00007ffbbb97b106() Unknown
00007ffbba628a00() Unknown
user32.dll!00007ffcdf92e858() Unknown
user32.dll!00007ffcdf92e299() Unknown
00007ffbba62d9ab() Unknown
WindowsBase.dll!00007ffc165fb0cf() Unknown
PresentationFramework.dll!00007ffc16a79e4d() Unknown
PresentationFramework.dll!00007ffc16a7868b() Unknown
00007ffbba623691() Unknown
coreclr.dll!00007ffc1a16aa43() Unknown
coreclr.dll!00007ffc1a09a42e() Unknown
coreclr.dll!00007ffc1a137988() Unknown
coreclr.dll!00007ffc1a0c4d5e() Unknown
coreclr.dll!00007ffc1a0c48fb() Unknown
coreclr.dll!00007ffc1a0c3d5e() Unknown
coreclr.dll!00007ffc1a0ebb68() Unknown
hostpolicy.dll!00007ffcb49a2972() Unknown
hostpolicy.dll!00007ffcb49a2c5c() Unknown
hostpolicy.dll!00007ffcb49a3759() Unknown
hostfxr.dll!00007ffcb9f5b63a() Unknown
hostfxr.dll!00007ffcb9f5e1e6() Unknown
hostfxr.dll!00007ffcb9f604b6() Unknown
hostfxr.dll!00007ffcb9f5e7c4() Unknown
hostfxr.dll!00007ffcb9f58660() Unknown
Fusion.exe!00007ff7db7a00fa() Unknown
Fusion.exe!00007ff7db7a0586() Unknown
Fusion.exe!00007ff7db7a1ad8() Unknown
kernel32.dll!00007ffcdea67344() Unknown
ntdll.dll!RtlUserThreadStart() Unknown

This assembly code is beyond my understanding but maybe it will help if I give the lines surrounding the error.

00007FFCE042F2BD lea r8,[string "Critical error detected %lx\n" (07FFCE046E450h)]
00007FFCE042F2C4 xor edx,edx
00007FFCE042F2C6 lea ecx,[rdx+65h]
00007FFCE042F2C9 call DbgPrintEx (07FFCE0380300h)
00007FFCE042F2CE test esi,esi
00007FFCE042F2D0 je RtlReportCriticalFailure+65h (07FFCE042F2E1h)
=> 00007FFCE042F2D2 int 3
00007FFCE042F2D3 jmp RtlReportCriticalFailure+65h (07FFCE042F2E1h)
00007FFCE042F2D5 mov rdi,qword ptr [rsp+0F8h]
00007FFCE042F2DD mov ebx,dword ptr [rsp+20h]
00007FFCE042F2E1 mov dword ptr [rsp+30h],ebx

Reproduction Steps

I'm not sure how you'd be able to recreate this without the specific file types involved. Hopefully the information given above is enough to pinpoint the issue.

Expected behavior

No crash, preferably

Actual behavior

Crash

Regression?

No response

Known Workarounds

Don't use .Net8 yet. I haven't tried but I might write a small console application and call the commands through that instead. Should work.

Impact

No response

Configuration

No response

Other information

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions