Skip to content

WinForms Desktop application (.NET 8 & .NET 9) crashes randomly with corclr.dll errors #112598

Closed

Description

@UweKeim

Description

Our WinForms Desktop .NET 8 application that includes, among others, both DevExpress controls and WebView2, appears to crash randomly on various editions on Windows 10 and 11.

We use the self-contained shipment of .NET and the WebView2 runtime.

Some users reported that the crashes started occurring after installing the Update version 24H2 for Windows 11.

The crashes only occurs on some customer systems, not all.

On those systems, when the crashes occur, they occur approx. between 1 and 10 minutes after starting the application.


Reproduction Steps

  1. Download and install a version of our application from our website (German only, sorry).
  2. Let the application run for some time (no interaction usually required, even keeping it in the background seems to be sufficient to crash).On certain machines a crash occurs (see Even Log entries below).

Until today, we found no determined way to configure a Windows system so that it always crashes.

We do have the impression that it occurs more likely on machines with lots of RAM (like e.g. 32 GB or 64 GB) and less likely on machines with rather limited amount RAM (like e.g. 4 GB or 8 GB).


Expected behavior

I do not want my application to crash randomly, no matter which Windows version and Windows patch level (like 24H2) it is running on.


Actual behavior

Here are some Event Log entries that our customers provided to us:

Application: producer.exe

CoreCLR Version: 8.0.524.21615

.NET Version: 8.0.5

Description: The process was terminated due to an internal error in the .NET Runtime at IP 0x00007FFAD6C47D29 (0x00007FFAD6BA0000) with exit code 0x80131506.
Fehlerhafter Anwendungsname: producer.exe, Version: 16.8.6.0, Zeitstempel: 0x661f0000
Fehlerhafter Modulname: coreclr.dll, Version: 8.0.524.21615, Zeitstempel: 0x661ef96e
Ausnahmecode: 0xc0000005
Fehleroffset: 0x00000000000a7d29
Fehlerhafte Prozess-ID: 0x477C
Fehlerhafte Anwendungsstartzeit: 0x1DB629E21505C34
Fehlerhafter Anwendungspfad: C:\Users\micro\AppData\Local\Zeta Producer 16\Applications\producer.exe
Fehlerhafter Modulpfad: C:\Users\micro\AppData\Local\Zeta Producer 16\Applications\coreclr.dll
Berichts-ID: 21ee1eb2-8f45-474b-9f9e-84bb5a0d7cb6
Vollständiger Name des fehlerhaften Pakets:
Fehlerhafte paketbezogene Anwendungs-ID:
Application: producer.exe
CoreCLR Version: 8.0.1224.60305
.NET Version: 8.0.12
Description: The process was terminated due to an internal error in the .NET Runtime at IP 0x00007FF88B5FD38D (0x00007FF88B500000) with exit code 0x80131506.

Fehlerhafter Anwendungsname: producer.exe, Version: 16.8.7.0, Zeitstempel: 0x674f0000
Fehlerhafter Modulname: coreclr.dll, Version: 8.0.1224.60305, Zeitstempel: 0x674f3d10
Ausnahmecode: 0xc0000005
Fehleroffset: 0x00000000000fd38d
Fehlerhafte Prozess-ID: 0x30B78
Fehlerhafte Anwendungsstartzeit: 0x1DB7A1E15A4A932
Fehlerhafter Anwendungspfad: C:\Users\samso\AppData\Local\Zeta Producer 16\Applications\producer.exe
Fehlerhafter Modulpfad: C:\Users\samso\AppData\Local\Zeta Producer 16\Applications\coreclr.dll
Berichts-ID: 92a05e21-2fe8-4ff3-b1c0-51bbb4b748bf
Vollständiger Name des fehlerhaften Pakets:
Fehlerhafte paketbezogene Anwendungs-ID:
<Event xmlns="http://schemas.microsoft.com/win/2004/08/events/event">
    <System>
        <Provider Name="Application Error" Guid="{a0e9b465-b939-57d7-b27d-95d8e925ff57}" />
        <EventID>1000</EventID>
        <Version>0</Version>
        <Level>2</Level>
        <Task>100</Task>
        <Opcode>0</Opcode>
        <Keywords>0x8000000000000000</Keywords>
        <TimeCreated SystemTime="2025-02-11T11:38:17.4641322Z" />
        <EventRecordID>6955</EventRecordID>
        <Correlation />
        <Execution ProcessID="15236" ThreadID="13204" />
        <Channel>Application</Channel>
        <Computer>XXXXXXX</Computer>
        <Security UserID="XXX" />
    </System>
    <EventData>
        <Data Name="AppName">producer.exe</Data>
        <Data Name="AppVersion">16.8.6.0</Data>
        <Data Name="AppTimeStamp">661f0000</Data>
        <Data Name="ModuleName">coreclr.dll</Data>
        <Data Name="ModuleVersion">8.0.524.21615</Data>
        <Data Name="ModuleTimeStamp">661ef96e</Data>
        <Data Name="ExceptionCode">c0000005</Data>
        <Data Name="FaultingOffset">00000000000a7d29</Data>
        <Data Name="ProcessId">0x38f4</Data>
        <Data Name="ProcessCreationTime">0x1db7c7870094f2c</Data>
        <Data Name="AppPath">C:\Users\micro\AppData\Local\Zeta Producer 16\Applications\producer.exe</Data>
        <Data Name="ModulePath">C:\Users\micro\AppData\Local\Zeta Producer 16\Applications\coreclr.dll</Data>
        <Data Name="IntegratorReportId">c25f2161-4355-4b59-ab6e-33e64decbd55</Data>
        <Data Name="PackageFullName" />
        <Data Name="PackageRelativeAppId" />
    </EventData>
