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

.net8 String.IndexOf crash #110994

Open
dotecxy opened this issue Dec 30, 2024 · 5 comments
Open

.net8 String.IndexOf crash #110994

dotecxy opened this issue Dec 30, 2024 · 5 comments
Labels
area-VM-coreclr needs-author-action An issue or pull request that requires more info or actions from the author. tenet-reliability Reliability/stability related issue (stress, load problems, etc.) untriaged New issue has not been triaged by the area owner

Comments

@dotecxy
Copy link

dotecxy commented Dec 30, 2024

Description

I see in the Eventvwr log

Reproduction Steps

Cannot reproduce

Expected behavior

102602000x8000000000000012792ApplicationDESKTOP-E3AHE85Application: sinsam.exe
CoreCLR Version: 8.0.1124.51707
.NET Version: 8.0.11
Description: The process was terminated due to an unhandled exception.
Exception Info: System.AccessViolationException: Attempted to read or write protected memory. This is often an indication that other memory is corrupt.
Stack:
at System.SR.InternalGetResourceString(System.String)
at System.SR.GetResourceString(System.String)
at System.String.IndexOf(System.String, Int32, Int32, System.StringComparison)
at System.String.IndexOf(System.String)
10000210000x800000000000000012793ApplicationDESKTOP-E3AHE85sinsam.exe24.6.20.667110000coreclr.dll8.0.1124.5170767115e10c000000500000000001c7b0e0x42140x1db5a813d93245aC:\Program Files\sinsam\app\sinsam.exeC:\Program Files\dotnet\shared\Microsoft.NETCore.App\8.0.11\coreclr.dll8aedc4c4-4035-47c9-8074-fad9f1eeb9f0

Actual behavior

Crash

Regression?

No response

Known Workarounds

No response

Configuration

No response

Other information

No response

@dotnet-issue-labeler dotnet-issue-labeler bot added the needs-area-label An area label is needed to ensure this gets routed to the appropriate area owners label Dec 30, 2024
@dotnet-policy-service dotnet-policy-service bot added the untriaged New issue has not been triaged by the area owner label Dec 30, 2024
@huoyaoyuan
Copy link
Member

The crash is be caused by two issues: an invalid StringComparison is passed to IndexOf causing an exception to be thrown, then access violation happens when trying to load resource string for the exception.

This looks like a general reliability issue and not limited to .NET runtime, because it's unlikely to get non-constant StringComparison used.

@Clockwork-Muse
Copy link
Contributor

Although if you're getting System.AccessViolationException, you absolutely should be crashing to desktop immediately anyways. From a "normal end-user" perspective, no message window will be helpful (they can't do anything about it, and in this particular case the programmer may not have any way to fix it either).

@jkotas jkotas added area-VM-coreclr tenet-reliability Reliability/stability related issue (stress, load problems, etc.) and removed needs-area-label An area label is needed to ensure this gets routed to the appropriate area owners labels Dec 30, 2024
Copy link
Contributor

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

@jkotas
Copy link
Member

jkotas commented Dec 30, 2024

There is not enough information to figure out what might be causing this crash.
 
Could you please configure automatic crash dump collection in registry https://learn.microsoft.com/en-us/windows/win32/wer/collecting-user-mode-dumps (use 2: Full dump) to create crash dump next time this happens? Once you have a crash dump, you can share it privately with us by opening issue at https://developercommunity.visualstudio.com/ . It should give us some clues to diagnose this crash.

@jkotas jkotas added the needs-author-action An issue or pull request that requires more info or actions from the author. label Dec 30, 2024
Copy link
Contributor

This issue has been marked needs-author-action and may be missing some important information.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area-VM-coreclr needs-author-action An issue or pull request that requires more info or actions from the author. tenet-reliability Reliability/stability related issue (stress, load problems, etc.) untriaged New issue has not been triaged by the area owner
Projects
None yet
Development

No branches or pull requests

4 participants