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

Blazor Web App Run Error when project name contain Chinese #52109

Closed
1 task done
jackywang615 opened this issue Nov 16, 2023 · 1 comment · Fixed by #52232
Closed
1 task done

Blazor Web App Run Error when project name contain Chinese #52109

jackywang615 opened this issue Nov 16, 2023 · 1 comment · Fixed by #52232
Assignees
Labels
area-blazor Includes: Blazor, Razor Components bug This issue describes a behavior which is not expected - a bug.
Milestone

Comments

@jackywang615
Copy link

Is there an existing issue for this?

  • I have searched the existing issues

Describe the bug

if the project name contain any Chinese, the counter Page will raise error.
Snipaste_2023-11-16_08-44-27

Expected Behavior

No response

Steps To Reproduce

No response

Exceptions (if any)

No response

.NET Version

8.0.100

Anything else?

No response

@dotnet-issue-labeler dotnet-issue-labeler bot added the area-blazor Includes: Blazor, Razor Components label Nov 16, 2023
@jackywang615 jackywang615 changed the title Blazor Web App Run Error when project name contains Chinese Blazor Web App Run Error when project name contain Chinese Nov 16, 2023
@mkArtakMSFT mkArtakMSFT added the bug This issue describes a behavior which is not expected - a bug. label Nov 16, 2023
@mkArtakMSFT mkArtakMSFT added this to the 8.0.x milestone Nov 16, 2023
@vcsjones
Copy link
Member

This looks to be the same issue reported at #50879.

mkArtakMSFT pushed a commit that referenced this issue Nov 27, 2023
…yte characters (#52316)

Backport of #52232 to release/8.0

/cc @MackinnonBuck

# [Blazor] Fix type name hashing when the type has multibyte characters

Fixes an issue where an exception gets thrown if a render mode boundary component has a type whose full name contains multibyte characters.

## Description

The bug results in an exception getting thrown if the type of a component with a render mode has a full name containing multibyte characters. It especially affects cases where a component (or the namespace it's defined in) contains non-Latin characters.

This PR fixes the issue by allocating a constant-sized stack buffer and falling back to a heap-allocated buffer when the type name is too long.

Fixes #50879
Fixes #52109

## Customer Impact

Blazor Apps with non-Latin code might not be able to use interactivity. The workaround is to ensure that the full name of any component serving as a render mode boundary does not contain multibyte characters.

## Regression?

- [ ] Yes
- [X] No

Render modes are a new feature in .NET 8, so this bug is not a regression.

## Risk

- [ ] High
- [ ] Medium
- [X] Low

The fix is straightforward and we have new automated tests for this scenario.

## Verification

- [X] Manual (required)
- [X] Automated

## Packaging changes reviewed?

- [ ] Yes
- [ ] No
- [X] N/A

---------

Co-authored-by: Mackinnon Buck <[email protected]>
@mkArtakMSFT mkArtakMSFT modified the milestones: 8.0.x, 8.0.1 Nov 27, 2023
@ghost ghost locked as resolved and limited conversation to collaborators Feb 7, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
area-blazor Includes: Blazor, Razor Components bug This issue describes a behavior which is not expected - a bug.
Projects
Status: Done
Development

Successfully merging a pull request may close this issue.

4 participants