</Event>
<Event xmlns="http://schemas.microsoft.com/win/2004/08/events/event">
    <System>
        <Provider Name=".NET Runtime" />
        <EventID Qualifiers="0">1023</EventID>
        <Version>0</Version>
        <Level>2</Level>
        <Task>0</Task>
        <Opcode>0</Opcode>
        <Keywords>0x80000000000000</Keywords>
        <TimeCreated SystemTime="2025-02-13T10:33:01.3577704Z" />
        <EventRecordID>7274</EventRecordID>
        <Correlation />
        <Execution ProcessID="15548" ThreadID="0" />
        <Channel>Application</Channel>
        <Computer>XXX</Computer>
        <Security />
    </System>
    <EventData>
        <Data>Application: producer.exe CoreCLR Version: 9.0.225.6610 .NET Version: 9.0.2 Description: The process was terminated due to an internal error in the .NET Runtime at IP 0x00007FFF11FEE0A5 (0x00007FFF11FE0000) with exit code 0x80131506.</Data>
    </EventData>
</Event>
Fehlerhafter Anwendungsname: producer.exe, Version: 16.8.7.0, Zeitstempel: 0x67890000
Fehlerhafter Modulname: coreclr.dll, Version: 9.0.225.6610, Zeitstempel: 0x6789558d
Ausnahmecode: 0xc0000005
Fehleroffset: 0x000000000000e0a5
Fehlerhafte Prozess-ID: 0x3ED10
Fehlerhafte Anwendungsstartzeit: 0x1DB7F22B27DFA62
Fehlerhafter Anwendungspfad: C:\Users\samso\AppData\Local\Zeta Producer 16\Applications\producer.exe
Fehlerhafter Modulpfad: C:\Users\samso\AppData\Local\Zeta Producer 16\Applications\coreclr.dll
Berichts-ID: dabad3e0-0ec6-446b-afb1-7fd1dd2b0ae0
Vollständiger Name des fehlerhaften Pakets:
Fehlerhafte paketbezogene Anwendungs-ID:

Application: producer.exe
CoreCLR Version: 9.0.225.6610
.NET Version: 9.0.2
Description: The process was terminated due to an internal error in the .NET Runtime at IP 0x00007FF9C4DDE0A5 (0x00007FF9C4DD0000) with exit code 0x80131506.

Fehlerbucket , Typ 0
Ereignisname: APPCRASH
Antwort: Nicht verfügbar
CAB-Datei-ID: 0

Problemsignatur:
P1: producer.exe
P2: 16.8.7.0
P3: 67890000
P4: coreclr.dll
P5: 9.0.225.6610
P6: 6789558d
P7: c0000005
P8: 000000000000e0a5
P9:
P10:

Angefügte Dateien:

Diese Dateien befinden sich möglicherweise hier:
\\?\C:\ProgramData\Microsoft\Windows\WER\ReportQueue\AppCrash_producer.exe_a37d47b7dd9b8c3918886b6811d1035fa91ec_6980bec3_ea124448-1d32-4cda-b655-23200a415c33

Analysesymbol:
Es wird erneut nach einer Lösung gesucht: 0
Berichts-ID: dabad3e0-0ec6-446b-afb1-7fd1dd2b0ae0
Berichtstatus: 4
Bucket mit Hash:
CAB-Datei-Guid: 0

Fehlerbucket 1439337121522967553, Typ 4
Ereignisname: APPCRASH
Antwort: Nicht verfügbar
CAB-Datei-ID: 0

