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

[Problem/Bug]: CreateSharedBuffer with size 0 creates an system out of memory exception #4554

Open
planUnd opened this issue May 13, 2024 · 2 comments
Assignees
Labels
bug Something isn't working tracked We are tracking this work internally.

Comments

@planUnd
Copy link

planUnd commented May 13, 2024

What happened?

When trying to create a Shared Buffer with the size 0, I get a System Out of Memory exception. Why?

Please either extend documentation an explaining why or fix it.

Importance

Important. My app's user experience is significantly compromised.

Runtime Channel

Stable release (WebView2 Runtime)

Runtime Version

1.0.2478.35

SDK Version

1.0.2478.35

Framework

WPF

Operating System

Windows 10

OS Version

10.0.19045 build 19045

Repro steps

Simply create a buffer with size 0 within a webview instance

Repros in Edge Browser

No, issue does not reproduce in the corresponding Edge version

Regression

No, this never worked

Last working version (if regression)

No response

AB#50874289

@planUnd planUnd added the bug Something isn't working label May 13, 2024
@LiangTheDev
Copy link
Member

Thanks for reporting the issue. I am creating an internal work item to return E_INVALIDARG in this case, which should be a better error code to return.

Specifying size of 0 for shared buffer is not supported and we currently returns E_OUTOFMEMORY when that is specified. I assume that you are not really trying to share a 0 sized buffer, right?

@LiangTheDev LiangTheDev added the tracked We are tracking this work internally. label May 13, 2024
@LiangTheDev
Copy link
Member

A fixed has been made that returns E_INVALIDARG when 0 buffer size is specified. It will be in Edge WebView2 Runtime version 126 to be released in about a month.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working tracked We are tracking this work internally.
Projects
None yet
Development

No branches or pull requests

2 participants