Problemsignatur:
P1: producer.exe
P2: 16.8.7.0
P3: 67890000
P4: coreclr.dll
P5: 9.0.225.6610
P6: 6789558d
P7: c0000005
P8: 000000000000e0a5
P9:
P10:

Angefügte Dateien:
\\?\C:\ProgramData\Microsoft\Windows\WER\Temp\WER.2a788624-bedf-42fe-b969-074c7522f546.tmp.WERInternalMetadata.xml

Diese Dateien befinden sich möglicherweise hier:
\\?\C:\ProgramData\Microsoft\Windows\WER\ReportArchive\AppCrash_producer.exe_a37d47b7dd9b8c3918886b6811d1035fa91ec_6980bec3_ea124448-1d32-4cda-b655-23200a415c33

Analysesymbol:
Es wird erneut nach einer Lösung gesucht: 0
Berichts-ID: dabad3e0-0ec6-446b-afb1-7fd1dd2b0ae0
Berichtstatus: 268435456
Bucket mit Hash: 878c03c1b275918113f98d7c7068e401
Application: producer.exe
CoreCLR Version: 8.0.224.6711
.NET Version: 8.0.2
Description: The process was terminated due to an internal error in the .NET Runtime at IP 0x00007FF9D0AF2299 (0x00007FF9D0A90000) with exit code 0x80131506.

Fehlerhafter Anwendungsname: producer.exe, Version: 16.8.7.0, Zeitstempel: 0x65a80000
Fehlerhafter Modulname: coreclr.dll, Version: 8.0.224.6711, Zeitstempel: 0x65a895d5
Ausnahmecode: 0xc0000005
Fehleroffset: 0x0000000000062299
Fehlerhafte Prozess-ID: 0x53BF0
Fehlerhafte Anwendungsstartzeit: 0x1DB7F95B72B37F0
Fehlerhafter Anwendungspfad: C:\Users\samso\AppData\Local\Zeta Producer 16\Applications\producer.exe
Fehlerhafter Modulpfad: C:\Users\samso\AppData\Local\Zeta Producer 16\Applications\coreclr.dll
Berichts-ID: f59616bb-65ec-48d6-a531-c47aac342c67
Vollständiger Name des fehlerhaften Pakets:
Fehlerhafte paketbezogene Anwendungs-ID:

Fehlerbucket , Typ 0
Ereignisname: APPCRASH
Antwort: Nicht verfügbar
CAB-Datei-ID: 0

Problemsignatur:
P1: producer.exe
P2: 16.8.7.0
P3: 65a80000
P4: coreclr.dll
P5: 8.0.224.6711
P6: 65a895d5
P7: c0000005
P8: 0000000000062299
P9:
P10:

Angefügte Dateien:

Diese Dateien befinden sich möglicherweise hier:
\\?\C:\ProgramData\Microsoft\Windows\WER\ReportQueue\AppCrash_producer.exe_15bf62435ae17773022799f9c1f1e2df1b0c870_53e89198_0c069972-fcde-4693-8e7e-db0b0970ebae

Analysesymbol:
Es wird erneut nach einer Lösung gesucht: 0
Berichts-ID: f59616bb-65ec-48d6-a531-c47aac342c67
Berichtstatus: 4
Bucket mit Hash:
Application: producer.exe
CoreCLR Version: 8.0.224.6711
.NET Version: 8.0.2
Description: The process was terminated due to an internal error in the .NET Runtime at IP 0x00007FFCAF762299 (0x00007FFCAF700000) with exit code 0x80131506.

Fehlerhafter Anwendungsname: producer.exe, Version: 16.8.7.0, Zeitstempel: 0x65a80000
Fehlerhafter Modulname: coreclr.dll, Version: 8.0.224.6711, Zeitstempel: 0x65a895d5
Ausnahmecode: 0xc0000005
Fehleroffset: 0x0000000000062299
Fehlerhafte Prozess-ID: 0xB4E0
Fehlerhafte Anwendungsstartzeit: 0x1DB7FD0836817ED
Fehlerhafter Anwendungspfad: C:\Users\samso\AppData\Local\Zeta Producer 16\Applications\producer.exe
Fehlerhafter Modulpfad: C:\Users\samso\AppData\Local\Zeta Producer 16\Applications\coreclr.dll
Berichts-ID: e981053c-80ee-4c2b-b25e-3633b051b93b
Vollständiger Name des fehlerhaften Pakets:
Fehlerhafte paketbezogene Anwendungs-ID:

Fehlerbucket 2054468522805579532, Typ 4
Ereignisname: APPCRASH
Antwort: Nicht verfügbar
CAB-Datei-ID: 0

Problemsignatur:
P1: producer.exe
P2: 16.8.7.0
P3: 65a80000
P4: coreclr.dll
P5: 8.0.224.6711
P6: 65a895d5
P7: c0000005
P8: 0000000000062299
P9:
P10:

Angefügte Dateien:
\\?\C:\ProgramData\Microsoft\Windows\WER\Temp\WER.37fa14a3-dc45-4f00-82b4-4064a5c9edad.tmp.dmp
\\?\C:\ProgramData\Microsoft\Windows\WER\Temp\WER.67cb40ac-942b-46be-9f08-79c2f8554c19.tmp.WERInternalMetadata.xml
\\?\C:\ProgramData\Microsoft\Windows\WER\Temp\WER.cd6ad1b0-c0c3-4bea-a67e-54d73f01546b.tmp.csv
\\?\C:\ProgramData\Microsoft\Windows\WER\Temp\WER.88cb3184-ba16-48c1-ad91-26214961ecbc.tmp.txt
\\?\C:\ProgramData\Microsoft\Windows\WER\Temp\WER.5c79926b-0d2d-463e-9730-742a037453f0.tmp.xml

Diese Dateien befinden sich möglicherweise hier:
\\?\C:\ProgramData\Microsoft\Windows\WER\ReportArchive\AppCrash_producer.exe_15bf62435ae17773022799f9c1f1e2df1b0c870_53e89198_d032d21f-162e-4012-a219-afd7b496ce91

Analysesymbol:
Es wird erneut nach einer Lösung gesucht: 0
Berichts-ID: e981053c-80ee-4c2b-b25e-3633b051b93b
Berichtstatus: 268435456
Bucket mit Hash: e1213411798ec0b14c82f03c880c4f0c
CAB-Datei-Guid: 0
Fehlerhafter Anwendungsname: producer.exe, Version: 16.8.7.0, Zeitstempel: 0x67890000
Fehlerhafter Modulname: coreclr.dll, Version: 8.0.1325.6609, Zeitstempel: 0x6789557c
Ausnahmecode: 0xc0000005
Fehleroffset: 0x00000000000994ad
Fehlerhafte Prozess-ID: 0x70CC
Fehlerhafte Anwendungsstartzeit: 0x1DB81101C6961C4
Fehlerhafter Anwendungspfad: C:\Users\samso\AppData\Local\Zeta Producer 16\Applications\producer.exe
Fehlerhafter Modulpfad: C:\Users\samso\AppData\Local\Zeta Producer 16\Applications\coreclr.dll
Berichts-ID: f0fd4ba0-7fe6-4169-8e50-36434cd62896
Vollständiger Name des fehlerhaften Pakets:
Fehlerhafte paketbezogene Anwendungs-ID:

Application: producer.exe
CoreCLR Version: 8.0.1325.6609
.NET Version: 8.0.13
Description: The process was terminated due to an internal error in the .NET Runtime at IP 0x00007FFCB22F94AD (0x00007FFCB2260000) with exit code 0x80131506.

Fehlerbucket , Typ 0
Ereignisname: APPCRASH
Antwort: Nicht verfügbar
CAB-Datei-ID: 0

Problemsignatur:
P1: producer.exe
P2: 16.8.7.0
P3: 67890000
P4: coreclr.dll
P5: 8.0.1325.6609
P6: 6789557c
P7: c0000005
P8: 00000000000994ad
P9:
P10:

Angefügte Dateien:

Diese Dateien befinden sich möglicherweise hier:
\\?\C:\ProgramData\Microsoft\Windows\WER\ReportQueue\AppCrash_producer.exe_d9e03a658e5cda4208558c3bde83a96b11df55b_6980bec3_497ef880-3f7a-4952-aad5-03f79fb1169f

Analysesymbol:
Es wird erneut nach einer Lösung gesucht: 0
Berichts-ID: f0fd4ba0-7fe6-4169-8e50-36434cd62896
Berichtstatus: 4
Bucket mit Hash:
CAB-Datei-Guid: 0

Regression?

We do believe for most of our users the errors started to occur after doing some updates for Windows 11 last fall, but we cannot pinpoint a certain one.


Known Workarounds

Currently we have no workarounds.

Other issues like this one pointed to downgrade the application to use .NET 8.0.2 but for us this did not help.

We tried various versions of .NET like 8.0.2 or 8.0.13, including 9.0.x. All resulted in the same erroneous behavior and crashes.

We also tried to do some GC related changes like adding <GCConcurrent>true</GCConcurrent> to the CSPROJ files of our application. And also using "SetErrorMode()" but this did not lead to an improvement.

Last, we tried to run our application through ProcDump with the hope that it "protects" our application in some magical way. Unfortunately that did not help, nor do the DMP files give any hints on where to look for to work around.

We also tried to update the latest VC++ redistributables but this did not change the behavior, too.

➡️In case it helps, please tell me and I can provide some DMP files⬅️


Configuration

The crash occurs on both Windows 10 and 11 (64-bit x86) systems. We do have the impression that the errors began last fall with some Windows updates, but we cannot pinpoint a certain one.

The crash occurs with .NET 8 (all minor versions like 8.0.2, 8.0.3, etc.) and also with .NET 9 (all minor versions, too).

One customer provided us with his update history in case this helps:

Image

Image

Image


Other information

We found other, similar error reports here:

Activity

  1. ghost added
    needs-area-label
    on Feb 15, 2025
  2. added
    untriaged
    on Feb 15, 2025
  3. jkotas commented on Feb 15, 2025

    @jkotas
    Member

    In case it helps, please tell me and I can provide some DMP files

    Yes, that would help. The best way to share crash dump with us is by opening an issue at https://developercommunity.visualstudio.com/, include the DMP files as private attachment, and share link to the issue here.

  4. added
    tenet-reliability
    and removed
    needs-area-label
    on Feb 15, 2025
  5. dotnet-policy-service commented on Feb 15, 2025

    @dotnet-policy-service
    Contributor

    Tagging subscribers to this area: @mangod9
    See info in area-owners.md if you want to be subscribed.

  6. UweKeim commented on Feb 17, 2025

    @UweKeim
    Author
  7. jkotas commented on Feb 17, 2025

    @jkotas
    Member

    Thank you for sharing the crash dump. The stacktrace of the crash is:

     # Child-SP          RetAddr               Call Site
    00 000000ad`4fe7f498 00007ffc`b237d552     coreclr!SafeReleasePreemp+0x5 [D:\a\_work\1\s\src\coreclr\vm\interoputil.cpp @ 723] 
    01 (Inline Function) --------`--------     coreclr!IUnkEntry::ReleaseInterface+0x33 [D:\a\_work\1\s\src\coreclr\vm\comcache.cpp @ 518] 
    02 000000ad`4fe7f4a0 00007ffc`b237ccf4     coreclr!RCW::ReleaseAllInterfaces+0x42 [D:\a\_work\1\s\src\coreclr\vm\runtimecallablewrapper.cpp @ 2311] 
    03 000000ad`4fe7f4d0 00007ffc`b237cc32     coreclr!RCW::ReleaseAllInterfacesCallBack+0x34 [D:\a\_work\1\s\src\coreclr\vm\runtimecallablewrapper.cpp @ 2292] 
    04 000000ad`4fe7f500 00007ffc`b237c4fe     coreclr!RCW::Cleanup+0x66 [D:\a\_work\1\s\src\coreclr\vm\runtimecallablewrapper.cpp @ 1799] 
    05 000000ad`4fe7f540 00007ffc`b237ba3e     coreclr!RCWCleanupList::ReleaseRCWListRaw+0x16 [D:\a\_work\1\s\src\coreclr\vm\runtimecallablewrapper.cpp @ 1306] 
    06 000000ad`4fe7f570 00007ffc`b237b99b     coreclr!RCWCleanupList::ReleaseRCWListInCorrectCtx+0x8e [D:\a\_work\1\s\src\coreclr\vm\runtimecallablewrapper.cpp @ 1278] 
    07 000000ad`4fe7f5a0 00007ffc`b2314219     coreclr!RCWCleanupList::CleanupAllWrappers+0xe7 [D:\a\_work\1\s\src\coreclr\vm\runtimecallablewrapper.cpp @ 1072] 
    08 000000ad`4fe7f5f0 00007ffc`b22a2de2     coreclr!SyncBlockCache::CleanupSyncBlocks+0xf5 [D:\a\_work\1\s\src\coreclr\vm\syncblk.cpp @ 610] 
    09 000000ad`4fe7f660 00007ffc`b22a2b59     coreclr!Thread::DoExtraWorkForFinalizer+0x132 [D:\a\_work\1\s\src\coreclr\vm\threads.cpp @ 7145] 
    0a 000000ad`4fe7f6d0 00007ffc`b231400d     coreclr!FinalizerThread::FinalizerThreadWorker+0xc9 [D:\a\_work\1\s\src\coreclr\vm\finalizerthread.cpp @ 348] 
    0b (Inline Function) --------`--------     coreclr!ManagedThreadBase_DispatchInner+0xd [D:\a\_work\1\s\src\coreclr\vm\threads.cpp @ 7222] 
    0c 000000ad`4fe7f920 00007ffc`b2313f35     coreclr!ManagedThreadBase_DispatchMiddle+0x79 [D:\a\_work\1\s\src\coreclr\vm\threads.cpp @ 7266] 
    0d 000000ad`4fe7f9d0 00007ffc`b2332ff1     coreclr!ManagedThreadBase_DispatchOuter+0x8d [D:\a\_work\1\s\src\coreclr\vm\threads.cpp @ 7425] 
    0e (Inline Function) --------`--------     coreclr!ManagedThreadBase_NoADTransition+0x28 [D:\a\_work\1\s\src\coreclr\vm\threads.cpp @ 7494] 
    0f (Inline Function) --------`--------     coreclr!ManagedThreadBase::FinalizerBase+0x28 [D:\a\_work\1\s\src\coreclr\vm\threads.cpp @ 7513] 
    10 000000ad`4fe7fa40 00007ffc`f955e8d7     coreclr!FinalizerThread::FinalizerThreadStart+0x91 [D:\a\_work\1\s\src\coreclr\vm\finalizerthread.cpp @ 403] 
    11 000000ad`4fe7fb50 00007ffc`fb07bf2c     kernel32!BaseThreadInitThunk+0x17 [clientcore\base\win32\client\thread.c @ 77] 
    12 000000ad`4fe7fb80 00000000`00000000     ntdll!RtlUserThreadStart+0x2c [minkernel\ldr\rtlstrt.c @ 1184] 
    

    This crash is most likely caused by mismatched addref/release in COM interop. It is all that I can tell from the minidump.

    Any chance you can collect a full dump? E.g. set DumpType to 2 in these registry settings https://learn.microsoft.com/en-us/windows/win32/wer/collecting-user-mode-dumps . It may be possible to find more details like the COM interface responsible for the crash from the full dump.

  8. dotnet-policy-service commented on Feb 17, 2025

    @dotnet-policy-service
    Contributor

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

  9. UweKeim commented on Feb 17, 2025

    @UweKeim
    Author

    Thank you so much, @jkotas. I've just told my customer. As soon as I get a full dump I'll post it here again.

    Just to be sure: Do I have any chance of "catching and ignoring" this exception?

    I've even tried to run my application through ProcDump to have some "shield" around my application but nothing really helped to have my application not crash.

    Thanks again for your super fast help ♥️.

  10. UweKeim commented on Feb 17, 2025

    @UweKeim
    Author

    @jkotas I've just uploaded a (zipped) full dump as a paper clip upload to the original issue over there:

    https://developercommunity.visualstudio.com/t/WinForms-Desktop-application-NET-8--/10851155

    This is the related event log entry:

    Application: producer.exe
    CoreCLR Version: 8.0.1325.6609
    .NET Version: 8.0.13
    Description: The process was terminated due to an internal error in the .NET Runtime at IP 0x00007FF92F7D94AD (0x00007FF92F740000) with exit code 0x80131506.
    
    Fehlerhafter Anwendungsname: producer.exe, Version: 16.8.7.0, Zeitstempel: 0x67890000
    Fehlerhafter Modulname: coreclr.dll, Version: 8.0.1325.6609, Zeitstempel: 0x6789557c
    Ausnahmecode: 0xc0000005
    Fehleroffset: 0x00000000000994ad
    Fehlerhafte Prozess-ID: 0x7A74
    Fehlerhafte Anwendungsstartzeit: 0x1DB816DAB3221AF
    Fehlerhafter Anwendungspfad: C:\Users\samso\AppData\Local\Zeta Producer 16\Applications\producer.exe
    Fehlerhafter Modulpfad: C:\Users\samso\AppData\Local\Zeta Producer 16\Applications\coreclr.dll
    Berichts-ID: 50287832-0578-4cbf-ac99-76d95cd6982c
    Vollständiger Name des fehlerhaften Pakets:
    Fehlerhafte paketbezogene Anwendungs-ID:
    
    Fehlerbucket 1773460895412467211, Typ 4
    Ereignisname: APPCRASH
    Antwort: Nicht verfügbar
    CAB-Datei-ID: 0
    
    Problemsignatur:
    P1: producer.exe
    P2: 16.8.7.0
    P3: 67890000
    P4: coreclr.dll
    P5: 8.0.1325.6609
    P6: 6789557c
    P7: c0000005
    P8: 00000000000994ad
    P9:
    P10:
    
    Angefügte Dateien:
    \\?\C:\ProgramData\Microsoft\Windows\WER\Temp\WER.05353f23-aca4-433f-b2ba-c52418fbcef7.tmp.dmp
    \\?\C:\ProgramData\Microsoft\Windows\WER\Temp\WER.cd5ceb36-2473-410e-abb7-f38fcd3b61d9.tmp.WERInternalMetadata.xml
    \\?\C:\ProgramData\Microsoft\Windows\WER\Temp\WER.b986c96d-9470-4c50-b426-68190a5a710f.tmp.csv
    \\?\C:\ProgramData\Microsoft\Windows\WER\Temp\WER.69358532-2ce7-4d6f-afe9-d650b29abe5c.tmp.txt
    \\?\C:\ProgramData\Microsoft\Windows\WER\Temp\WER.bc22968a-ece8-48f5-a746-c4900b3b105f.tmp.xml
    
    Diese Dateien befinden sich möglicherweise hier:
    \\?\C:\ProgramData\Microsoft\Windows\WER\ReportArchive\AppCrash_producer.exe_d9e03a658e5cda4208558c3bde83a96b11df55b_6980bec3_59c202ae-8bdc-4eb8-89c0-f022af6c84c6
    
    Analysesymbol:
    Es wird erneut nach einer Lösung gesucht: 0
    Berichts-ID: 50287832-0578-4cbf-ac99-76d95cd6982c
    Berichtstatus: 268435456
    Bucket mit Hash: fcc0e9cf361d4a71889c9949c61b360b
    
  11. Zheng-Li01 commented on Feb 18, 2025

    @Zheng-Li01
    Member

    @UweKeimm, try is issue more times. the application working well and no crash on Windows11 & 32 RAM configurations based on your decryption as below screenshot.
    Image

    @jkotas, could you please transfer this issue into https://github.com/dotnet/winforms to track if you decide this is related winforms application.

  12. jkotas commented on Feb 18, 2025

    @jkotas
    Member

    could you please transfer this issue into https://github.com/dotnet/winforms to track if you decide this is related winforms application.

    @Zheng-Li01 This bug does not appear to be related to winforms. It is bug in the app code based on the evidence so far.
     

    Do I have any chance of "catching and ignoring" this exception?

    This is use-after-free bug. There is no reasonable way to recover from it. Trying to recover from it would lead to more inscrutable unrecoverable crashes.

    full dump

    Thank you for sharing the full dump. The COM object with the problem is jscript9Legacy!JavascriptDispatch I found by looking at the value of RCW::m_vtablePtr and resolving it to a symbol using ln command in windbg.

    jscript9Legacy is old Java Script engine from Internet Explorer. It gets loaded by your app at this callstack:

    KERNELBASE!LoadLibraryExW+0xe6 [minkernel\kernelbase\module.c @ 1240] 
    combase!LoadLibraryWithLogging+0x2d
    combase!CClassCache::CDllPathEntry::LoadDll::__l4::<lambda_eebf69f5a3250f8786ebc7c3378db176>::operator()+0x15
    combase!DoImmediateCallback+0x1e
    combase!CClassCache::CDllPathEntry::LoadDll+0x2e
    combase!CClassCache::CDllPathEntry::Create+0x6c
    combase!CClassCache::CClassEntry::CreateDllClassEntry+0x142
    combase!CClassCache::GetClassObjectActivator+0x9e1
    combase!CClassCache::GetClassObject+0x43
    combase!CCGetClassObject+0x85
    combase!CServerContextActivator::GetClassObject+0x125
    combase!ActivationPropertiesIn::DelegateGetClassObject+0x77
    combase!CApartmentActivator::GetClassObject+0x6d
    combase!CProcessActivator::GCOCallback+0x41
    combase!CProcessActivator::AttemptActivation+0x8d
    combase!CProcessActivator::ActivateByContext+0x91
    combase!CProcessActivator::GetClassObject+0x77
    combase!ActivationPropertiesIn::DelegateGetClassObject+0x77
    combase!CClientContextActivator::GetClassObject+0x140
    combase!ActivationPropertiesIn::DelegateGetClassObject+0x77
    combase!ICoGetClassObject+0x9aa
    combase!CComActivator::DoGetClassObject+0x11b
    combase!CoGetClassObject+0xa1
    jscript!DllGetClassObject+0x183
    combase!<lambda_164b43634c25d35cdbd8b4df9878991c>::operator()+0x71
    combase!CClassCache::CDllPathEntry::GetClassObject+0x32
    combase!CClassCache::CDllPathEntry::DllGetClassObject+0x72
    combase!CClassCache::CDllClassEntry::GetClassObject+0x3b
    combase!CClassCache::CDllFnPtrMoniker::BindToObjectNoSwitch+0xf
    combase!CClassCache::GetClassObject+0x65
    combase!CCGetClassObject+0xa7
    combase!CServerContextActivator::GetClassObject+0x125
    combase!ActivationPropertiesIn::DelegateGetClassObject+0x77
    combase!CApartmentActivator::GetClassObject+0x6d
    combase!CProcessActivator::GCOCallback+0x41
    combase!CProcessActivator::AttemptActivation+0x8d
    combase!CProcessActivator::ActivateByContext+0x91
    combase!CProcessActivator::GetClassObject+0x77
    combase!ActivationPropertiesIn::DelegateGetClassObject+0x77
    combase!CClientContextActivator::GetClassObject+0x140
    combase!ActivationPropertiesIn::DelegateGetClassObject+0x77
    combase!ICoGetClassObject+0x9aa
    combase!CComActivator::DoGetClassObject+0x11b
    combase!CoGetClassObject+0xa1
    coreclr!ComClassFactory::GetIClassFactory+0xbc [D:\a\_work\1\s\src\coreclr\vm\runtimecallablewrapper.cpp @ 503] 
    coreclr!ComClassFactory::CreateInstanceInternal+0x27 [D:\a\_work\1\s\src\coreclr\vm\runtimecallablewrapper.cpp @ 463] 
    coreclr!ComClassFactory::CreateInstance+0x96 [D:\a\_work\1\s\src\coreclr\vm\runtimecallablewrapper.cpp @ 559] 
    coreclr!AllocateComObject_ForManaged+0x2b [D:\a\_work\1\s\src\coreclr\vm\interoputil.cpp @ 1770] 
    coreclr!AllocateObject+0x15c78d [D:\a\_work\1\s\src\coreclr\vm\gchelpers.cpp @ 1063] 
    coreclr!JIT_New+0x15c86f [D:\a\_work\1\s\src\coreclr\vm\jithelpers.cpp @ 2454] 
    ZetaProducer_SuperSlimScriptingEngine!ZetaProducer.SuperSlimScriptingEngine.SlimScriptEngine..ctor+0x155 [c:\P\ukeim\zp-develop\ZetaProducerMain\Source\Core\SuperSlimScriptingEngine\SlimScriptEngine.cs @ 29] 
    ZetaProducer_RuntimeBusinessLogic!ZetaProducer.RuntimeBusinessLogic.Rendering.Scripting.Testing.ScriptEngineAvailabilityCheckController.RunTests+0x50 [c:\P\ukeim\zp-develop\ZetaProducerMain\Source\Core\RuntimeBusinessLogic\Rendering\Scripting\Testing\ScriptEngineAvailabilityCheckController.cs @ 17] 
    producer!ZetaProducer.Main.ErrorHandling.ScriptRegistrationErrorController.runScript+0x12
    producer!ZetaProducer.Main.ErrorHandling.ScriptRegistrationErrorController.<>c.<HighLevelCheckAndRepairBrokenVBScriptRegistration>b__1_0+0x18
    ZetaProducer_RuntimeBase!ZetaProducer.RuntimeBase.ThreadPooling.ThreadPoolWorkItemGroup.workItemCallbackWrapper+0x242 [c:\P\ukeim\zp-develop\ZetaProducerMain\Source\Core\RuntimeBase\ThreadPooling\ThreadPoolWorkItemGroup.cs @ 432] 
    SmartThreadPool!Amib.Threading.Internal.WorkItem.ExecuteWorkItem+0x54
    SmartThreadPool!Amib.Threading.Internal.WorkItem.Execute+0x4a
    SmartThreadPool!Amib.Threading.SmartThreadPool.ExecuteWorkItem+0x9e
    SmartThreadPool!Amib.Threading.SmartThreadPool.ProcessQueuedItems+0x4dd
    

    My guess is that the mismatched addref/release is in the implementation of ZetaProducer.SuperSlimScriptingEngine.SlimScriptEngine.

  13. added
    tracking-external-issue
    on Feb 18, 2025
  14. added this to the Future milestone on Feb 18, 2025
  15. removed
    untriaged
    on Feb 18, 2025
  16. UweKeim commented on Feb 18, 2025

    @UweKeim
    Author

    Thank you so much again, @jkotas!

    I really appreciate your help. I hadn't figured this out myself, but your explanation makes perfect sense.

    In newer versions of our application, we've already replaced the decade-old bindings to JScript/ActiveScript with Jint. I think it's time to do the same here as well.

    Thanks again for your insights and support!

  17. jkotas commented on Feb 18, 2025

    @jkotas
    Member

    You are welcome!

    I assume that this issue can be closed.

  18. UweKeim commented on Feb 18, 2025

    @UweKeim
    Author

    Yes, thanks, Jan.

    I was able to fix the existing JScript/ActiveScript implementation by doing more through NULL setting/checking before calling Marshal.ReleaseComObject.

  19. locked and limited conversation to collaborators on Mar 21, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    area-Interop-coreclrtenet-reliabilitytracking-external-issue

    Type

    No type

    Projects

    • Status
      No status

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions